Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp

Issue 1798263002: Rename isTreatedAsOrStackingContext to isStacked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Markdown, isStacked, paintAllPhasesAtomically Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp b/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
index 03883ee8f4a183607df7634b3cb0d24eef224dc4..d16d3a2e9934b9454de894ff9252a71d32f6c2bf 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerStackingNode.cpp
@@ -61,7 +61,7 @@ PaintLayerStackingNode::PaintLayerStackingNode(PaintLayer* layer)
, m_stackingParent(0)
#endif
{
- m_isTreatedAsOrStackingContext = shouldBeTreatedAsOrStackingContext();
+ m_isStacked = shouldStackObject(*layoutObject());
chrishtr 2016/03/16 16:26:16 Why is this code caching shouldStackObject(*layout
Xianzhu 2016/03/16 18:10:24 According to the comment for PaintLayerStackingNod
chrishtr 2016/03/16 18:15:09 Ok then I suggest renaming updateIsStacked to styl
Xianzhu 2016/03/16 21:28:41 The static shouldStackObject was also for another
// Non-stacking contexts should have empty z-order lists. As this is already the case,
// there is no need to dirty / recompute these lists.
@@ -161,7 +161,7 @@ void PaintLayerStackingNode::collectLayers(OwnPtr<Vector<PaintLayerStackingNode*
if (layer()->isInTopLayer())
return;
- if (isTreatedAsOrStackingContext()) {
+ if (isStacked()) {
OwnPtr<Vector<PaintLayerStackingNode*>>& buffer = (zIndex() >= 0) ? posBuffer : negBuffer;
if (!buffer)
buffer = adoptPtr(new Vector<PaintLayerStackingNode*>);
@@ -234,13 +234,13 @@ void PaintLayerStackingNode::updateStackingNodesAfterStyleChange(const ComputedS
clearZOrderLists();
}
-void PaintLayerStackingNode::updateIsTreatedAsStackingContext()
+void PaintLayerStackingNode::updateIsStacked()
{
- bool isTreatedAsOrStackingContext = shouldBeTreatedAsOrStackingContext();
- if (isTreatedAsOrStackingContext == this->isTreatedAsOrStackingContext())
+ bool isStackedContent = shouldStackObject(*layoutObject());
+ if (isStackedContent == m_isStacked)
return;
- m_isTreatedAsOrStackingContext = isTreatedAsOrStackingContext;
+ m_isStacked = isStackedContent;
if (!layoutObject()->documentBeingDestroyed() && !layer()->isRootLayer())
compositor()->setNeedsCompositingUpdate(CompositingUpdateRebuildTree);
dirtyStackingContextZOrderLists();

Powered by Google App Engine
This is Rietveld 408576698