[Webkit-unassigned] [Bug 142783] RenderLayerCompositor: only create backing for visible and non-empty layers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 23 10:34:55 PDT 2015


--- Comment #22 from Julien Isorce <j.isorce at samsung.com> ---
So in RenderLayerCompositor::computeCompositingRequirements, when the layer is "RenderBlock HTML":

if (layer.isStackingContainer())
  if (Vector<RenderLayer*>* posZOrderList = layer.posZOrderList())
    for (auto* renderLayer : *posZOrderList)

The posZOrderList contains the 11 divs.

Then within a call to computeCompositingRequirements for each of these 11 divs, compositingReason = overlapMap.overlapsLayers returns IndirectCompositingReason::Overlap (which make it composited) because m_overlapStack.last() is the rect of the video layer.

Indeed each divs is push and then pop from the overlapmap because of:  
if (childState.compositingAncestor == &layer && !layer.isRootLayer())

So for each div it always compares to video rect, even if these divs are nested.

As opposite, when z-index is force to 0 in the attached example, posZOrderList is 2 (video tag and first div) and the m_overlapStack.last() is the first div (which one is made composited).
So except the first div, compositingReason = overlapMap.overlapsLayers is compared to the first div. So it returns IndirectCompositingReason::None.

In the end having z-index to auto make it the nested divs behaves as if there were not nested. Is it expected ? Well as least it follows the rules that auto means it does not create a stacking context (except for the root layer)

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150323/16645f86/attachment-0002.html>

More information about the webkit-unassigned mailing list