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

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

Issue 2490163002: Reland of "Tracking reference filter mutation via SVGElementProxy" (Closed)
Patch Set: Fix double observer unregistration; simplify scope selection; add tests 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/SVGFilterElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGFilterElement.cpp b/third_party/WebKit/Source/core/svg/SVGFilterElement.cpp
index a3778e84a47fa8ceb38faba626a5d262e0e46a12..bdadc5039b374cc17290d0917c1be689dea9646e 100644
--- a/third_party/WebKit/Source/core/svg/SVGFilterElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGFilterElement.cpp
@@ -25,7 +25,7 @@
#include "core/frame/UseCounter.h"
#include "core/layout/svg/LayoutSVGResourceFilter.h"
-#include "core/svg/SVGResourceClient.h"
+#include "core/svg/SVGElementProxy.h"
namespace blink {
@@ -83,7 +83,7 @@ DEFINE_TRACE(SVGFilterElement) {
visitor->trace(m_height);
visitor->trace(m_filterUnits);
visitor->trace(m_primitiveUnits);
- visitor->trace(m_clientsToAdd);
+ visitor->trace(m_elementProxySet);
SVGElement::trace(visitor);
SVGURIReference::trace(visitor);
}
@@ -121,13 +121,7 @@ void SVGFilterElement::childrenChanged(const ChildrenChange& change) {
}
LayoutObject* SVGFilterElement::createLayoutObject(const ComputedStyle&) {
- LayoutSVGResourceFilter* layoutObject = new LayoutSVGResourceFilter(this);
-
- for (SVGResourceClient* client : m_clientsToAdd)
- layoutObject->addResourceClient(client);
- m_clientsToAdd.clear();
-
- return layoutObject;
+ return new LayoutSVGResourceFilter(this);
}
bool SVGFilterElement::selfHasRelativeLengths() const {
@@ -137,14 +131,10 @@ bool SVGFilterElement::selfHasRelativeLengths() const {
m_height->currentValue()->isRelative();
}
-void SVGFilterElement::addClient(SVGResourceClient* client) {
- ASSERT(client);
- m_clientsToAdd.add(client);
-}
-
-void SVGFilterElement::removeClient(SVGResourceClient* client) {
- ASSERT(client);
- m_clientsToAdd.remove(client);
+SVGElementProxySet& SVGFilterElement::elementProxySet() {
+ if (!m_elementProxySet)
+ m_elementProxySet = new SVGElementProxySet;
+ return *m_elementProxySet;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFilterElement.h ('k') | third_party/WebKit/Source/core/svg/SVGResourceClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698