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 d8e6e7f2eced417e7755414247171fb11726c4fa..1548ce74529415aef16c568b891e86847eda9134 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| @@ -33,11 +33,17 @@ static LayoutRect slowMapToVisualRectInAncestorSpace( |
| } |
| LayoutRect result(rect); |
| - if (object.isLayoutView()) |
| - toLayoutView(object).mapToVisualRectInAncestorSpace( |
| - &ancestor, result, InputIsInFrameCoordinates, DefaultVisualRectFlags); |
| - else |
| - object.mapToVisualRectInAncestorSpace(&ancestor, result); |
| + if (object.isLayoutView()) { |
| + TransformState transformState(TransformState::ApplyTransformDirection, |
| + FloatQuad(FloatRect(rect))); |
| + toLayoutView(object).mapToVisualRectInAncestorSpaceInternal( |
| + &ancestor, transformState, InputIsInFrameCoordinates, |
| + DefaultVisualRectFlags); |
| + transformState.flatten(); |
| + return LayoutRect(transformState.lastPlanarQuad().boundingBox()); |
|
Xianzhu
2017/03/03 01:24:42
Can you wrap the above code into LayoutView::mapTo
chrishtr
2017/03/03 02:45:11
Done.
|
| + } |
| + |
| + object.mapToVisualRectInAncestorSpace(&ancestor, result); |
| return result; |
| } |