| Index: third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
|
| index f1152386d922c205c134e28a2a6205bf1992d839..b01fd531d43f2bb1e262a5efbed45009b748a598 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp
|
| @@ -92,6 +92,11 @@ FloatRect GeometryMapper::localToAncestorVisualRectInternal(
|
| return rect;
|
| }
|
|
|
| + if (localState.effect() != ancestorState.effect()) {
|
| + return slowLocalToAncestorVisualRectWithEffects(rect, localState,
|
| + ancestorState, success);
|
| + }
|
| +
|
| const auto& transformMatrix = localToAncestorMatrixInternal(
|
| localState.transform(), ancestorState.transform(), success);
|
| if (!success)
|
| @@ -117,6 +122,37 @@ FloatRect GeometryMapper::localToAncestorVisualRectInternal(
|
| return mappedRect;
|
| }
|
|
|
| +FloatRect GeometryMapper::slowLocalToAncestorVisualRectWithEffects(
|
| + const FloatRect& rect,
|
| + const PropertyTreeState& localState,
|
| + const PropertyTreeState& ancestorState,
|
| + bool& success) {
|
| + PropertyTreeState lastTransformAndClipState(
|
| + localState.transform(), localState.clip(), nullptr, nullptr);
|
| + FloatRect result = rect;
|
| +
|
| + for (const auto* effect = localState.effect();
|
| + effect && effect != ancestorState.effect(); effect = effect->parent()) {
|
| + if (!effect->hasFilterThanMovesPixels())
|
| + continue;
|
| +
|
| + PropertyTreeState transformAndClipState(
|
| + effect->localTransformSpace(), effect->outputClip(), nullptr, nullptr);
|
| + result = sourceToDestinationVisualRectInternal(
|
| + result, lastTransformAndClipState, transformAndClipState, success);
|
| + if (!success)
|
| + return result;
|
| +
|
| + result = effect->mapRect(result);
|
| + lastTransformAndClipState = transformAndClipState;
|
| + }
|
| +
|
| + PropertyTreeState finalTransformAndClipState(
|
| + ancestorState.transform(), ancestorState.clip(), nullptr, nullptr);
|
| + return sourceToDestinationVisualRectInternal(
|
| + result, lastTransformAndClipState, finalTransformAndClipState, success);
|
| +}
|
| +
|
| FloatRect GeometryMapper::localToAncestorRect(
|
| const FloatRect& rect,
|
| const TransformPaintPropertyNode* localTransformNode,
|
|
|