| Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
|
| index b33285e6b06094c9b5b12135c706cf12eef7ddf0..4342ecb04a073b6a6fc2bd80d3b4658271e60408 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
|
| @@ -51,6 +51,7 @@
|
| #include "core/css/CSSHelper.h"
|
| #include "core/css/CSSImageSetValue.h"
|
| #include "core/css/CSSPathValue.h"
|
| +#include "core/css/CSSPendingSubstitutionValue.h"
|
| #include "core/css/CSSPrimitiveValueMappings.h"
|
| #include "core/css/CSSPropertyMetadata.h"
|
| #include "core/css/CSSURIValue.h"
|
| @@ -112,8 +113,14 @@ static inline bool isValidVisitedLinkProperty(CSSPropertyID id)
|
|
|
| void StyleBuilder::applyProperty(CSSPropertyID id, StyleResolverState& state, const CSSValue& value)
|
| {
|
| - if (RuntimeEnabledFeatures::cssVariablesEnabled() && id != CSSPropertyVariable && value.isVariableReferenceValue()) {
|
| - CSSVariableResolver::resolveAndApplyVariableReferences(state, id, toCSSVariableReferenceValue(value));
|
| + if (RuntimeEnabledFeatures::cssVariablesEnabled() && id != CSSPropertyVariable
|
| + && (value.isVariableReferenceValue() || value.isPendingSubstitutionValue())) {
|
| +
|
| + const CSSValue* resolvedValue = value.isVariableReferenceValue() ?
|
| + CSSVariableResolver::resolveVariableReferences(state, id, toCSSVariableReferenceValue(value)) :
|
| + CSSVariableResolver::resolvePendingSubstitutions(state, id, toCSSPendingSubstitutionValue(value));
|
| + applyProperty(id, state, *resolvedValue);
|
| +
|
| if (!state.style()->hasVariableReferenceFromNonInheritedProperty() && !CSSPropertyMetadata::isInheritedProperty(id))
|
| state.style()->setHasVariableReferenceFromNonInheritedProperty();
|
| return;
|
|
|