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

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

Issue 2484153003: Use an SVGElementProxy in ReferenceClipPathOperation (Closed)
Patch Set: Rebase 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..d0923212c5535d866e7acaee33a8b150efe5c389 100644
--- a/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
+++ b/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
@@ -28,8 +28,11 @@ LayoutSVGResourceClipper* resolveElementReference(
}
// 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());
+ Node* targetNode = layoutObject.node();
+ if (!targetNode)
+ return nullptr;
+ SVGElement* element = referenceClipPathOperation.elementProxy().findElement(
+ targetNode->treeScope());
if (!isSVGClipPathElement(element) || !element->layoutObject())
return nullptr;
return toLayoutSVGResourceClipper(

Powered by Google App Engine
This is Rietveld 408576698