From 68b6bbd35f3b664263b61cbb00ddaf141ebc7ef4 Mon Sep 17 00:00:00 2001 From: mandreyel Date: Fri, 14 Sep 2018 11:29:00 +0200 Subject: [PATCH] Fix private browsing mode preservation when loading URL --- components/constellation/constellation.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/constellation/constellation.rs b/components/constellation/constellation.rs index 3fd889db4beb..9973e4fb9236 100644 --- a/components/constellation/constellation.rs +++ b/components/constellation/constellation.rs @@ -2064,12 +2064,13 @@ where return None; }, }; - let (window_size, pipeline_id, parent_pipeline_id, is_visible) = + let (window_size, pipeline_id, parent_pipeline_id, is_private, is_visible) = match self.browsing_contexts.get(&browsing_context_id) { Some(ctx) => ( ctx.size, ctx.pipeline_id, ctx.parent_pipeline_id, + ctx.is_private, ctx.is_visible, ), None => { @@ -2141,9 +2142,6 @@ where let new_pipeline_id = PipelineId::new(); let sandbox = IFrameSandboxState::IFrameUnsandboxed; - // TODO(mandreyel): why is this false? Should we not inherit the - // privacy of the (existing) browsing context? - let is_private = false; self.new_pipeline( new_pipeline_id, browsing_context_id,