aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorGlenn Watson <gw@intuitionlibrary.com>2015-03-13 15:08:02 +1000
committerGlenn Watson <gw@intuitionlibrary.com>2015-03-17 09:35:41 +1000
commit939a89568e9506c2c6ffbd1f49e3acda6acdf370 (patch)
treed760bf3ad5309c910b9f4e0f5518403a2fbf2e8b /components/script_traits/lib.rs
parent0888a3a16d4f5eafe4f8008ec060764645f3bee5 (diff)
downloadservo-939a89568e9506c2c6ffbd1f49e3acda6acdf370.tar.gz
servo-939a89568e9506c2c6ffbd1f49e3acda6acdf370.zip
First part of refactoring constellation to support iframe navigation.
The history is now recorded per frame, but needs to be exposed in a followup PR. Also fixes a race condition that occurs loading iframes under heavy CPU load. This ensures that iframes never do a reflow / layout until they have a valid window size set from their parent frame.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index deb5ba30770..05ed3f25097 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -44,7 +44,7 @@ pub struct UntrustedNodeAddress(pub *const c_void);
unsafe impl Send for UntrustedNodeAddress {}
pub struct NewLayoutInfo {
- pub old_pipeline_id: PipelineId,
+ pub containing_pipeline_id: PipelineId,
pub new_pipeline_id: PipelineId,
pub subpage_id: SubpageId,
pub layout_chan: Box<Any+Send>, // opaque reference to a LayoutChannel
@@ -53,8 +53,6 @@ pub struct NewLayoutInfo {
/// Messages sent from the constellation to the script task
pub enum ConstellationControlMsg {
- /// Reactivate an existing pipeline.
- Activate(PipelineId),
/// Gives a channel and ID to a layout task, as well as the ID of that layout's parent
AttachLayout(NewLayoutInfo),
/// Window resized. Sends a DOM event eventually, but first we combine events.
@@ -74,7 +72,9 @@ pub enum ConstellationControlMsg {
/// Notifies script task to suspend all its timers
Freeze(PipelineId),
/// Notifies script task to resume all its timers
- Thaw(PipelineId)
+ Thaw(PipelineId),
+ /// Notifies script task that a url should be loaded in this iframe.
+ Navigate(PipelineId, SubpageId, LoadData),
}
unsafe impl Send for ConstellationControlMsg {
@@ -112,7 +112,7 @@ pub trait ScriptTaskFactory {
storage_task: StorageTask,
image_cache_task: ImageCacheTask,
devtools_chan: Option<DevtoolsControlChan>,
- window_size: WindowSizeData,
+ window_size: Option<WindowSizeData>,
load_data: LoadData)
where C: ScriptListener + Send;
fn create_layout_channel(_phantom: Option<&mut Self>) -> OpaqueScriptLayoutChannel;