mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Merge pull request #3347 from jdm/blankiframe
Make all iframes attached to a document default to about:blank.
This commit is contained in:
commit
8a02fe0fc6
1 changed files with 20 additions and 20 deletions
|
@ -82,8 +82,11 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
|||
}
|
||||
|
||||
fn process_the_iframe_attributes(&self) {
|
||||
match self.get_url() {
|
||||
Some(url) => {
|
||||
let url = match self.get_url() {
|
||||
Some(url) => url.clone(),
|
||||
None => Url::parse("about:blank").unwrap(),
|
||||
};
|
||||
|
||||
let sandboxed = if self.is_sandboxed() {
|
||||
IFrameSandboxed
|
||||
} else {
|
||||
|
@ -103,9 +106,6 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
|
|||
let ConstellationChan(ref chan) = *page.constellation_chan.deref();
|
||||
chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed));
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue