Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| index cb25b3e0da720e1e4ac1bc6603a9cf7376efb7f5..656838729028708457224b2ec18e042a646aac09 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp |
| @@ -1431,12 +1431,15 @@ void StyleResolver::applyAllProperty(StyleResolverState& state, const CSSValue& |
| } |
| template <CSSPropertyPriority priority> |
| -void StyleResolver::applyPropertiesForApplyAtRule(StyleResolverState& state, const CSSValue& value, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType) |
| +void StyleResolver::applyPropertiesForApplyAtRule(StyleResolverState& state, const CSSValue& value, bool isImportant, PropertyWhitelistType propertyWhitelistType) |
| { |
| + if (!state.style()->hasVariableReferenceFromNonInheritedProperty()) |
| + state.style()->setHasVariableReferenceFromNonInheritedProperty(); |
|
meade_UTC10
2016/08/08 06:53:56
Do you get much from checking this before setting?
Timothy Loh
2016/08/08 07:03:12
Mmm yeah I'll remove the check
|
| if (!state.style()->variables()) |
| return; |
| const String& name = toCSSCustomIdentValue(value).value(); |
| const StylePropertySet* propertySet = state.customPropertySetForApplyAtRule(name); |
| + bool inheritedOnly = false; |
| if (propertySet) |
| applyProperties<priority>(state, propertySet, isImportant, inheritedOnly, propertyWhitelistType); |
| } |
| @@ -1450,7 +1453,8 @@ void StyleResolver::applyProperties(StyleResolverState& state, const StyleProper |
| CSSPropertyID property = current.id(); |
| if (property == CSSPropertyApplyAtRule) { |
| - applyPropertiesForApplyAtRule<priority>(state, current.value(), isImportant, inheritedOnly, propertyWhitelistType); |
| + DCHECK(!inheritedOnly); |
| + applyPropertiesForApplyAtRule<priority>(state, current.value(), isImportant, propertyWhitelistType); |
| continue; |
| } |