| 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 8fbbbcade8507a67a2784665b489e5ebeb50e85a..118d44f23564840deef1db7476b2b69b15b83d49 100644
|
| --- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
|
| @@ -659,14 +659,22 @@ void writeResources(TextStream& ts, const LayoutObject& object, int indent)
|
| ts << " " << clipper->resourceBoundingBox(&layoutObject) << "\n";
|
| }
|
| }
|
| - if (!svgStyle.filterResource().isEmpty()) {
|
| - if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<LayoutSVGResourceFilter>(object.document(), svgStyle.filterResource())) {
|
| - writeIndent(ts, indent);
|
| - ts << " ";
|
| - writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
|
| - ts << " ";
|
| - writeStandardPrefix(ts, *filter, 0);
|
| - ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
|
| + if (style.hasFilter()) {
|
| + const FilterOperations& filterOperations = style.filter();
|
| + if (filterOperations.size() == 1) {
|
| + const FilterOperation& filterOperation = *filterOperations.at(0);
|
| + if (filterOperation.type() == FilterOperation::REFERENCE) {
|
| + const auto& referenceFilterOperation = toReferenceFilterOperation(filterOperation);
|
| + AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(referenceFilterOperation.url(), object.document());
|
| + if (LayoutSVGResourceFilter* filter = getLayoutSVGResourceById<LayoutSVGResourceFilter>(object.document(), id)) {
|
| + writeIndent(ts, indent);
|
| + ts << " ";
|
| + writeNameAndQuotedValue(ts, "filter", id);
|
| + ts << " ";
|
| + writeStandardPrefix(ts, *filter, 0);
|
| + ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
|
| + }
|
| + }
|
| }
|
| }
|
| }
|
|
|