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

Unified Diff: third_party/WebKit/Source/core/style/FilterOperation.cpp

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: Rebase 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/style/FilterOperation.cpp
diff --git a/third_party/WebKit/Source/core/style/FilterOperation.cpp b/third_party/WebKit/Source/core/style/FilterOperation.cpp
index 6308d7038524d54066c603caa56efdd43355da27..f72b6772bbe7e20daecd7910f0417521396756ce 100644
--- a/third_party/WebKit/Source/core/style/FilterOperation.cpp
+++ b/third_party/WebKit/Source/core/style/FilterOperation.cpp
@@ -25,6 +25,7 @@
#include "core/style/FilterOperation.h"
+#include "core/svg/SVGElementProxy.h"
#include "platform/LengthFunctions.h"
#include "platform/animation/AnimationUtilities.h"
#include "platform/graphics/filters/FEDropShadow.h"
@@ -44,6 +45,7 @@ FilterOperation* FilterOperation::blend(const FilterOperation* from,
}
DEFINE_TRACE(ReferenceFilterOperation) {
+ visitor->trace(m_elementProxy);
visitor->trace(m_filter);
FilterOperation::trace(visitor);
}
@@ -55,6 +57,26 @@ FloatRect ReferenceFilterOperation::mapRect(const FloatRect& rect) const {
return lastEffect->mapRect(rect);
}
+ReferenceFilterOperation::ReferenceFilterOperation(
+ const String& url,
+ SVGElementProxy& elementProxy)
+ : FilterOperation(REFERENCE), m_url(url), m_elementProxy(&elementProxy) {}
+
+void ReferenceFilterOperation::addClient(SVGResourceClient* client) {
+ m_elementProxy->addClient(client);
+}
+
+void ReferenceFilterOperation::removeClient(SVGResourceClient* client) {
+ m_elementProxy->removeClient(client);
+}
+
+bool ReferenceFilterOperation::operator==(const FilterOperation& o) const {
+ if (!isSameType(o))
+ return false;
+ const ReferenceFilterOperation& other = toReferenceFilterOperation(o);
+ return m_url == other.m_url && m_elementProxy == other.m_elementProxy;
+}
+
FilterOperation* BasicColorMatrixFilterOperation::blend(
const FilterOperation* from,
double progress) const {
« no previous file with comments | « third_party/WebKit/Source/core/style/FilterOperation.h ('k') | third_party/WebKit/Source/core/style/FilterOperations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698