From 69172a1ae5d7187c4fe18e3a0d6d8732753a3d56 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 14 May 2014 12:44:59 +0200 Subject: [PATCH] Rename the pipeline ID fields in NewLayoutInfo. This will make the distinction clearer with the subpage ID field to be added. --- src/components/main/pipeline.rs | 4 ++-- src/components/script/script_task.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index d4a117fe08b..f32214ae181 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -86,8 +86,8 @@ impl Pipeline { layout_shutdown_chan); let new_layout_info = NewLayoutInfo { - old_id: script_pipeline.id.clone(), - new_id: id, + old_pipeline_id: script_pipeline.id.clone(), + new_pipeline_id: id, layout_chan: layout_chan.clone(), }; diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index a750903e45d..6c2d8032a21 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -91,8 +91,8 @@ pub enum ScriptMsg { } pub struct NewLayoutInfo { - pub old_id: PipelineId, - pub new_id: PipelineId, + pub old_pipeline_id: PipelineId, + pub new_pipeline_id: PipelineId, pub layout_chan: LayoutChan, } @@ -782,18 +782,18 @@ impl ScriptTask { fn handle_new_layout(&self, new_layout_info: NewLayoutInfo) { debug!("Script: new layout: {:?}", new_layout_info); let NewLayoutInfo { - old_id, - new_id, + old_pipeline_id, + new_pipeline_id, layout_chan } = new_layout_info; let mut page = self.page.borrow_mut(); - let parent_page = page.find(old_id).expect("ScriptTask: received a layout + let parent_page = page.find(old_pipeline_id).expect("ScriptTask: received a layout whose parent has a PipelineId which does not correspond to a pipeline in the script task's page tree. This is a bug."); let new_page = { let window_size = parent_page.window_size.deref().get(); - Page::new(new_id, layout_chan, window_size, + Page::new(new_pipeline_id, layout_chan, window_size, parent_page.resource_task.deref().clone(), self.constellation_chan.clone(), self.js_context.borrow().get_ref().clone())