Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
index 3380513a74a27304b088a1eb25d50dd26dc5031a..5f3a18518421c41949a1ecba958c1b99b9a7a178 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
@@ -348,20 +348,26 @@ LayoutRect LayoutSVGRoot::clippedOverflowRectForPaintInvalidation(const LayoutBo |
// Compute the paint invalidation rect in the parent coordinate space. |
LayoutRect rect(enclosingIntRect(paintInvalidationRect)); |
- LayoutReplaced::mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, paintInvalidationState); |
+ LayoutReplaced::mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, paintInvalidationState, false); |
return rect; |
} |
-void LayoutSVGRoot::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const |
+bool LayoutSVGRoot::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, int flags) const |
{ |
// Note that we don't apply the border-box transform here - it's assumed |
// that whoever called us has done that already. |
// Apply initial viewport clip |
- if (shouldApplyViewportClip()) |
- rect.intersect(LayoutRect(pixelSnappedBorderBoxRect())); |
+ if (shouldApplyViewportClip()) { |
+ if (flags & EdgeInclusive) { |
+ if (!rect.inclusiveIntersect(LayoutRect(pixelSnappedBorderBoxRect()))) |
+ return false; |
+ } else { |
+ rect.intersect(LayoutRect(pixelSnappedBorderBoxRect())); |
chrishtr
2016/03/22 17:25:49
early out?
szager1
2016/03/22 19:42:24
I'm hesitant to do that, because the call to Layou
|
+ } |
+ } |
- LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidationState); |
+ return LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidationState, flags); |
} |
// This method expects local CSS box coordinates. |