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

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

Issue 2529293012: Invalidate paint properties on paint offset changes (Closed)
Patch Set: Fix transform underinvalidation, skip several spinvalidation skips 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 21ca56bf379e6ffeed9cc33804555fc0ee99ec8c..a6adbe381105a5087e2a60c4f45c7312390da0fa 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -444,6 +444,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());
@@ -1673,6 +1685,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