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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScope.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/TreeScope.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScope.cpp b/third_party/WebKit/Source/core/dom/TreeScope.cpp
index e8e7ac68ecc9406940402174be05dc8e5b61774b..20c0f87fd42016a62c2ce63a050c633b8c3ad7d7 100644
--- a/third_party/WebKit/Source/core/dom/TreeScope.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScope.cpp
@@ -49,6 +49,7 @@
#include "core/layout/api/LayoutViewItem.h"
#include "core/page/FocusController.h"
#include "core/page/Page.h"
+#include "core/svg/SVGTreeScopeResources.h"
#include "wtf/Vector.h"
namespace blink {
@@ -297,6 +298,12 @@ HeapVector<Member<Element>> TreeScope::elementsFromPoint(int x, int y) const {
return elementsFromHitTestResult(result);
}
+SVGTreeScopeResources& TreeScope::ensureSVGTreeScopedResources() {
+ if (!m_svgTreeScopedResources)
+ m_svgTreeScopedResources = new SVGTreeScopeResources(this);
+ return *m_svgTreeScopedResources;
+}
+
DOMSelection* TreeScope::getSelection() const {
if (!rootNode().document().frame())
return nullptr;
@@ -525,6 +532,7 @@ DEFINE_TRACE(TreeScope) {
visitor->trace(m_imageMapsByName);
visitor->trace(m_scopedStyleResolver);
visitor->trace(m_radioButtonGroupScope);
+ visitor->trace(m_svgTreeScopedResources);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScope.h ('k') | third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698