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

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

Issue 15748002: Initial support for experimental touch-action CSS feature (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary CSSParserContext change Created 7 years, 7 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 | « Source/core/css/CSSParserMode.h ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
index af67065da8d29722d7e73ea3d563277c368a5859..2b335bbf9f75b16ba3e8c9de0325c5f40a924cfe 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -4499,6 +4499,33 @@ template<> inline CSSPrimitiveValue::operator EMaskType() const
return MT_LUMINANCE;
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TouchAction t)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_IDENT;
+ switch (t) {
+ case TouchActionNone:
+ m_value.ident = CSSValueNone;
+ break;
+ case TouchActionAuto:
+ m_value.ident = CSSValueAuto;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator TouchAction() const
+{
+ switch (m_value.ident) {
+ case CSSValueNone:
+ return TouchActionNone;
+ case CSSValueAuto:
+ return TouchActionAuto;
+ }
+
+ ASSERT_NOT_REACHED();
+ return TouchActionNone;
+}
+
}
#endif
« no previous file with comments | « Source/core/css/CSSParserMode.h ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698