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
This commit is contained in:
Bryan Bell 2014-07-19 04:54:57 -07:00
parent ca96821902
commit 0c9f469f64
17 changed files with 572 additions and 159 deletions

View file

@ -35,7 +35,10 @@
== background_external_stylesheet.html background_ref.html
== block_image.html 500x300_green.html
!= block_image.html noteq_500x300_white.html
# == simple_iframe.html simple_iframe_ref.html -- disabled due to iframe crashiness
# iframe tests
# commented for failing on os x
# == iframe/simple_iframe.html iframe/simple_iframe_ref.html
== iframe/iframe_summit.html iframe/iframe_summit_ref.html
== object_element_a.html object_element_b.html
== append_style_a.html append_style_b.html
== height_compute_reset.html height_compute.html