servo/servo — pull request #3953 by neojski (2014-11-10 22:59:46+00:00)
Title: Add contentDocument support for HTMLIFrameElement. Fixes #3808.

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

Iframe contentDocument test.

```
where inner is simply:
```html

value

```
passes.

I have added `SameOrigin` method to the `UrlHelper`. I wanted to reuse it in [`constellation.rs` same_script check](https://github.com/servo/servo/blob/f0184a2d011e12845258a242d2d2f6b8b504a28d/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.