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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.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/layout/svg/LayoutSVGTextPath.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp
index 3dd74c0c2ba04a47c22942ab984e0b0fe126c089..8c7e618aed508cf3e7b9d674a10ab9e04e803d72 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp
@@ -27,12 +27,6 @@
namespace blink {
-TreeScope& treeScopeForIdResolution(const SVGElement& element) {
- if (SVGElement* correspondingElement = element.correspondingElement())
- return correspondingElement->treeScope();
- return element.treeScope();
-}
-
PathPositionMapper::PathPositionMapper(const Path& path)
: m_positionCalculator(path), m_pathLength(path.length()) {}
@@ -63,7 +57,7 @@ bool LayoutSVGTextPath::isChildAllowed(LayoutObject* child,
std::unique_ptr<PathPositionMapper> LayoutSVGTextPath::layoutPath() const {
const SVGTextPathElement& textPathElement = toSVGTextPathElement(*node());
Element* targetElement = SVGURIReference::targetElementFromIRIString(
- textPathElement.hrefString(), treeScopeForIdResolution(textPathElement));
+ textPathElement.hrefString(), textPathElement.treeScopeForIdResolution());
if (!isSVGPathElement(targetElement))
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698