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

Unified Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2633143002: SVG objects with same idrefs conflict when under different shadow root (Closed)
Patch Set: ensureSVGTreeScopedResources(); add comment Created 3 years, 11 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/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index c927d5529e62df2d6b7902397c038d70af440bc3..5f52c92144d85141dfb59891fc0fc83327efea8d 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -134,8 +134,8 @@
#include "core/page/scrolling/TopDocumentRootScrollerController.h"
#include "core/paint/PaintLayer.h"
#include "core/svg/SVGAElement.h"
-#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGElement.h"
+#include "core/svg/SVGTreeScopeResources.h"
#include "platform/EventDispatchForbiddenScope.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/CompositorMutableProperties.h"
@@ -1664,8 +1664,11 @@ void Element::removedFrom(ContainerNode* insertionPoint) {
if (this == document().cssTarget())
document().setCSSTarget(nullptr);
- if (hasPendingResources())
- document().accessSVGExtensions().removeElementFromPendingResources(this);
+ if (hasPendingResources()) {
+ treeScope()
+ .ensureSVGTreeScopedResources()
+ .removeElementFromPendingResources(this);
+ }
if (getCustomElementState() == CustomElementState::Custom)
CustomElement::enqueueDisconnectedCallback(this);

Powered by Google App Engine
This is Rietveld 408576698