Skip to content

Commit

Permalink
Mark pipelines not visible when updating the active pipeline for a br…
Browse files Browse the repository at this point in the history
…owsing context.
  • Loading branch information
jdm committed Mar 7, 2019
1 parent cc131be commit 0e30666
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions components/constellation/constellation.rs
Expand Up @@ -2655,6 +2655,13 @@ where
},
};

if let Some(old_pipeline) = self.pipelines.get(&old_pipeline_id) {
old_pipeline.notify_visibility(false);
}
if let Some(new_pipeline) = self.pipelines.get(&new_pipeline_id) {
new_pipeline.notify_visibility(true);
}

self.update_activity(old_pipeline_id);
self.update_activity(new_pipeline_id);

Expand Down Expand Up @@ -3373,6 +3380,10 @@ where
self.notify_history_changed(change.top_level_browsing_context_id);
},
Some(old_pipeline_id) => {
if let Some(pipeline) = self.pipelines.get(&old_pipeline_id) {
pipeline.notify_visibility(false);
}

// https://html.spec.whatwg.org/multipage/#unload-a-document
self.unload_document(old_pipeline_id);
// Deactivate the old pipeline, and activate the new one.
Expand Down

0 comments on commit 0e30666

Please sign in to comment.