mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Private browsing - Initial steps
This commit is contained in:
parent
afa5ae4c72
commit
af64a888e6
5 changed files with 36 additions and 0 deletions
|
@ -1501,6 +1501,19 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
|
|||
ReadyToSave::Ready
|
||||
}
|
||||
|
||||
/// Checks whether the pipeline or its ancestors are private
|
||||
#[allow(dead_code)]
|
||||
fn check_is_pipeline_private(&self, pipeline_id: PipelineId) -> bool {
|
||||
let mut pipeline_id = Some(pipeline_id);
|
||||
while let Some(pipeline) = pipeline_id.and_then(|id| self.pipelines.get(&id)) {
|
||||
if pipeline.is_private {
|
||||
return true;
|
||||
}
|
||||
pipeline_id = pipeline.parent_info.map(|(parent_pipeline_id, _)| parent_pipeline_id);
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
// Close a frame (and all children)
|
||||
fn close_frame(&mut self, frame_id: FrameId, exit_mode: ExitPipelineMode) {
|
||||
// Store information about the pipelines to be closed. Then close the
|
||||
|
|
|
@ -58,6 +58,7 @@ pub struct Pipeline {
|
|||
/// animations cause composites to be continually scheduled.
|
||||
pub running_animations: bool,
|
||||
pub children: Vec<FrameId>,
|
||||
pub is_private: bool,
|
||||
}
|
||||
|
||||
/// The subset of the pipeline that is needed for layer composition.
|
||||
|
@ -275,6 +276,7 @@ impl Pipeline {
|
|||
children: vec!(),
|
||||
size: size,
|
||||
running_animations: false,
|
||||
is_private: false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue