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

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

Issue 2401343002: Tracking filter mutation via SVGElementProxy (Closed)
Patch Set: referenceChanged -> proxiedElementChanged Created 4 years, 2 months 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/SVGDocumentExtensions.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
index 1e32b5af0aa4d5eee53792f1f7a28bcca7fcee17..fa1740a298a9ca71eef62d16f510d548eec224ad 100644
--- a/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp
@@ -23,7 +23,7 @@
#include "core/dom/Document.h"
#include "core/inspector/ConsoleMessage.h"
-#include "core/layout/svg/SVGResourcesCache.h"
+#include "core/svg/SVGElementProxy.h"
#include "core/svg/SVGSVGElement.h"
#include "core/svg/animation/SMILTimeContainer.h"
#include "wtf/AutoReset.h"
@@ -151,6 +151,21 @@ void SVGDocumentExtensions::reportError(const String& message) {
m_document->addConsoleMessage(consoleMessage);
}
+void SVGDocumentExtensions::attachPendingProxy(SVGElementProxy& elementProxy) {
+ DCHECK(!elementProxy.id().isEmpty());
+ auto result = m_pendingProxies.add(elementProxy.id(), nullptr);
+ if (result.isNewEntry)
+ result.storedValue->value = new SVGElementProxySet;
+ result.storedValue->value->add(elementProxy);
+}
+
+void SVGDocumentExtensions::invalidatePendingProxies(const AtomicString& id) {
+ if (id.isEmpty())
+ return;
+ if (auto pendingProxies = m_pendingProxies.take(id))
+ pendingProxies->invalidateProxies();
+}
+
void SVGDocumentExtensions::addPendingResource(const AtomicString& id,
Element* element) {
ASSERT(element);
@@ -360,6 +375,7 @@ DEFINE_TRACE(SVGDocumentExtensions) {
visitor->trace(m_timeContainers);
visitor->trace(m_webAnimationsPendingSVGElements);
visitor->trace(m_relativeLengthSVGRoots);
+ visitor->trace(m_pendingProxies);
visitor->trace(m_pendingResources);
visitor->trace(m_pendingResourcesForRemoval);
}

Powered by Google App Engine
This is Rietveld 408576698