servo/components
bors-servo 85a2f0b66a auto merge of #3953 : neojski/servo/implement-HTMLIFrameElement.contentDocument, r=jdm
Because of #2122 I cannot write test for this right now because it will be failing randomly due to that iframe issue. However, if it doesn't fail due to that issue a test like this:

```html
<html>
  <head>
    <meta charset="utf8" />
    <script src="harness.js"></script>
    <title>Iframe contentDocument test.</title>
  </head>
  <body>
    <iframe src="test_iframe_contentDocument_inner.html" id="iframe"></iframe>
    <script>
      waitForExplicitFinish();

      var timeout = 100;
      var iframe = document.getElementById('iframe');
      function test_contentWindow() {
        if (!iframe.contentWindow) {
          // Iframe not loaded yet, try again.
          // No load event for iframe, insert bug number here.
          setTimeout(test_contentWindow, timeout);
          return;
        }
        is(iframe.contentDocument.getElementById('test').textContent, 'value');
        finish();
      }
      test_contentWindow();
    </script>
  </body>
</html>
```
where inner is simply:
```html
<html><body><div id="test">value</div></body></html>
```
passes.

I have added `SameOrigin` method to the `UrlHelper`. I wanted to reuse it in [`constellation.rs` same_script check](f0184a2d01/components/compositing/constellation.rs (L625)) but I it didn't want to compile saying

```
error: unresolved import `dom::urlhelper::UrlHelper`. Maybe a missing `extern crate dom`?
```

So I didn't include it in this PR for now.

There is more discussion about the cross origin iframes in [another issue](https://github.com/servo/servo/issues/3939). In this PR I just added same origin check.
2014-11-13 23:54:28 -07:00
..
canvas Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
compositing Remove unused arguments from LoadComplete and LoadCompleteMsg 2014-11-14 02:14:00 +05:30
devtools Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
devtools_traits Disable non_snake_case warnings in devtools 2014-09-23 11:45:08 -07:00
gfx Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
layout Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
layout_traits Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
msg Remove unused arguments from LoadComplete and LoadCompleteMsg 2014-11-14 02:14:00 +05:30
net Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
plugins Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
script auto merge of #3953 : neojski/servo/implement-HTMLIFrameElement.contentDocument, r=jdm 2014-11-13 23:54:28 -07:00
script_traits Dispatch keydown, keyup, and keypress events at appropriate times. 2014-11-13 11:27:15 -05:00
style Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
util Fix unit test compile error. 2014-11-13 11:17:43 +10:00