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.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 86146b8e915..d3359a40c89 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -38,9 +38,9 @@ use dom::window::{ReflowReason, Window};
use ipc_channel::ipc;
use js::jsapi::{JSAutoCompartment, RootedValue, JSContext, MutableHandleValue};
use js::jsval::{UndefinedValue, NullValue};
-use layout_interface::ReflowQueryType;
use msg::constellation_msg::{FrameType, LoadData, NavigationDirection, PipelineId, SubpageId};
use net_traits::response::HttpsState;
+use script_layout_interface::message::ReflowQueryType;
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
use script_traits::{IFrameLoadInfo, MozBrowserEvent, ScriptMsg as ConstellationMsg};
use std::cell::Cell;
@@ -562,6 +562,21 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
make_getter!(Height, "height");
// https://html.spec.whatwg.org/multipage/#dom-dim-height
make_dimension_setter!(SetHeight, "height");
+
+ // check-tidy: no specs after this line
+ fn SetMozprivatebrowsing(&self, value: bool) {
+ let element = self.upcast::<Element>();
+ element.set_bool_attribute(&Atom::from("mozprivatebrowsing"), value);
+ }
+
+ fn Mozprivatebrowsing(&self) -> bool {
+ if window_from_node(self).is_mozbrowser() {
+ let element = self.upcast::<Element>();
+ element.has_attribute(&Atom::from("mozprivatebrowsing"))
+ } else {
+ false
+ }
+ }
}
impl VirtualMethods for HTMLIFrameElement {