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 c250cac23558cf24e557f35ddb5115e285b29ca3..ed5fbe199eeb2c24ea5c431cd97d08a8137243e4 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| @@ -44,16 +44,19 @@ static LayoutRect mapLocalRectToPaintInvalidationBacking(GeometryMapper& geometr |
| // (see LayoutBoxModelObject.h) but we need them to be in physical |
| // coordinates. |
| FloatRect rect = localRect; |
| - if (object.isBox()) { |
| - toLayoutBox(object).flipForWritingMode(rect); |
| - } else if (!(context.forcedSubtreeInvalidationFlags & PaintInvalidatorContext::ForcedSubtreeSlowPathRect)) { |
| - // For SPv2 and the GeometryMapper path, we also need to convert the rect |
| - // for non-boxes into physical coordinates before applying paint offset. |
| - // (Otherwise we'll call mapToVisualrectInAncestorSpace() which requires |
| - // physical coordinates for boxes, but "physical coordinates with flipped |
| - // block-flow direction" for non-boxes for which we don't need to flip.) |
| - // TODO(wangxianzhu): Avoid containingBlock(). |
| - object.containingBlock()->flipForWritingMode(rect); |
| + // For non-root SVG, localRect is already in physical coordinates. |
| + if (!object.isSVG() || object.isSVGRoot()) { |
|
chrishtr
2016/09/29 16:41:59
Can you point me to the equivalent SPv1 code?
Xianzhu
2016/09/29 17:00:55
https://cs.chromium.org/chromium/src/third_party/W
|
| + if (object.isBox()) { |
| + toLayoutBox(object).flipForWritingMode(rect); |
| + } else if (!(context.forcedSubtreeInvalidationFlags & PaintInvalidatorContext::ForcedSubtreeSlowPathRect)) { |
| + // For SPv2 and the GeometryMapper path, we also need to convert the rect |
| + // for non-boxes into physical coordinates before applying paint offset. |
| + // (Otherwise we'll call mapToVisualrectInAncestorSpace() which requires |
| + // physical coordinates for boxes, but "physical coordinates with flipped |
| + // block-flow direction" for non-boxes for which we don't need to flip.) |
| + // TODO(wangxianzhu): Avoid containingBlock(). |
| + object.containingBlock()->flipForWritingMode(rect); |
| + } |
| } |
| if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |