Index: third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
index c3cf3bd0595e2a4006d91017c895e799a78d9612..12c5a38e8e8e30fbd9ac252e5d9c363c32d80613 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
@@ -649,14 +649,18 @@ void writeResources(TextStream& ts, const LayoutObject& object, int indent) |
ts << " " << masker->resourceBoundingBox(&object) << "\n"; |
} |
} |
- if (!svgStyle.clipperResource().isEmpty()) { |
- if (LayoutSVGResourceClipper* clipper = getLayoutSVGResourceById<LayoutSVGResourceClipper>(object.document(), svgStyle.clipperResource())) { |
- writeIndent(ts, indent); |
- ts << " "; |
- writeNameAndQuotedValue(ts, "clipPath", svgStyle.clipperResource()); |
- ts << " "; |
- writeStandardPrefix(ts, *clipper, 0); |
- ts << " " << clipper->resourceBoundingBox(object.objectBoundingBox()) << "\n"; |
+ if (ClipPathOperation* clipPathOperation = svgStyle.clipPath()) { |
+ if (clipPathOperation->type() == ClipPathOperation::REFERENCE) { |
+ const ReferenceClipPathOperation& clipPathReference = toReferenceClipPathOperation(*clipPathOperation); |
+ AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(clipPathReference.url(), object.document()); |
+ if (LayoutSVGResourceClipper* clipper = getLayoutSVGResourceById<LayoutSVGResourceClipper>(object.document(), id)) { |
+ writeIndent(ts, indent); |
+ ts << " "; |
+ writeNameAndQuotedValue(ts, "clipPath", id); |
+ ts << " "; |
+ writeStandardPrefix(ts, *clipper, 0); |
+ ts << " " << clipper->resourceBoundingBox(object.objectBoundingBox()) << "\n"; |
+ } |
} |
} |
if (style.hasFilter()) { |