Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h

Issue 2317903003: Add CSS property priority for CSS animation affecting properties (Closed)
Patch Set: Rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698