Merge pull request #3347 from jdm/blankiframe

Make all iframes attached to a document default to about:blank.
This commit is contained in:
Jack Moffitt 2014-09-15 19:37:29 -06:00
commit 8a02fe0fc6

View file

@ -82,8 +82,11 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
} }
fn process_the_iframe_attributes(&self) { fn process_the_iframe_attributes(&self) {
match self.get_url() { let url = match self.get_url() {
Some(url) => { Some(url) => url.clone(),
None => Url::parse("about:blank").unwrap(),
};
let sandboxed = if self.is_sandboxed() { let sandboxed = if self.is_sandboxed() {
IFrameSandboxed IFrameSandboxed
} else { } else {
@ -103,9 +106,6 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
let ConstellationChan(ref chan) = *page.constellation_chan.deref(); let ConstellationChan(ref chan) = *page.constellation_chan.deref();
chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed)); chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed));
} }
_ => ()
}
}
} }
impl HTMLIFrameElement { impl HTMLIFrameElement {