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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2203123004: Don't adjust for scrolling of the ancestor, rather than un-adjusting for it later. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 4 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/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 78d02a87c11a1c59fab1f61efe381b2dd8aebd62..7dc0425c6ed59a1ad417592c8fb51bb7db353984 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1246,12 +1246,6 @@ void LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect) const
LayoutRect dirtyRectOnBacking = dirtyRect;
PaintLayer::mapRectToPaintInvalidationBacking(*this, paintInvalidationContainer, dirtyRectOnBacking);
- // Composited scrolling should not be included in the bounds of composited-scrolled items.
- if (compositedScrollsWithRespectTo(paintInvalidationContainer)) {
- LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
- dirtyRectOnBacking.move(inverseOffset);
- }
-
invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking, PaintInvalidationRectangle);
slowSetPaintingLayerNeedsRepaint();
@@ -1341,17 +1335,9 @@ inline void LayoutObject::invalidateSelectionIfNeeded(const LayoutBoxModelObject
LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation();
LayoutRect newSelectionRect = localSelectionRect();
- if (!newSelectionRect.isEmpty()) {
+ if (!newSelectionRect.isEmpty())
paintInvalidationState.mapLocalRectToPaintInvalidationBacking(newSelectionRect);
- // Composited scrolling should not be included in the bounds and position tracking, because the graphics layer backing the scroller
- // does not move on scroll.
- if (compositedScrollsWithRespectTo(paintInvalidationContainer)) {
- LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
- newSelectionRect.move(inverseOffset);
- }
- }
-
setPreviousSelectionRectForPaintInvalidation(newSelectionRect);
// TODO(wangxianzhu): Combine the following two conditions when removing LayoutView::doingFullPaintInvalidation().
@@ -1383,15 +1369,6 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalid
LayoutRect newBounds = paintInvalidationState.computePaintInvalidationRectInBacking();
LayoutPoint newLocation = RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() ? LayoutPoint() : paintInvalidationState.computePositionFromPaintInvalidationBacking();
- // Composited scrolling should not be included in the bounds and position tracking, because the graphics layer backing the scroller
- // does not move on scroll.
- // TODO(chrishtr): can we just avoid adding in the scroll in the first place in LayoutBox::mapScrollingContentsRectToBoxSpace?
- if (compositedScrollsWithRespectTo(paintInvalidationContainer)) {
- LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
- newLocation.move(inverseOffset);
- newBounds.move(inverseOffset);
- }
-
setPreviousPaintInvalidationRect(newBounds);
if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled())
setPreviousPositionFromPaintInvalidationBacking(newLocation);

Powered by Google App Engine
This is Rietveld 408576698