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..f3de765331198669b805c38201d0ec7ebff523c3 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
@@ -53,12 +53,17 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr |
} else if (object == context.paintInvalidationContainer) { |
result = LayoutRect(rect); |
} else { |
+ rect.moveBy(FloatPoint(context.treeBuilderContext.current.paintOffset)); |
+ |
+ // In SPv2, visual rects are in the space of their local transform node. |
+ if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
+ return LayoutRect(rect); |
+ |
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); |