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..9f4452c54dd0344bde6243dca4ee4658dc204a07 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 SVGElementProxyTracker; |
+ result.storedValue->value->attachElementProxy(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); |
} |