| 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 5562e3959948812d8387b6f8ccf2951aa0f331ac..261e9c4d7aff89e2b80a746a7afabd09d270c9cf 100644
|
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp
|
| @@ -26,6 +26,13 @@
|
|
|
| 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())
|
| @@ -61,7 +68,8 @@ PassOwnPtr<PathPositionMapper> LayoutSVGTextPath::layoutPath() const
|
| {
|
| const SVGTextPathElement& textPathElement = toSVGTextPathElement(*node());
|
| Element* targetElement = SVGURIReference::targetElementFromIRIString(
|
| - textPathElement.hrefString(), textPathElement.treeScope());
|
| + textPathElement.hrefString(), treeScopeForIdResolution(textPathElement));
|
| +
|
| if (!isSVGPathElement(targetElement))
|
| return nullptr;
|
|
|
|
|