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

Unified Diff: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
index ca04994e55a7fc4f223d8d7ac6da85e2e6ed7c81..42c9c97d87b74a2e1a6920aee4b97e68c6b7608f 100644
--- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -31,8 +31,8 @@
#include "core/dom/TaskRunnerHelper.h"
#include "core/events/Event.h"
#include "core/events/EventListener.h"
-#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGSVGElement.h"
+#include "core/svg/SVGTreeScopeResources.h"
#include "core/svg/SVGURIReference.h"
#include "core/svg/animation/SMILTimeContainer.h"
#include "platform/heap/Handle.h"
@@ -208,12 +208,12 @@ void SVGSMILElement::buildPendingResource() {
if (!svgTarget) {
// Do not register as pending if we are already pending this resource.
- if (document().accessSVGExtensions().isElementPendingResource(this, id))
+ if (treeScope().ensureSVGTreeScopedResources().isElementPendingResource(
+ this, id))
return;
-
if (!id.isEmpty()) {
- document().accessSVGExtensions().addPendingResource(id, this);
- ASSERT(hasPendingResources());
+ treeScope().ensureSVGTreeScopedResources().addPendingResource(id, this);
+ DCHECK(hasPendingResources());
}
} else {
// Register us with the target in the dependencies map. Any change of
@@ -570,9 +570,11 @@ void SVGSMILElement::connectEventBaseConditions() {
SVGElement* eventBase = eventBaseFor(*condition);
if (!eventBase) {
if (!condition->baseID().isEmpty() &&
- !document().accessSVGExtensions().isElementPendingResource(
- this, AtomicString(condition->baseID())))
- document().accessSVGExtensions().addPendingResource(
+ !treeScope()
+ .ensureSVGTreeScopedResources()
+ .isElementPendingResource(this,
+ AtomicString(condition->baseID())))
+ treeScope().ensureSVGTreeScopedResources().addPendingResource(
AtomicString(condition->baseID()), this);
continue;
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698