| Index: third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| index 7145cd021f04537b6e4252f12e2a21a94ae671b9..c274849beca90b56a0704b274f99e9f5b4e5f015 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| @@ -332,6 +332,8 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
|
| context.oldLocation = objectPaintInvalidator.previousLocationInBacking();
|
| context.newVisualRect = computeVisualRectInBacking(object, context);
|
| context.newLocation = computeLocationInBacking(object, context);
|
| + context.oldPaintOffset = object.previousPaintOffset();
|
| + context.newPaintOffset = context.treeBuilderContext.current.paintOffset;
|
|
|
| IntSize adjustment = object.scrollAdjustmentForPaintInvalidation(
|
| *context.paintInvalidationContainer);
|
| @@ -340,6 +342,7 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
|
|
|
| object.getMutableForPainting().setPreviousVisualRect(context.newVisualRect);
|
| objectPaintInvalidator.setPreviousLocationInBacking(context.newLocation);
|
| + object.getMutableForPainting().setPreviousPaintOffset(context.newPaintOffset);
|
| }
|
|
|
| void PaintInvalidator::invalidatePaintIfNeeded(
|
| @@ -418,9 +421,12 @@ void PaintInvalidator::invalidatePaintIfNeeded(
|
| break;
|
| }
|
|
|
| - if (context.oldLocation != context.newLocation)
|
| + if (context.oldLocation != context.newLocation ||
|
| + (RuntimeEnabledFeatures::slimmingPaintV2Enabled() &&
|
| + context.oldPaintOffset != context.newPaintOffset)) {
|
| context.forcedSubtreeInvalidationFlags |=
|
| PaintInvalidatorContext::ForcedSubtreeInvalidationChecking;
|
| + }
|
|
|
| // TODO(crbug.com/490725): This is a workaround for the bug, to force
|
| // descendant to update visual rects on clipping change.
|
|
|