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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.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/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index d7f165302bd2963fe4db136bad08c947a0ca1f09..b55d04f2cc225d951ed21cc130661b1bd3fed1fc 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -138,17 +138,12 @@ PassRefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(
if (value.isBasicShapeValue())
return ShapeClipPathOperation::create(basicShapeForValue(state, value));
if (value.isURIValue()) {
- SVGURLReferenceResolver resolver(toCSSURIValue(value).value(),
- state.document());
- // If the reference is non-local, then the fragment will remain as a
- // null string, which makes the element lookup fail.
- AtomicString fragmentIdentifier;
- if (resolver.isLocal())
- fragmentIdentifier = resolver.fragmentIdentifier();
+ const CSSURIValue& urlValue = toCSSURIValue(value);
+ SVGElementProxy& elementProxy =
+ state.elementStyleResources().cachedOrPendingFromValue(urlValue);
// TODO(fs): Doesn't work with forward or external SVG references
pdr. 2016/11/15 04:14:35 I think the new id tracking technology may fix thi
fs 2016/11/15 14:10:56 I think the bit about 'forward' should be fixed, b
// (crbug.com/391604, crbug.com/109212, ...)
- return ReferenceClipPathOperation::create(toCSSURIValue(value).value(),
- fragmentIdentifier);
+ return ReferenceClipPathOperation::create(urlValue.value(), elementProxy);
}
DCHECK(value.isIdentifierValue() &&
toCSSIdentifierValue(value).getValueID() == CSSValueNone);

Powered by Google App Engine
This is Rietveld 408576698