mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +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) {
|
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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue