| Index: Source/core/css/resolver/StyleResolver.cpp
|
| diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
|
| index 6126f704eb577fe785d9340ae24832bb01b0149d..3b94eb7401647346a51f0f56c19f82dbd9a68523 100644
|
| --- a/Source/core/css/resolver/StyleResolver.cpp
|
| +++ b/Source/core/css/resolver/StyleResolver.cpp
|
| @@ -59,6 +59,7 @@
|
| #include "core/css/StyleRuleImport.h"
|
| #include "core/css/StyleSheetContents.h"
|
| #include "core/css/resolver/AnimatedStyleBuilder.h"
|
| +#include "core/css/resolver/CSSVariableResolver.h"
|
| #include "core/css/resolver/MatchResult.h"
|
| #include "core/css/resolver/MediaQueryResult.h"
|
| #include "core/css/resolver/ScopedStyleResolver.h"
|
| @@ -1331,6 +1332,12 @@ void StyleResolver::applyMatchedProperties(StyleResolverState& state, const Matc
|
| applyInheritedOnly = true;
|
| }
|
|
|
| + if (RuntimeEnabledFeatures::cssVariablesEnabled() && document().styleEngine().usesVariables()) {
|
| + applyMatchedProperties<ResolveVariables>(state, matchResult, false, matchResult.beginAuthor(), matchResult.endAuthor(), applyInheritedOnly);
|
| + // TODO(leviw): stop recalculating every time
|
| + CSSVariableResolver::resolveVariableDefinitions(state);
|
| + }
|
| +
|
| // Now we have all of the matched rules in the appropriate order. Walk the rules and apply
|
| // high-priority properties first, i.e., those properties that other properties depend on.
|
| // The order is (1) high-priority not important, (2) high-priority important, (3) normal not important
|
|
|