Auto merge of #10399 - jdm:pb, r=jdm

Private browsing - Initial steps

Rebase of #10160.

<!-- 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/10399)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-04-05 17:41:11 +05:30
commit d1e8b79583
5 changed files with 36 additions and 0 deletions

View file

@ -1675,6 +1675,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

View file

@ -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,
}
}