Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp |
| index 969a6c3c16ed46a72aaae0e5d1aa7fc8f655a069..bb293f68bc6d8a85aebbcc7af25a26a60099b0f0 100644 |
| --- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp |
| @@ -105,7 +105,7 @@ static bool isAncestorOfOrEqualTo(const ClipPaintPropertyNode* a, |
| return b == a; |
| } |
| -ClipRect PrePaintTreeWalk::clipRectForContext( |
| +FloatClipRect PrePaintTreeWalk::clipRectForContext( |
| const PaintPropertyTreeBuilderContext::ContainingBlockContext& context, |
| const EffectPaintPropertyNode* effect, |
| const PropertyTreeState& ancestorState, |
| @@ -115,20 +115,16 @@ ClipRect PrePaintTreeWalk::clipRectForContext( |
| // actually an ancestor clip. This ensures no accuracy issues due to |
| // transforms applied to infinite rects. |
| if (isAncestorOfOrEqualTo(context.clip, ancestorState.clip())) |
|
wkorman
2017/02/16 21:45:32
Do we have existing tests that cover this logic? P
chrishtr
2017/02/16 23:48:32
Yes, but they are layout tests. The situation happ
|
| - return ClipRect(LayoutRect(LayoutRect::infiniteIntRect())); |
| + return FloatClipRect(); |
| hasClip = true; |
| PropertyTreeState localState(context.transform, context.clip, effect); |
| - // TODO(chrishtr): remove need for this. |
| - LayoutRect localRect(LayoutRect::infiniteIntRect()); |
| + FloatClipRect rect( |
| + m_geometryMapper.sourceToDestinationClipRect(localState, ancestorState)); |
| - LayoutRect rect(m_geometryMapper |
| - .sourceToDestinationVisualRect(FloatRect(localRect), |
| - localState, ancestorState) |
| - .rect()); |
| - rect.moveBy(-ancestorPaintOffset); |
| + rect.moveBy(-FloatPoint(ancestorPaintOffset)); |
| return rect; |
| } |