Index: third_party/WebKit/Source/core/layout/svg/SVGResources.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp |
index 74f3c87a317d0f5ad6bb26fb6e57cfef1f5ddb54..fa1b08389fc9103c2451cde3009fe6ceca135c21 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp |
@@ -214,10 +214,13 @@ std::unique_ptr<SVGResources> SVGResources::buildResources(const LayoutObject* o |
std::unique_ptr<SVGResources> resources; |
if (clipperFilterMaskerTags().contains(tagName)) { |
- if (style.hasClipper()) { |
- AtomicString id = style.clipperResource(); |
- if (!ensureResources(resources).setClipper(getLayoutSVGResourceById<LayoutSVGResourceClipper>(treeScope, id))) |
- registerPendingResource(extensions, id, element); |
+ if (ClipPathOperation* clipPathOperation = style.clipPath()) { |
+ if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { |
+ const ReferenceClipPathOperation& clipPathReference = toReferenceClipPathOperation(*clipPathOperation); |
+ AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(clipPathReference.url(), treeScope); |
+ if (!ensureResources(resources).setClipper(getLayoutSVGResourceById<LayoutSVGResourceClipper>(treeScope, id))) |
+ registerPendingResource(extensions, id, element); |
+ } |
} |
if (computedStyle.hasFilter() && !object->isSVGRoot()) { |