aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorSagar Muchhal <muchhalsagar88@gmail.com>2016-04-18 16:29:24 -0400
committerJosh Matthews <josh@joshmatthews.net>2016-06-20 14:55:01 -0400
commit7e2b4d163ba3158faf9644112a7f93842312f4a0 (patch)
treedb4d785095a70debb5b98fdf5d755789de268776 /components/script/dom/htmliframeelement.rs
parenta5778fb5da8dbe6229cbd8da7a383b6e336a4ebd (diff)
downloadservo-7e2b4d163ba3158faf9644112a7f93842312f4a0.tar.gz
servo-7e2b4d163ba3158faf9644112a7f93842312f4a0.zip
Propagate privacy information of iframes to corresponding pipelines. Make iframes of differing privacy values be considered cross-origin.
Make the constellation hand out separate private and public channels for the pipeline content to communicate with the resource thread as necessary.
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 86146b8e915..55b60747845 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -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 {