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

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

Issue 2529293012: Invalidate paint properties on paint offset changes (Closed)
Patch Set: Simpler fix for overflowclip Created 4 years 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/PaintLayerScrollableArea.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
index 8e0b0ca35395f3cac48297badb280244cc111290..8bf2a901878752fd92e0ee6a9b6073569023e5fd 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -442,6 +442,18 @@ void PaintLayerScrollableArea::updateScrollOffset(const ScrollOffset& newOffset,
box().setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants();
}
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ // The scrollOffsetTranslation paint property depends on the scroll offset.
+ // (see: PaintPropertyTreeBuilder.updateProperties(FrameView&,...) and
+ // PaintPropertyTreeBuilder.updateScrollAndScrollTranslation).
+ if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled() &&
+ layer()->isRootLayer()) {
+ frameView->setNeedsPaintPropertyUpdate();
+ } else {
+ box().setNeedsPaintPropertyUpdate();
+ }
+ }
+
// Schedule the scroll DOM event.
if (box().node())
box().node()->document().enqueueScrollEventForNode(box().node());
@@ -1671,6 +1683,12 @@ void PaintLayerScrollableArea::updateScrollableAreaSet(bool hasOverflow) {
if (didScrollOverflow == scrollsOverflow())
return;
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ // The scroll and scroll offset properties depend on |scrollsOverflow| (see:
+ // PaintPropertyTreeBuilder::updateScrollAndScrollTranslation).
+ box().setNeedsPaintPropertyUpdate();
+ }
+
if (m_scrollsOverflow) {
DCHECK(canHaveOverflowScrollbars(box()));
frameView->addScrollableArea(this);

Powered by Google App Engine
This is Rietveld 408576698