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

Unified Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 1835303002: Implementation of the GreenWeb language extensions. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GreenWeb-related CSS property names such that they apply in the desired order at runtime. Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/DEPS ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
index 8d2864c79ba3d4775ccf297ead3f03bea15dc35a..eb97fe0552cadb1323039447e75b7fb01de6510b 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -55,6 +55,66 @@
namespace blink {
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EQoSDuration e)
+ : CSSValue(PrimitiveClass)
+{
+ init(UnitType::ValueID);
+ switch (e) {
+ case SHORT:
+ m_value.valueID = CSSValueShort;
+ break;
+ case LONG:
+ m_value.valueID = CSSValueLong;
+ break;
+ }
+}
+
+template<> inline EQoSDuration CSSPrimitiveValue::convertTo() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueShort:
+ return SHORT;
+ case CSSValueLong:
+ return LONG;
+ default:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return SHORT;
+}
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EQoSType e)
+ : CSSValue(PrimitiveClass)
+{
+ init(UnitType::ValueID);
+ switch (e) {
+ case DISCRETE:
+ m_value.valueID = CSSValueSingle;
+ break;
+ case CONTINUOUS:
+ m_value.valueID = CSSValueContinuous;
+ break;
+ }
+}
+
+template<> inline EQoSType CSSPrimitiveValue::convertTo() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueSingle:
+ return DISCRETE;
+ case CSSValueContinuous:
+ return CONTINUOUS;
+ default:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return DISCRETE;
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(short i)
: CSSValue(PrimitiveClass)
{
« no previous file with comments | « third_party/WebKit/Source/core/DEPS ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698