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.
This commit is contained in:
Sagar Muchhal 2016-04-18 16:29:24 -04:00 committed by Josh Matthews
parent a5778fb5da
commit 7e2b4d163b
14 changed files with 294 additions and 138 deletions

View file

@ -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 {

View file

@ -33,6 +33,9 @@ partial interface HTMLIFrameElement {
partial interface HTMLIFrameElement {
[Func="::dom::window::Window::global_is_mozbrowser"]
attribute boolean mozbrowser;
[Func="::dom::window::Window::global_is_mozbrowser"]
attribute boolean mozprivatebrowsing;
};
HTMLIFrameElement implements BrowserElement;

View file

@ -489,8 +489,8 @@ impl Runnable for ConnectionEstablishedTask {
for cookie in cookies.iter() {
if let Ok(cookie_value) = String::from_utf8(cookie.clone()) {
let _ = ws.global().r().core_resource_thread().send(SetCookiesForUrl(ws.url.clone(),
cookie_value,
HTTP));
cookie_value,
HTTP));
}
}
}