Chromium Code Reviews| 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 d30a142cd29bc6525cb085b8b325e6d151538602..c4254a8d90a97b66aae2cfe310f83c63a119a312 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| @@ -20,12 +20,20 @@ |
| namespace blink { |
| -static void slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, LayoutRect& rect) |
| +static LayoutRect slowMapToVisualRectInAncestorSpace(const LayoutObject& object, const LayoutBoxModelObject& ancestor, const FloatRect& rect) |
| { |
| + if (object.isSVG() && !object.isSVGRoot()) { |
| + LayoutRect result; |
| + SVGLayoutSupport::mapToVisualRectInAncestorSpace(object, &ancestor, rect, result); |
|
pdr.
2016/09/14 22:42:39
If we override this in all SVG subclasses, will th
Xianzhu
2016/09/14 23:35:31
We didn't override mapToVisualRectInAncestorSpace
|
| + return result; |
| + } |
| + |
| + LayoutRect result(rect); |
| if (object.isLayoutView()) |
| - toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, rect, InputIsInFrameCoordinates, DefaultVisualRectFlags); |
| + toLayoutView(object).mapToVisualRectInAncestorSpace(&ancestor, result, InputIsInFrameCoordinates, DefaultVisualRectFlags); |
| else |
| - object.mapToVisualRectInAncestorSpace(&ancestor, rect); |
| + object.mapToVisualRectInAncestorSpace(&ancestor, result); |
| + return result; |
| } |
| // TODO(wangxianzhu): Combine this into PaintInvalidator::mapLocalRectToPaintInvalidationBacking() when removing PaintInvalidationState. |
| @@ -41,8 +49,7 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr |
| LayoutRect result; |
| if (context.forcedSubtreeInvalidationFlags & PaintInvalidatorContext::ForcedSubtreeSlowPathRect) { |
| - result = LayoutRect(rect); |
| - slowMapToVisualRectInAncestorSpace(object, *context.paintInvalidationContainer, result); |
| + result = slowMapToVisualRectInAncestorSpace(object, *context.paintInvalidationContainer, rect); |
| } else if (object == context.paintInvalidationContainer) { |
| result = LayoutRect(rect); |
| } else { |