aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorBryan Bell <bryan.w.bell@gmail.com>2014-07-19 04:54:57 -0700
committerBryan Bell <bryan.w.bell@gmail.com>2014-07-19 10:46:11 -0700
commit0c9f469f649a4e6c9e768cc299c61bfb65c1da7a (patch)
treed83f2c4b7758129eaf52709a15076e900ba06607 /src/components/script/script_task.rs
parentca968219025a46e57b5cd770ae7c8ac5919876b1 (diff)
downloadservo-0c9f469f649a4e6c9e768cc299c61bfb65c1da7a.tar.gz
servo-0c9f469f649a4e6c9e768cc299c61bfb65c1da7a.zip
Restructure compositor layers to work with iframes
When a frame is selected via set_ids, a tree of root compositor layers is also created, matching the tree of pipelines in the frame. This decouples the chronological ordering dependency for parent frames and child iframes sending CreateOrUpdateRootLayer & CreateOrUpdateDescendentLayer messages. Change the Compositor ready and render states to per pipeline. This ensures the compositor doesn't composite for an epoch until every *pipeline* in the epoch is finished rendering. For iframes it fixes a bug where the compositor didnt wait on the child pipeline ready state before compositing the window. Gotchas: * layout task or script task failure on exit ("task '' failed at sending on a closed channel"), this happens if the child iframe shares the same script task as the parent and can be avoided by adding the sandbox attribute to the iframe. Other changes: * Inline set_clipping_rect in compositor.rs * Commented out ref test simple_iframe.html fails on os x
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index e173a37f762..51a4c5f3e51 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -452,7 +452,7 @@ impl ScriptTask {
let mut layout_join_port = page.layout_join_port.deref().borrow_mut();
*layout_join_port = None;
}
- self.compositor.set_ready_state(FinishedLoading);
+ self.compositor.set_ready_state(pipeline_id, FinishedLoading);
}
/// Handles a navigate forward or backward message.
@@ -549,7 +549,7 @@ impl ScriptTask {
let document = Document::new(&*window, Some(url.clone()), HTMLDocument, None).root();
window.deref().init_browser_context(&*document);
- self.compositor.set_ready_state(Loading);
+ self.compositor.set_ready_state(pipeline_id, Loading);
// Parse HTML.
//
// Note: We can parse the next document in parallel with any previous documents.