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..b69bb271828c243023509ad91953f28cb0bef8b1 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, bool edgeInclusive) 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 (edgeInclusive) { |
+ if (!rect.inclusiveIntersect(LayoutRect(pixelSnappedBorderBoxRect()))) |
+ return false; |
+ } else { |
+ rect.intersect(LayoutRect(pixelSnappedBorderBoxRect())); |
+ } |
+ } |
- LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidationState); |
+ return LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidationState, edgeInclusive); |
} |
// This method expects local CSS box coordinates. |