| Index: third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
|
| diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
|
| index c15db7de439ddc884aa8f714245b961ac1073afd..26f23618931360efb4859b6a3b267bcfe1613e57 100644
|
| --- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
|
| +++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
|
| @@ -87,6 +87,12 @@ class InheritedCustomPropertyChecker
|
| if (!inheritedValue) {
|
| inheritedValue = m_initialValue.get();
|
| }
|
| + if (inheritedValue == m_inheritedValue.get()) {
|
| + return true;
|
| + }
|
| + if (!inheritedValue || !m_inheritedValue) {
|
| + return false;
|
| + }
|
| return m_inheritedValue->equals(*inheritedValue);
|
| }
|
|
|
| @@ -207,20 +213,23 @@ CSSInterpolationType::maybeConvertCustomPropertyDeclarationInternal(
|
| return nullptr;
|
| }
|
|
|
| + const CSSValue* value = nullptr;
|
| if (declaration.isInitial(isInheritedProperty)) {
|
| - return maybeConvertValue(*registration->initial(), state,
|
| - conversionCheckers);
|
| + value = registration->initial();
|
| + } else {
|
| + value =
|
| + state.parentStyle()->getRegisteredVariable(name, isInheritedProperty);
|
| + if (!value) {
|
| + value = registration->initial();
|
| + }
|
| + conversionCheckers.push_back(InheritedCustomPropertyChecker::create(
|
| + name, isInheritedProperty, value, registration->initial()));
|
| }
|
| -
|
| - DCHECK(declaration.isInherit(isInheritedProperty));
|
| - const CSSValue* inheritedValue =
|
| - state.parentStyle()->getRegisteredVariable(name, isInheritedProperty);
|
| - if (!inheritedValue) {
|
| - inheritedValue = registration->initial();
|
| + if (!value) {
|
| + return nullptr;
|
| }
|
| - conversionCheckers.push_back(InheritedCustomPropertyChecker::create(
|
| - name, isInheritedProperty, inheritedValue, registration->initial()));
|
| - return maybeConvertValue(*inheritedValue, state, conversionCheckers);
|
| +
|
| + return maybeConvertValue(*value, state, conversionCheckers);
|
| }
|
|
|
| if (declaration.value()->needsVariableResolution()) {
|
| @@ -263,6 +272,9 @@ InterpolationValue CSSInterpolationType::maybeConvertUnderlyingValue(
|
| if (!underlyingValue) {
|
| underlyingValue = registration->initial();
|
| }
|
| + if (!underlyingValue) {
|
| + return nullptr;
|
| + }
|
| // TODO(alancutter): Remove the need for passing in conversion checkers.
|
| ConversionCheckers dummyConversionCheckers;
|
| return maybeConvertValue(*underlyingValue, environment.state(),
|
|
|