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

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

Issue 2060053002: Set paintingLayerNeedsRepaint() in layout tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Set paintingLayerNeedsRepaint() in layout tree Created 4 years, 6 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/PaintLayer.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
index f4eeee797ae5a8b7ea851523977fe9e47e919e80..4f935a170985cdeb511e572fbf76317cbb8921bd 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -809,7 +809,7 @@ void PaintLayer::updateLayerPosition()
}
if (m_location != localPoint) {
- setNeedsRepaint();
+ layoutObject()->setPaintingLayerNeedsRepaint();
}
m_location = localPoint;
@@ -1197,7 +1197,7 @@ void PaintLayer::addChild(PaintLayer* child, PaintLayer* beforeChild)
dirtyAncestorChainVisibleDescendantStatus();
dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
- child->setNeedsRepaint();
+ child->layoutObject()->setPaintingLayerNeedsRepaint();
child->updateDescendantDependentFlags();
}
@@ -1246,7 +1246,7 @@ PaintLayer* PaintLayer::removeChild(PaintLayer* oldChild)
if (oldChild->enclosingPaginationLayer())
oldChild->clearPaginationRecursive();
- setNeedsRepaint();
+ layoutObject()->setPaintingLayerNeedsRepaint();
return oldChild;
}
@@ -1324,8 +1324,6 @@ void PaintLayer::insertOnlyThisLayerAfterStyleChange()
const LayoutBoxModelObject& previousPaintInvalidationContainer = layoutObject()->parent()->containerForPaintInvalidation();
if (!previousPaintInvalidationContainer.styleRef().isStackingContext()) {
layoutObject()->invalidatePaintIncludingNonSelfPaintingLayerDescendants(previousPaintInvalidationContainer);
- // Set needsRepaint along the original compositingContainer chain.
- layoutObject()->parent()->enclosingLayer()->setNeedsRepaint();
didSetPaintInvalidation = true;
}
}
@@ -2853,9 +2851,13 @@ void PaintLayer::computeSelfHitTestRects(LayerHitTestRects& rects) const
void PaintLayer::setNeedsRepaint()
{
- m_needsRepaint = true;
+ DCHECK(layoutObject()->document().lifecycle().state() == DocumentLifecycle::InPaintInvalidation
+ || layoutObject()->document().lifecycle().state() == DocumentLifecycle::InPrePaint);
+
+ if (m_needsRepaint)
+ return;
- // Do this unconditionally to ensure container chain is marked when compositing status of the layer changes.
+ m_needsRepaint = true;
markCompositingContainerChainForNeedsRepaint();
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintInvalidator.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698