| Index: Source/core/css/resolver/CSSPropertyPriority.h
|
| diff --git a/Source/core/css/resolver/CSSPropertyPriority.h b/Source/core/css/resolver/CSSPropertyPriority.h
|
| index 3edca213d50cd3e52a5cf24fa10f37dfbe22fccb..0a1e793afd186b714808fb59f923d075ade6395e 100644
|
| --- a/Source/core/css/resolver/CSSPropertyPriority.h
|
| +++ b/Source/core/css/resolver/CSSPropertyPriority.h
|
| @@ -14,6 +14,7 @@ namespace blink {
|
| // decides the pixel value of low priority properties with 'em' units.
|
|
|
| enum CSSPropertyPriority {
|
| + ResolveVariables,
|
| HighPropertyPriority,
|
| LowPropertyPriority
|
| };
|
| @@ -30,6 +31,19 @@ public:
|
| };
|
|
|
| template<>
|
| +inline CSSPropertyID CSSPropertyPriorityData<ResolveVariables>::first()
|
| +{
|
| + static_assert(CSSPropertyVariable == lastCSSProperty, "CSSPropertyVariable should be the last property.");
|
| + return CSSPropertyVariable;
|
| +}
|
| +
|
| +template<>
|
| +inline CSSPropertyID CSSPropertyPriorityData<ResolveVariables>::last()
|
| +{
|
| + return CSSPropertyVariable;
|
| +}
|
| +
|
| +template<>
|
| inline CSSPropertyID CSSPropertyPriorityData<HighPropertyPriority>::first()
|
| {
|
| static_assert(CSSPropertyColor == firstCSSProperty, "CSSPropertyColor should be the first high priority property");
|
| @@ -54,7 +68,8 @@ inline CSSPropertyID CSSPropertyPriorityData<LowPropertyPriority>::first()
|
| template<>
|
| inline CSSPropertyID CSSPropertyPriorityData<LowPropertyPriority>::last()
|
| {
|
| - return static_cast<CSSPropertyID>(lastCSSProperty);
|
| + static_assert(lastCSSProperty - 1 < CSSPropertyVariable, "CSSPropertyVariable shouldn't be included in low priority properties.");
|
| + return static_cast<CSSPropertyID>(lastCSSProperty - 1);
|
| }
|
|
|
| } // namespace blink
|
|
|