Index: third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp |
index 3f889162dbd379bbb79f0cd78d6b9e386d4dafe7..897a64a8967d70435bf95378d01fae0e049b1c05 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp |
@@ -124,7 +124,16 @@ void SVGTextPathElement::buildPendingResource() |
return; |
AtomicString id; |
- Element* target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); |
+ Element* target = nullptr; |
+ |
+ if (inUseShadowTree()) { |
fs
2016/03/14 12:54:10
Not sure this is actually needed. When the "real"
hyunjunekim2
2016/03/15 23:11:32
Change before.
|
+ SVGElement* correspondingElement = this->correspondingElement(); |
+ if (correspondingElement) |
+ target = SVGURIReference::targetElementFromIRIString(hrefString(), correspondingElement->treeScope(), &id); |
+ } else { |
+ target = SVGURIReference::targetElementFromIRIString(hrefString(), treeScope(), &id); |
+ } |
+ |
if (!target) { |
// Do not register as pending if we are already pending this resource. |
if (document().accessSVGExtensions().isElementPendingResource(this, id)) |