Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: third_party/WebKit/Source/core/svg/SVGElementProxy.cpp

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase; fix comments; findElement Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElementProxy.h ('k') | third_party/WebKit/Source/core/svg/SVGElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698