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

Unified Diff: third_party/WebKit/Source/core/svg/SVGTextPathElement.cpp

Issue 1792673005: Fix textpath is not displayed on use element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/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))

Powered by Google App Engine
This is Rietveld 408576698