Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h |
| diff --git a/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h b/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h |
| index ea0a60041e2265506fce2b703cb2a185de3f7c0e..7637f3723af4b3e677bea9509ff24ee5c688d4ee 100644 |
| --- a/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h |
| +++ b/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h |
| @@ -16,6 +16,7 @@ namespace blink { |
| enum CSSPropertyPriority { |
| ResolveVariables, |
| + AnimationPropertyPriority, |
| HighPropertyPriority, |
| LowPropertyPriority |
| }; |
| @@ -46,8 +47,31 @@ inline CSSPropertyID CSSPropertyPriorityData<ResolveVariables>::last() { |
| } |
| template <> |
| +inline CSSPropertyID |
| +CSSPropertyPriorityData<AnimationPropertyPriority>::first() { |
| + static_assert(CSSPropertyAnimationDelay == firstCSSProperty, |
| + "CSSPropertyAnimationDelay should be the first animation " |
| + "priority property"); |
| + return CSSPropertyAnimationDelay; |
| +} |
| + |
| +template <> |
| +inline CSSPropertyID |
| +CSSPropertyPriorityData<AnimationPropertyPriority>::last() { |
| + static_assert( |
| + CSSPropertyTransitionTimingFunction == CSSPropertyAnimationDelay + 11, |
| + "CSSPropertyTransitionTimingFunction should be the end of the high " |
| + "priority property range"); |
| + static_assert( |
| + CSSPropertyTransitionProperty == CSSPropertyTransitionTimingFunction - 1, |
|
Timothy Loh
2016/10/21 05:42:55
This assert seems pretty random and not useful, I
alancutter (OOO until 2018)
2016/10/24 04:08:27
Agreed, it was copying the logic of the assertion
|
| + "CSSPropertyTransitionProperty should be immediately before " |
| + "CSSPropertyTransitionTimingFunction"); |
| + return CSSPropertyTransitionTimingFunction; |
| +} |
| + |
| +template <> |
| inline CSSPropertyID CSSPropertyPriorityData<HighPropertyPriority>::first() { |
| - static_assert(CSSPropertyColor == firstCSSProperty, |
| + static_assert(CSSPropertyColor == CSSPropertyTransitionTimingFunction + 1, |
| "CSSPropertyColor should be the first high priority property"); |
| return CSSPropertyColor; |
| } |