PaintLayerStackingNode::~PaintLayerStackingNode() { #if ENABLE(ASSERT) if (!layoutObject()->documentBeingDestroyed()) { DCHECK(!isInStackingParentZOrderLists()); updateStackingParentForZOrderLists(0); } #endif }
RenderLayerStackingNode::~RenderLayerStackingNode() { #if !ASSERT_DISABLED if (!renderer()->documentBeingDestroyed()) { ASSERT(!isInStackingParentZOrderLists()); ASSERT(!isInStackingParentNormalFlowList()); updateStackingParentForZOrderLists(0); updateStackingParentForNormalFlowList(0); } #endif }
void RenderLayerStackingNode::rebuildZOrderLists() { ASSERT(m_layerListMutationAllowed); ASSERT(isDirtyStackingContainer()); rebuildZOrderLists(m_posZOrderList, m_negZOrderList); #if !ASSERT_DISABLED updateStackingParentForZOrderLists(this); #endif m_zOrderListsDirty = false; }
void PaintLayerStackingNode::rebuildZOrderLists() { #if DCHECK_IS_ON() DCHECK(m_layerListMutationAllowed); #endif DCHECK(isDirtyStackingContext()); for (PaintLayer* child = layer()->firstChild(); child; child = child->nextSibling()) child->stackingNode()->collectLayers(m_posZOrderList, m_negZOrderList); // Sort the two lists. if (m_posZOrderList) std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compareZIndex); if (m_negZOrderList) std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compareZIndex); // Append layers for top layer elements after normal layer collection, to // ensure they are on top regardless of z-indexes. The layoutObjects of top // layer elements are children of the view, sorted in top layer stacking // order. if (layer()->isRootLayer()) { LayoutBlockFlow* rootBlock = layoutObject()->view(); // If the viewport is paginated, everything (including "top-layer" elements) // gets redirected to the flow thread. So that's where we have to look, in // that case. if (LayoutBlockFlow* multiColumnFlowThread = rootBlock->multiColumnFlowThread()) rootBlock = multiColumnFlowThread; for (LayoutObject* child = rootBlock->firstChild(); child; child = child->nextSibling()) { Element* childElement = (child->node() && child->node()->isElementNode()) ? toElement(child->node()) : 0; if (childElement && childElement->isInTopLayer()) { PaintLayer* layer = toLayoutBoxModelObject(child)->layer(); // Create the buffer if it doesn't exist yet. if (!m_posZOrderList) m_posZOrderList = wrapUnique(new Vector<PaintLayerStackingNode*>); m_posZOrderList->append(layer->stackingNode()); } } } #if ENABLE(ASSERT) updateStackingParentForZOrderLists(this); #endif m_zOrderListsDirty = false; }
void RenderLayerStackingNode::dirtyZOrderLists() { ASSERT(m_layerListMutationAllowed); ASSERT(isStackingContext()); #if ASSERT_ENABLED updateStackingParentForZOrderLists(0); #endif if (m_posZOrderList) m_posZOrderList->clear(); if (m_negZOrderList) m_negZOrderList->clear(); m_zOrderListsDirty = true; if (!renderer()->documentBeingDestroyed()) compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); }
void PaintLayerStackingNode::dirtyZOrderLists() { #if DCHECK_IS_ON() DCHECK(m_layerListMutationAllowed); #endif DCHECK(isStackingContext()); #if ENABLE(ASSERT) updateStackingParentForZOrderLists(0); #endif if (m_posZOrderList) m_posZOrderList->clear(); if (m_negZOrderList) m_negZOrderList->clear(); m_zOrderListsDirty = true; if (!layoutObject()->documentBeingDestroyed()) compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); }
void RenderLayerStackingNode::rebuildZOrderLists() { ASSERT(m_layerListMutationAllowed); ASSERT(isDirtyStackingContext()); for (RenderLayer* child = layer()->firstChild(); child; child = child->nextSibling()) { if (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionLayer() != child) child->stackingNode()->collectLayers(m_posZOrderList, m_negZOrderList); } // Sort the two lists. if (m_posZOrderList) std::stable_sort(m_posZOrderList->begin(), m_posZOrderList->end(), compareZIndex); if (m_negZOrderList) std::stable_sort(m_negZOrderList->begin(), m_negZOrderList->end(), compareZIndex); // Append layers for top layer elements after normal layer collection, to ensure they are on top regardless of z-indexes. // The renderers of top layer elements are children of the view, sorted in top layer stacking order. if (layer()->isRootLayer()) { RenderView* view = renderer()->view(); for (RenderObject* child = view->firstChild(); child; child = child->nextSibling()) { Element* childElement = (child->node() && child->node()->isElementNode()) ? toElement(child->node()) : 0; if (childElement && childElement->isInTopLayer()) { RenderLayer* layer = toRenderLayerModelObject(child)->layer(); // Create the buffer if it doesn't exist yet. if (!m_posZOrderList) m_posZOrderList = adoptPtr(new Vector<RenderLayerStackingNode*>); m_posZOrderList->append(layer->stackingNode()); } } } #if ASSERT_ENABLED updateStackingParentForZOrderLists(this); #endif m_zOrderListsDirty = false; }
void RenderLayerStackingNode::dirtyZOrderLists() { ASSERT(m_layerListMutationAllowed); ASSERT(isStackingContainer()); #if !ASSERT_DISABLED updateStackingParentForZOrderLists(0); #endif if (m_posZOrderList) m_posZOrderList->clear(); if (m_negZOrderList) m_negZOrderList->clear(); m_zOrderListsDirty = true; m_descendantsAreContiguousInStackingOrderDirty = true; if (!renderer()->documentBeingDestroyed()) { compositor()->setNeedsUpdateCompositingRequirementsState(); compositor()->setCompositingLayersNeedRebuild(); if (layer()->acceleratedCompositingForOverflowScrollEnabled()) compositor()->setNeedsToRecomputeCompositingRequirements(); } }