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

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

Issue 2307983002: Include scroll offset in scrolling contents painted background rect invalidation. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
index 81a301b5097852b9f51aed67aee644a216f7b286..3a7102b30e63b5ca5462b35bb4b1ae86a1f47bfa 100644
--- a/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/ObjectPaintInvalidator.cpp
@@ -228,7 +228,9 @@ void ObjectPaintInvalidator::setBackingNeedsPaintInvalidationInRect(const Layout
if (layer.compositedLayerMapping()->backgroundPaintsOntoScrollingContentsLayer()) {
// TODO(flackr): Get a correct rect in the context of the scrolling contents layer to update
// rather than updating the entire rect.
- const LayoutRect& scrollingContentsRect = toLayoutBox(m_object).layoutOverflowRect();
+ const LayoutBox& box = toLayoutBox(m_object);
+ LayoutRect scrollingContentsRect = box.layoutOverflowRect();
+ scrollingContentsRect.move(-box.scrolledContentOffset());
layer.compositedLayerMapping()->setScrollingContentsNeedDisplayInRect(scrollingContentsRect, reason, m_object);
layer.setNeedsRepaint();
invalidateDisplayItemClient(*layer.compositedLayerMapping()->scrollingContentsLayer(), reason);
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/composited-overflow-with-local-background-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698