Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| index 01734e2a85d7ed7c39ebf1c170a2c1dcbaf86fc0..2bc1b5763ae677146a101c4f9cc7eb364dbc9144 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp |
| @@ -86,7 +86,7 @@ bool LayoutSVGResourceClipper::calculateClipContentPathIfNeeded() |
| continue; |
| const ComputedStyle* style = childLayoutObject->style(); |
| - if (!style || style->display() == NONE || style->visibility() != VISIBLE) |
| + if (!style || style->display() == NONE) |
|
fs
2016/04/19 10:17:27
I went looking through the various specs (CSS Mask
hyunjunekim2
2016/04/27 12:18:40
So Just check child of <use> element whether visib
|
| continue; |
| // Current shape in clip-path gets clipped too. Fallback to masking. |
| @@ -221,8 +221,12 @@ void LayoutSVGResourceClipper::calculateClipContentPaintInvalidationRect() |
| if (!layoutObject->isSVGShape() && !layoutObject->isSVGText() && !isSVGUseElement(*childElement)) |
| continue; |
| const ComputedStyle* style = layoutObject->style(); |
| - if (!style || style->display() == NONE || style->visibility() != VISIBLE) |
| + if (!style || style->display() == NONE) |
|
fs
2016/04/19 10:17:27
Same comment here as in calculateClipContentPathIf
hyunjunekim2
2016/04/27 12:18:40
Done.
|
| continue; |
| + |
| + if (isSVGUseElement(*childElement) && !toSVGUseElement(*childElement).isVisibleGraphicsElementForClipping()) |
| + continue; |
| + |
| m_clipBoundaries.unite(layoutObject->localToSVGParentTransform().mapRect(layoutObject->paintInvalidationRectInLocalSVGCoordinates())); |
| } |
| m_clipBoundaries = toSVGClipPathElement(element())->calculateAnimatedLocalTransform().mapRect(m_clipBoundaries); |