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

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

Issue 1661523002: Update should paint flag when a float's composited scrolling status changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 290c713268fbc33814d313f91770026ee657b851..98cb2b53a7f2705affeb07151138da795c8b50ac 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -1407,7 +1407,13 @@ LayoutPoint PaintLayer::visualOffsetFromAncestor(const PaintLayer* ancestorLayer
void PaintLayer::didUpdateNeedsCompositedScrolling()
{
+ bool wasSelfPaintingLayer = m_isSelfPaintingLayer;
updateSelfPaintingLayer();
+
+ // If the floating object becomes non-self-painting, so some ancestor should paint it;
+ // if it becomes self-painting, it should paint itself and no ancestor should paint it.
+ if (wasSelfPaintingLayer != m_isSelfPaintingLayer && m_layoutObject->isFloating())
+ LayoutBlockFlow::setAncestorShouldPaintFloatingObject(*layoutBox(), wasSelfPaintingLayer);
}
void PaintLayer::updateReflectionInfo(const ComputedStyle* oldStyle)

Powered by Google App Engine
This is Rietveld 408576698