aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 4e7e6108785..beb3134698f 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -124,6 +124,7 @@ impl HTMLIFrameElement {
let window = window.r();
let (new_subpage_id, old_subpage_id) = self.generate_new_subpage_id();
let new_pipeline_id = self.pipeline_id.get().unwrap();
+ let private_iframe = self.privatebrowsing();
self.containing_page_pipeline_id.set(Some(window.pipeline()));
@@ -135,6 +136,7 @@ impl HTMLIFrameElement {
old_subpage_id: old_subpage_id,
new_pipeline_id: new_pipeline_id,
sandbox: sandboxed,
+ is_private: private_iframe,
};
chan.send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info)).unwrap();
@@ -248,6 +250,17 @@ impl HTMLIFrameElement {
ReflowQueryType::NoQuery,
ReflowReason::IFrameLoadEvent);
}
+
+ /// Check whether the iframe has the mozprivatebrowsing attribute set
+ pub fn privatebrowsing(&self) -> bool {
+ if self.Mozbrowser() {
+ let element = self.upcast::<Element>();
+ element.has_attribute(&Atom::from("mozprivatebrowsing"))
+ } else {
+ false
+ }
+ }
+
}
pub trait HTMLIFrameElementLayoutMethods {