mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Don't reuse an old pipeline for a new root layer
When navigating to a new URL, we need to make sure compositor messages go to the new page's pipeline, not the previous one.
This commit is contained in:
parent
9c3875ead5
commit
3231f12708
1 changed files with 3 additions and 4 deletions
|
@ -354,16 +354,15 @@ impl IOCompositor {
|
|||
self.constellation_chan = new_constellation_chan;
|
||||
}
|
||||
|
||||
// FIXME(pcwalton): Take the pipeline ID into account.
|
||||
fn create_root_compositor_layer_if_necessary(&mut self,
|
||||
_: PipelineId,
|
||||
id: PipelineId,
|
||||
layer_id: LayerId,
|
||||
size: Size2D<f32>) {
|
||||
let (root_pipeline, root_layer_id) = match self.compositor_layer {
|
||||
Some(ref compositor_layer) => {
|
||||
Some(ref compositor_layer) if compositor_layer.pipeline.id == id => {
|
||||
(compositor_layer.pipeline.clone(), compositor_layer.id_of_first_child())
|
||||
}
|
||||
None => {
|
||||
_ => {
|
||||
match self.root_pipeline {
|
||||
Some(ref root_pipeline) => (root_pipeline.clone(), LayerId::null()),
|
||||
None => fail!("Compositor: Received new layer without initialized pipeline"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue