Index: third_party/WebKit/Source/core/svg/SVGElementProxy.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp b/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp |
index 596806569640bb0b2dcd41e6440f9b10cb783149..2d75aef4921ff996aba8e734dd556e988a910e61 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGElementProxy.cpp |
@@ -9,7 +9,6 @@ |
#include "core/fetch/FetchRequest.h" |
#include "core/fetch/ResourceFetcher.h" |
#include "core/svg/SVGElement.h" |
-#include "core/svg/SVGFilterElement.h" |
#include "core/svg/SVGResourceClient.h" |
namespace blink { |
@@ -157,8 +156,12 @@ SVGElement* SVGElementProxy::findElement(TreeScope& treeScope) { |
if (!lookupScope) |
return nullptr; |
if (Element* targetElement = lookupScope->getElementById(m_id)) { |
- if (isSVGFilterElement(*targetElement)) { |
- toSVGFilterElement(*targetElement).elementProxySet().add(*this); |
+ SVGElementProxySet* proxySet = |
+ targetElement->isSVGElement() |
+ ? toSVGElement(targetElement)->elementProxySet() |
+ : nullptr; |
+ if (proxySet) { |
+ proxySet->add(*this); |
return toSVGElement(targetElement); |
} |
} |