mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #11544 - jdm:privatebrowsing, r=asajeffrey
Implement private browsing for mozbrowser <!-- Please describe your changes on the following line: --> Support the `mozprivatebrowsing` attribute on mozbrowser iframes. This separates the non-private and private sessions in terms of cookies, HSTS lists, cached HTTP credentials, HTTP connection pools, and web storage. The private session is shared between all private mozbrowsers, and lasts until shutdown. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11544) <!-- Reviewable:end -->
This commit is contained in:
commit
6166d8e74f
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue