| Index: Source/core/layout/LayoutObject.cpp
|
| diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
|
| index 6ddea1c970ff66b203ede634690f88b51eb529ca..605d5e05c6caa663014053fc37fc962c8f1f429c 100644
|
| --- a/Source/core/layout/LayoutObject.cpp
|
| +++ b/Source/core/layout/LayoutObject.cpp
|
| @@ -1292,6 +1292,14 @@ inline void LayoutObject::invalidateSelectionIfNeeded(const LayoutBoxModelObject
|
|
|
| LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation();
|
| LayoutRect newSelectionRect = selectionRectForPaintInvalidation(&paintInvalidationContainer);
|
| +
|
| + // 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 (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidationContainer != this) {
|
| + LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrolledContentOffset());
|
| + newSelectionRect.move(inverseOffset);
|
| + }
|
| +
|
| setPreviousSelectionRectForPaintInvalidation(newSelectionRect);
|
|
|
| if (RuntimeEnabledFeatures::slimmingPaintEnabled() && shouldInvalidateSelection())
|
| @@ -1370,6 +1378,7 @@ PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(PaintInvalidationS
|
| }
|
|
|
| fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBounds, newBounds);
|
| +
|
| return invalidationReason;
|
| }
|
|
|
|
|