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

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

Issue 2107903002: Repaint non-stacking-context composited children when they scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. 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 69b4f09c12fbe2783e0f2dacbb400bba0cb26054..f60dc43c72226d520595bbbe3533dd8dc2f76350 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -139,7 +139,6 @@ PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject)
, m_hasVisibleContent(false)
, m_visibleDescendantStatusDirty(false)
, m_hasVisibleDescendant(false)
- , m_hasVisibleNonLayerContent(false)
#if ENABLE(ASSERT)
, m_needsPositionUpdate(true)
#endif
@@ -150,7 +149,7 @@ PaintLayer::PaintLayer(LayoutBoxModelObject* layoutObject)
, m_needsDescendantDependentCompositingInputsUpdate(true)
, m_childNeedsCompositingInputsUpdate(true)
, m_hasCompositingDescendant(false)
- , m_hasNonCompositedChild(false)
+ , m_isAllScrollingContentComposited(false)
, m_shouldIsolateCompositedDescendants(false)
, m_lostGroupedMapping(false)
, m_needsRepaint(false)
@@ -634,18 +633,22 @@ void PaintLayer::dirtyAncestorChainVisibleDescendantStatus()
void PaintLayer::updateScrollingStateAfterCompositingChange()
{
TRACE_EVENT0("blink", "PaintLayer::updateScrollingStateAfterCompositingChange");
- m_hasVisibleNonLayerContent = false;
+ m_isAllScrollingContentComposited = true;
for (LayoutObject* r = layoutObject()->slowFirstChild(); r; r = r->nextSibling()) {
if (!r->hasLayer()) {
- m_hasVisibleNonLayerContent = true;
- break;
+ m_isAllScrollingContentComposited = false;
+ return;
}
}
- m_hasNonCompositedChild = false;
for (PaintLayer* child = firstChild(); child; child = child->nextSibling()) {
if (child->compositingState() == NotComposited) {
- m_hasNonCompositedChild = true;
+ m_isAllScrollingContentComposited = false;
+ return;
+ } else if (!child->stackingNode()->isStackingContext()) {
+ // If the child is composited, but not a stacking context, it may paint
+ // negative z-index descendants into an ancestor's GraphicsLayer.
chrishtr 2016/06/28 22:33:06 Couldn't this happen for positive z-index also? Wh
skobes 2016/06/28 22:55:52 The child's normal flow and positive z-index conte
+ m_isAllScrollingContentComposited = false;
return;
}
}
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698