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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use m_unit Created 5 years, 1 month 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 58a6fbb7c21dc172ad3c0dcd98a88b7f8c32e451..1b2ec8e0f6ed6ce67025dfe1fc6fcb2cf9c4250e 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h
+++ b/third_party/WebKit/Source/core/css/resolver/CSSPropertyPriority.h
@@ -15,6 +15,7 @@ namespace blink {
// decides the pixel value of low priority properties with 'em' units.
enum CSSPropertyPriority {
+ ResolveVariables,
HighPropertyPriority,
LowPropertyPriority
};
@@ -32,6 +33,19 @@ public:
};
template<>
+inline CSSPropertyID CSSPropertyPriorityData<ResolveVariables>::first()
+{
+ static_assert(CSSPropertyVariable == firstCSSProperty - 1, "CSSPropertyVariable should be directly before the first CSS 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");

Powered by Google App Engine
This is Rietveld 408576698