diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2015-10-01 08:53:36 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2015-10-06 17:06:53 +1000 |
commit | 5645dba1fa9180068eb0c59417448e7310de5299 (patch) | |
tree | 80aa70f5d99d8ff2bf1f8288fedc628cd92466af /components/compositing/pipeline.rs | |
parent | 35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c (diff) | |
download | servo-5645dba1fa9180068eb0c59417448e7310de5299.tar.gz servo-5645dba1fa9180068eb0c59417448e7310de5299.zip |
Make it possible for iframes to create their own pipeline ID.
This doesn't change any functionality, but it's the first step towards removing SubpageId.
Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.
Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.
Diffstat (limited to 'components/compositing/pipeline.rs')
-rw-r--r-- | components/compositing/pipeline.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 59870d23ab8..34490730708 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -16,6 +16,7 @@ use layers::geometry::DevicePixel; use layout_traits::{LayoutControlChan, LayoutTaskFactory}; use msg::constellation_msg::{ConstellationChan, Failure, FrameId, PipelineId, SubpageId}; use msg::constellation_msg::{LoadData, MozBrowserEvent, PipelineExitType, WindowSizeData}; +use msg::constellation_msg::{PipelineNamespaceId}; use net_traits::ResourceTask; use net_traits::image_cache_task::ImageCacheTask; use net_traits::storage_task::StorageTask; @@ -99,6 +100,8 @@ pub struct InitialPipelineState { pub script_chan: Option<Sender<ConstellationControlMsg>>, /// Information about the page to load. pub load_data: LoadData, + /// The ID of the pipeline namespace for this script thread. + pub pipeline_namespace_id: PipelineNamespaceId, } impl Pipeline { @@ -198,6 +201,7 @@ impl Pipeline { pipeline_port: pipeline_port, paint_shutdown_chan: paint_shutdown_chan, layout_shutdown_chan: layout_shutdown_chan, + pipeline_namespace_id: state.pipeline_namespace_id, }; (pipeline, pipeline_content) @@ -332,6 +336,7 @@ pub struct PipelineContent { paint_shutdown_chan: Sender<()>, pipeline_port: Option<IpcReceiver<LayoutControlMsg>>, layout_shutdown_chan: Sender<()>, + pipeline_namespace_id: PipelineNamespaceId, } impl PipelineContent { @@ -364,6 +369,7 @@ impl PipelineContent { mem_profiler_chan: self.mem_profiler_chan.clone(), devtools_chan: self.devtools_chan, window_size: self.window_size, + pipeline_namespace_id: self.pipeline_namespace_id, }, &layout_pair, self.load_data.clone()); LayoutTaskFactory::create(None::<&mut LTF>, |