mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
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:
parent
a5778fb5da
commit
7e2b4d163b
14 changed files with 294 additions and 138 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue