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 87c93ac48dd594150746a88520377a84dd817d9c..033d2c5292040e9c2dab4c96ef379cea1d174522 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp |
@@ -63,8 +63,10 @@ |
#include "core/svg/SVGRadialGradientElement.h" |
#include "core/svg/SVGRectElement.h" |
#include "core/svg/SVGStopElement.h" |
+#include "core/svg/graphics/filters/SVGFilterBuilder.h" |
#include "platform/graphics/DashArray.h" |
#include "platform/graphics/GraphicsTypes.h" |
+#include "platform/graphics/filters/SourceGraphic.h" |
#include <math.h> |
#include <memory> |
@@ -511,10 +513,10 @@ void writeSVGResourceContainer(TextStream& ts, const LayoutObject& object, int i |
// Creating a placeholder filter which is passed to the builder. |
FloatRect dummyRect; |
RefPtrWillBeRawPtr<Filter> dummyFilter = Filter::create(dummyRect, dummyRect, 1, Filter::BoundingBox); |
- if (RefPtrWillBeRawPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilter.get())) { |
- if (FilterEffect* lastEffect = builder->lastEffect()) |
- lastEffect->externalRepresentation(ts, indent + 1); |
- } |
+ SVGFilterBuilder builder(dummyFilter->sourceGraphic()); |
+ builder.buildGraph(dummyFilter.get(), toSVGFilterElement(*filter->element()), dummyRect); |
+ if (FilterEffect* lastEffect = builder.lastEffect()) |
+ lastEffect->externalRepresentation(ts, indent + 1); |
} else if (resource->resourceType() == ClipperResourceType) { |
writeNameValuePair(ts, "clipPathUnits", toLayoutSVGResourceClipper(resource)->clipPathUnits()); |
ts << "\n"; |