| Index: third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
|
| index acb37b61c1f19dbe7f880858260d579a289b51e2..c2792a69ada2a38de11952149d146e3dba7bcb6c 100644
|
| --- a/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
|
| @@ -4,12 +4,13 @@
|
|
|
| #include "core/animation/CSSPathInterpolationType.h"
|
|
|
| +#include <memory>
|
| #include "core/animation/PathInterpolationFunctions.h"
|
| +#include "core/animation/PathPropertyFunctions.h"
|
| #include "core/css/CSSIdentifierValue.h"
|
| #include "core/css/CSSPathValue.h"
|
| #include "core/css/resolver/StyleResolverState.h"
|
| #include "wtf/PtrUtil.h"
|
| -#include <memory>
|
|
|
| namespace blink {
|
|
|
| @@ -17,15 +18,17 @@ void CSSPathInterpolationType::applyStandardPropertyValue(
|
| const InterpolableValue& interpolableValue,
|
| const NonInterpolableValue* nonInterpolableValue,
|
| StyleResolverState& state) const {
|
| - DCHECK_EQ(cssProperty(), CSSPropertyD);
|
| std::unique_ptr<SVGPathByteStream> pathByteStream =
|
| PathInterpolationFunctions::appliedValue(interpolableValue,
|
| nonInterpolableValue);
|
| if (pathByteStream->isEmpty()) {
|
| - state.style()->setD(nullptr);
|
| + PathPropertyFunctions::setPath(cssProperty(), *state.style(), nullptr);
|
| +
|
| return;
|
| }
|
| - state.style()->setD(StylePath::create(std::move(pathByteStream)));
|
| + PathPropertyFunctions::setPath(
|
| + cssProperty(), *state.style(),
|
| + std::move(StylePath::create(std::move(pathByteStream))));
|
| }
|
|
|
| void CSSPathInterpolationType::composite(
|
| @@ -73,12 +76,11 @@ class InheritedPathChecker : public InterpolationType::ConversionChecker {
|
| InterpolationValue CSSPathInterpolationType::maybeConvertInherit(
|
| const StyleResolverState& state,
|
| ConversionCheckers& conversionCheckers) const {
|
| - DCHECK_EQ(cssProperty(), CSSPropertyD);
|
| if (!state.parentStyle())
|
| return nullptr;
|
|
|
| - conversionCheckers.push_back(
|
| - InheritedPathChecker::create(state.parentStyle()->svgStyle().d()));
|
| + conversionCheckers.push_back(InheritedPathChecker::create(
|
| + PathPropertyFunctions::getPath(cssProperty(), *state.parentStyle())));
|
| return PathInterpolationFunctions::convertValue(
|
| state.parentStyle()->svgStyle().d());
|
| }
|
| @@ -98,8 +100,8 @@ InterpolationValue CSSPathInterpolationType::maybeConvertValue(
|
| InterpolationValue
|
| CSSPathInterpolationType::maybeConvertStandardPropertyUnderlyingValue(
|
| const ComputedStyle& style) const {
|
| - DCHECK_EQ(cssProperty(), CSSPropertyD);
|
| - return PathInterpolationFunctions::convertValue(style.svgStyle().d());
|
| + return PathInterpolationFunctions::convertValue(
|
| + PathPropertyFunctions::getPath(cssProperty(), style));
|
| }
|
|
|
| PairwiseInterpolationValue CSSPathInterpolationType::maybeMergeSingles(
|
|
|