| 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..3bbcc2e917661d6565f3324356e66679f12d6269 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
|
| @@ -138,17 +138,11 @@ 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();
|
| - // TODO(fs): Doesn't work with forward or external SVG references
|
| - // (crbug.com/391604, crbug.com/109212, ...)
|
| - return ReferenceClipPathOperation::create(toCSSURIValue(value).value(),
|
| - fragmentIdentifier);
|
| + const CSSURIValue& urlValue = toCSSURIValue(value);
|
| + SVGElementProxy& elementProxy =
|
| + state.elementStyleResources().cachedOrPendingFromValue(urlValue);
|
| + // TODO(fs): Doesn't work with external SVG references (crbug.com/109212.)
|
| + return ReferenceClipPathOperation::create(urlValue.value(), elementProxy);
|
| }
|
| DCHECK(value.isIdentifierValue() &&
|
| toCSSIdentifierValue(value).getValueID() == CSSValueNone);
|
|
|