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..084bf3125facda179949a538cd29ca003a29af4e 100644 |
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp |
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTextPath.cpp |
@@ -60,8 +60,17 @@ bool LayoutSVGTextPath::isChildAllowed(LayoutObject* child, const ComputedStyle& |
PassOwnPtr<PathPositionMapper> LayoutSVGTextPath::layoutPath() const |
{ |
const SVGTextPathElement& textPathElement = toSVGTextPathElement(*node()); |
- Element* targetElement = SVGURIReference::targetElementFromIRIString( |
- textPathElement.hrefString(), textPathElement.treeScope()); |
+ Element* targetElement; |
+ if (textPathElement.inUseShadowTree()) { |
fs
2016/03/14 12:54:10
I think we could simplify this a bit (and preferab
hyunjunekim2
2016/03/15 23:11:32
Done.
|
+ SVGElement* correspondingElement = textPathElement.correspondingElement(); |
+ if (correspondingElement && isSVGTextPathElement(correspondingElement)) { |
+ targetElement = SVGURIReference::targetElementFromIRIString( |
+ textPathElement.hrefString(), correspondingElement->treeScope()); |
+ } |
+ } else { |
+ targetElement = SVGURIReference::targetElementFromIRIString( |
+ textPathElement.hrefString(), textPathElement.treeScope()); |
+ } |
if (!isSVGPathElement(targetElement)) |
return nullptr; |