Auto merge of #7563 - mrobinson:layerize-stacking-contexts, r=pcwalton

Layerize StackingContexts that are on top of layers

StackingContexts that should be painted on top of StackingContexts that
are already layerized should automatically get their own layer. This
will ensure proper painting order.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7563)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-09-09 10:52:56 -06:00
commit c0381c7325
8 changed files with 171 additions and 14 deletions

View file

@ -2058,7 +2058,7 @@ impl Flow for BlockFlow {
// FIXME(#2010, pcwalton): This is a hack and is totally bogus in the presence of pseudo-
// elements. But until we have incremental reflow we can't do better--we recreate the flow
// for every DOM node so otherwise we nuke layers on every reflow.
LayerId(self.fragment.node.id() as usize, fragment_index)
LayerId(self.fragment.node.id() as usize, fragment_index, 0)
}
fn is_absolute_containing_block(&self) -> bool {

View file

@ -361,7 +361,7 @@ pub trait Flow: fmt::Debug + Sync + Send + 'static {
#[allow(unsafe_code)]
fn layer_id(&self, fragment_id: u32) -> LayerId {
let obj = unsafe { mem::transmute::<&&Self, &raw::TraitObject>(&self) };
LayerId(obj.data as usize, fragment_id)
LayerId(obj.data as usize, fragment_id, 0)
}
/// Attempts to perform incremental fixup of this flow by replacing its fragment's style with