aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/htmliframeelement.rs46
1 files changed, 23 insertions, 23 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 6422e5a8f10..7ca33cf8674 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -82,29 +82,29 @@ impl<'a> HTMLIFrameElementHelpers for JSRef<'a, HTMLIFrameElement> {
}
fn process_the_iframe_attributes(&self) {
- match self.get_url() {
- Some(url) => {
- let sandboxed = if self.is_sandboxed() {
- IFrameSandboxed
- } else {
- IFrameUnsandboxed
- };
-
- // Subpage Id
- let window = window_from_node(self).root();
- let page = window.deref().page();
- let subpage_id = page.get_next_subpage_id();
-
- self.deref().size.deref().set(Some(IFrameSize {
- pipeline_id: page.id,
- subpage_id: subpage_id,
- }));
-
- let ConstellationChan(ref chan) = *page.constellation_chan.deref();
- chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed));
- }
- _ => ()
- }
+ let url = match self.get_url() {
+ Some(url) => url.clone(),
+ None => Url::parse("about:blank").unwrap(),
+ };
+
+ let sandboxed = if self.is_sandboxed() {
+ IFrameSandboxed
+ } else {
+ IFrameUnsandboxed
+ };
+
+ // Subpage Id
+ let window = window_from_node(self).root();
+ let page = window.deref().page();
+ let subpage_id = page.get_next_subpage_id();
+
+ self.deref().size.deref().set(Some(IFrameSize {
+ pipeline_id: page.id,
+ subpage_id: subpage_id,
+ }));
+
+ let ConstellationChan(ref chan) = *page.constellation_chan.deref();
+ chan.send(LoadIframeUrlMsg(url, page.id, subpage_id, sandboxed));
}
}