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

Unified Diff: third_party/WebKit/Source/core/paint/ClipPathClipper.cpp

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase; fix comments; findElement Created 4 years, 1 month 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/paint/ClipPathClipper.cpp
diff --git a/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp b/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
index d336ac44589121571929396a816a56f036122d0c..38e535df4edba09c42a77123b7c2c0ac5778338f 100644
--- a/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
@@ -26,10 +26,12 @@ LayoutSVGResourceClipper* resolveElementReference(
SVGResourcesCache::cachedResourcesForLayoutObject(&layoutObject);
return resources ? resources->clipper() : nullptr;
}
- // TODO(fs): It doesn't work with forward or external SVG references
- // (https://bugs.webkit.org/show_bug.cgi?id=90405)
- Element* element = layoutObject.document().getElementById(
- referenceClipPathOperation.fragment());
+ // TODO(fs): Doesn't work with external SVG references (crbug.com/109212.)
+ Node* targetNode = layoutObject.node();
+ if (!targetNode)
+ return nullptr;
+ SVGElement* element =
+ referenceClipPathOperation.findElement(targetNode->treeScope());
if (!isSVGClipPathElement(element) || !element->layoutObject())
return nullptr;
return toLayoutSVGResourceClipper(
« no previous file with comments | « third_party/WebKit/Source/core/paint/BUILD.gn ('k') | third_party/WebKit/Source/core/paint/FilterPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698