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

Unified Diff: third_party/WebKit/Source/core/layout/svg/SVGResources.cpp

Issue 2322343003: Add support for <basic-shape> to 'clip-path' on SVG elements (Closed)
Patch Set: Update SPv2 expectations Created 4 years, 3 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/layout/svg/SVGResources.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
index 74f3c87a317d0f5ad6bb26fb6e57cfef1f5ddb54..fa1b08389fc9103c2451cde3009fe6ceca135c21 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGResources.cpp
@@ -214,10 +214,13 @@ std::unique_ptr<SVGResources> SVGResources::buildResources(const LayoutObject* o
std::unique_ptr<SVGResources> resources;
if (clipperFilterMaskerTags().contains(tagName)) {
- if (style.hasClipper()) {
- AtomicString id = style.clipperResource();
- if (!ensureResources(resources).setClipper(getLayoutSVGResourceById<LayoutSVGResourceClipper>(treeScope, id)))
- registerPendingResource(extensions, id, element);
+ if (ClipPathOperation* clipPathOperation = style.clipPath()) {
+ if (clipPathOperation->type() == ClipPathOperation::REFERENCE) {
+ const ReferenceClipPathOperation& clipPathReference = toReferenceClipPathOperation(*clipPathOperation);
+ AtomicString id = SVGURIReference::fragmentIdentifierFromIRIString(clipPathReference.url(), treeScope);
+ if (!ensureResources(resources).setClipper(getLayoutSVGResourceById<LayoutSVGResourceClipper>(treeScope, id)))
+ registerPendingResource(extensions, id, element);
+ }
}
if (computedStyle.hasFilter() && !object->isSVGRoot()) {

Powered by Google App Engine
This is Rietveld 408576698