mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Private browsing - Initial steps
This commit is contained in:
parent
afa5ae4c72
commit
af64a888e6
5 changed files with 36 additions and 0 deletions
|
@ -123,6 +123,7 @@ impl HTMLIFrameElement {
|
|||
let window = window.r();
|
||||
let (new_subpage_id, old_subpage_id) = self.generate_new_subpage_id();
|
||||
let new_pipeline_id = self.pipeline_id.get().unwrap();
|
||||
let private_iframe = self.privatebrowsing();
|
||||
|
||||
self.containing_page_pipeline_id.set(Some(window.pipeline()));
|
||||
|
||||
|
@ -134,6 +135,7 @@ impl HTMLIFrameElement {
|
|||
old_subpage_id: old_subpage_id,
|
||||
new_pipeline_id: new_pipeline_id,
|
||||
sandbox: sandboxed,
|
||||
is_private: private_iframe,
|
||||
};
|
||||
chan.send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info)).unwrap();
|
||||
|
||||
|
@ -247,6 +249,17 @@ impl HTMLIFrameElement {
|
|||
ReflowQueryType::NoQuery,
|
||||
ReflowReason::IFrameLoadEvent);
|
||||
}
|
||||
|
||||
/// Check whether the iframe has the mozprivatebrowsing attribute set
|
||||
pub fn privatebrowsing(&self) -> bool {
|
||||
if self.Mozbrowser() {
|
||||
let element = self.upcast::<Element>();
|
||||
element.has_attribute(&Atom::from("mozprivatebrowsing"))
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pub trait HTMLIFrameElementLayoutMethods {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue