Chromium Code Reviews| Index: Source/core/paint/DeprecatedPaintLayerStackingNode.cpp |
| diff --git a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp |
| index 83f947c472a1c49fb2c74f4950aa5bf393ba1a70..7a80b8e929a52053d582a52db26e26cc19c7aab7 100644 |
| --- a/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp |
| +++ b/Source/core/paint/DeprecatedPaintLayerStackingNode.cpp |
| @@ -56,7 +56,6 @@ namespace blink { |
| // layer about some of its state. |
| DeprecatedPaintLayerStackingNode::DeprecatedPaintLayerStackingNode(DeprecatedPaintLayer* layer) |
| : m_layer(layer) |
| - , m_normalFlowListDirty(true) |
| #if ENABLE(ASSERT) |
| , m_layerListMutationAllowed(true) |
| , m_stackingParent(0) |
| @@ -74,10 +73,8 @@ DeprecatedPaintLayerStackingNode::~DeprecatedPaintLayerStackingNode() |
| #if ENABLE(ASSERT) |
| if (!layoutObject()->documentBeingDestroyed()) { |
| ASSERT(!isInStackingParentZOrderLists()); |
| - ASSERT(!isInStackingParentNormalFlowList()); |
| updateStackingParentForZOrderLists(0); |
| - updateStackingParentForNormalFlowList(0); |
| } |
| #endif |
| } |
| @@ -119,22 +116,6 @@ void DeprecatedPaintLayerStackingNode::dirtyStackingContextZOrderLists() |
| stackingNode->dirtyZOrderLists(); |
| } |
| -void DeprecatedPaintLayerStackingNode::dirtyNormalFlowList() |
| -{ |
| - ASSERT(m_layerListMutationAllowed); |
| - |
| -#if ENABLE(ASSERT) |
| - updateStackingParentForNormalFlowList(0); |
| -#endif |
| - |
| - if (m_normalFlowList) |
| - m_normalFlowList->clear(); |
| - m_normalFlowListDirty = true; |
| - |
| - if (!layoutObject()->documentBeingDestroyed()) |
| - compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
| -} |
| - |
| void DeprecatedPaintLayerStackingNode::rebuildZOrderLists() |
| { |
| ASSERT(m_layerListMutationAllowed); |
| @@ -175,28 +156,6 @@ void DeprecatedPaintLayerStackingNode::rebuildZOrderLists() |
| m_zOrderListsDirty = false; |
| } |
| -void DeprecatedPaintLayerStackingNode::updateNormalFlowList() |
| -{ |
| - if (!m_normalFlowListDirty) |
| - return; |
| - |
| - ASSERT(m_layerListMutationAllowed); |
| - |
| - for (DeprecatedPaintLayer* child = layer()->firstChild(); child; child = child->nextSibling()) { |
| - if (!child->stackingNode()->isTreatedAsStackingContextForPainting() && (!layer()->reflectionInfo() || layer()->reflectionInfo()->reflectionLayer() != child)) { |
| - if (!m_normalFlowList) |
| - m_normalFlowList = adoptPtr(new Vector<DeprecatedPaintLayerStackingNode*>); |
| - m_normalFlowList->append(child->stackingNode()); |
| - } |
| - } |
| - |
| -#if ENABLE(ASSERT) |
| - updateStackingParentForNormalFlowList(this); |
| -#endif |
| - |
| - m_normalFlowListDirty = false; |
| -} |
| - |
| void DeprecatedPaintLayerStackingNode::collectLayers(OwnPtr<Vector<DeprecatedPaintLayerStackingNode*>>& posBuffer, OwnPtr<Vector<DeprecatedPaintLayerStackingNode*>>& negBuffer) |
| { |
| if (layer()->isInTopLayer()) |
| @@ -232,14 +191,6 @@ bool DeprecatedPaintLayerStackingNode::isInStackingParentZOrderLists() const |
| return false; |
| } |
| -bool DeprecatedPaintLayerStackingNode::isInStackingParentNormalFlowList() const |
| -{ |
| - if (!m_stackingParent || m_stackingParent->normalFlowListDirty()) |
| - return false; |
| - |
| - return (m_stackingParent->normalFlowList() && m_stackingParent->normalFlowList()->find(this) != kNotFound); |
| -} |
| - |
| void DeprecatedPaintLayerStackingNode::updateStackingParentForZOrderLists(DeprecatedPaintLayerStackingNode* stackingParent) |
| { |
| if (m_posZOrderList) { |
| @@ -253,26 +204,17 @@ void DeprecatedPaintLayerStackingNode::updateStackingParentForZOrderLists(Deprec |
| } |
| } |
| -void DeprecatedPaintLayerStackingNode::updateStackingParentForNormalFlowList(DeprecatedPaintLayerStackingNode* stackingParent) |
| -{ |
| - if (m_normalFlowList) { |
| - for (size_t i = 0; i < m_normalFlowList->size(); ++i) |
| - m_normalFlowList->at(i)->setStackingParent(stackingParent); |
| - } |
| -} |
| #endif |
| void DeprecatedPaintLayerStackingNode::updateLayerListsIfNeeded() |
| { |
| updateZOrderLists(); |
| - updateNormalFlowList(); |
| if (!layer()->reflectionInfo()) |
| return; |
| DeprecatedPaintLayer* reflectionLayer = layer()->reflectionInfo()->reflectionLayer(); |
| reflectionLayer->stackingNode()->updateZOrderLists(); |
| - reflectionLayer->stackingNode()->updateNormalFlowList(); |
| } |
| void DeprecatedPaintLayerStackingNode::updateStackingNodesAfterStyleChange(const ComputedStyle* oldStyle) |
| @@ -284,6 +226,7 @@ void DeprecatedPaintLayerStackingNode::updateStackingNodesAfterStyleChange(const |
| if (isStackingContext == wasStackingContext && oldZIndex == zIndex()) |
| return; |
| + |
|
dsinclair
2015/06/24 15:22:41
nit: remove blank line
Julien - ping for review
2015/06/24 16:51:57
Removed.
|
| dirtyStackingContextZOrderLists(); |
| if (isStackingContext) |
| @@ -299,8 +242,8 @@ void DeprecatedPaintLayerStackingNode::updateIsTreatedAsStackingContextForPainti |
| return; |
| m_isTreatedAsStackingContextForPainting = isTreatedAsStackingContextForPainting; |
| - if (DeprecatedPaintLayer* p = layer()->parent()) |
| - p->stackingNode()->dirtyNormalFlowList(); |
| + if (!layoutObject()->documentBeingDestroyed() && !layer()->isRootLayer()) |
|
dsinclair
2015/06/24 15:22:42
Is !isRootLayer equivalent to parent()?
Julien - ping for review
2015/06/24 16:51:57
It is and it's a lot more clearer what the intent
|
| + compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree); |
| dirtyStackingContextZOrderLists(); |
| } |