| 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 aa55dfe1c312776d07347f847a1a530cbc0d958a..be05bd7667b0e4bc938904da9595020d0faa96d1 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
|
| @@ -47,18 +47,25 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr
|
| if (object.isBox())
|
| toLayoutBox(object).flipForWritingMode(rect);
|
|
|
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
|
| + // In SPv2, visual rects are in the space of their local transform node.
|
| + rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
|
| + return LayoutRect(rect);
|
| + }
|
| +
|
| LayoutRect result;
|
| if (context.forcedSubtreeInvalidationFlags & PaintInvalidatorContext::ForcedSubtreeSlowPathRect) {
|
| result = slowMapToVisualRectInAncestorSpace(object, *context.paintInvalidationContainer, rect);
|
| } else if (object == context.paintInvalidationContainer) {
|
| result = LayoutRect(rect);
|
| } else {
|
| + rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
|
| +
|
| GeometryPropertyTreeState currentTreeState(context.treeBuilderContext.current.transform, context.treeBuilderContext.current.clip, context.treeBuilderContext.currentEffect);
|
| GeometryPropertyTreeState containerTreeState;
|
| const ObjectPaintProperties* containerPaintProperties = context.paintInvalidationContainer->objectPaintProperties();
|
| containerPaintProperties->getContentsProperties(containerTreeState);
|
|
|
| - rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset));
|
| bool success = false;
|
| result = LayoutRect(geometryMapper.mapToVisualRectInDestinationSpace(rect, currentTreeState, containerTreeState, success));
|
| DCHECK(success);
|
|
|