Auto merge of #7807 - glennw:pid, r=jdm

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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7807)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-10-06 01:08:32 -06:00
commit 098bdb5f22
9 changed files with 193 additions and 68 deletions

View file

@ -31,7 +31,7 @@ use libc::c_void;
use msg::compositor_msg::{Epoch, LayerId, ScriptToCompositorMsg};
use msg::constellation_msg::{ConstellationChan, Failure, PipelineId, WindowSizeData};
use msg::constellation_msg::{Key, KeyModifiers, KeyState, LoadData, SubpageId};
use msg::constellation_msg::{MozBrowserEvent, PipelineExitType};
use msg::constellation_msg::{MozBrowserEvent, PipelineExitType, PipelineNamespaceId};
use msg::webdriver_msg::WebDriverScriptCommand;
use net_traits::ResourceTask;
use net_traits::image_cache_task::ImageCacheTask;
@ -208,6 +208,8 @@ pub struct InitialScriptState {
pub devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
/// Information about the initial window size.
pub window_size: Option<WindowSizeData>,
/// The ID of the pipeline namespace for this script thread.
pub pipeline_namespace_id: PipelineNamespaceId,
}
/// This trait allows creating a `ScriptTask` without depending on the `script`