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

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

Issue 2950743002: Revert of Generate enum/getters/setters/mappings for flex-direction (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('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 8de9848c41c5e9ceea1aca5a8282bd82eb0a8a3b..b8144cbc17515d8f97aa126979b2c483e075edf3 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -628,6 +628,44 @@
NOTREACHED();
return kTopEdge;
+}
+
+template <>
+inline CSSIdentifierValue::CSSIdentifierValue(EFlexDirection e)
+ : CSSValue(kIdentifierClass) {
+ switch (e) {
+ case EFlexDirection::kRow:
+ value_id_ = CSSValueRow;
+ break;
+ case EFlexDirection::kRowReverse:
+ value_id_ = CSSValueRowReverse;
+ break;
+ case EFlexDirection::kColumn:
+ value_id_ = CSSValueColumn;
+ break;
+ case EFlexDirection::kColumnReverse:
+ value_id_ = CSSValueColumnReverse;
+ break;
+ }
+}
+
+template <>
+inline EFlexDirection CSSIdentifierValue::ConvertTo() const {
+ switch (value_id_) {
+ case CSSValueRow:
+ return EFlexDirection::kRow;
+ case CSSValueRowReverse:
+ return EFlexDirection::kRowReverse;
+ case CSSValueColumn:
+ return EFlexDirection::kColumn;
+ case CSSValueColumnReverse:
+ return EFlexDirection::kColumnReverse;
+ default:
+ break;
+ }
+
+ NOTREACHED();
+ return EFlexDirection::kRow;
}
template <>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698