Generate enum/getters/setters/mappings for text-underline-position.

Currently, the text-underline-position property is a 'storage_only' field,
so it has no generated public getters/setters. This patch changes it to
a 'keyword' field so that its getters/setters can be generated as well.
We also generate the TextUnderlinePosition enum and use the generated
CSSValueID <-> TextUnderlinePosition mappings.

Diff of generated files:
https://gist.github.com/660ef70abac1536136fccb33ecf0905a/revisions

Bug: 628043
Change-Id: Ida488dc25572ad5ede5c5f97a7f44a375de4f29b
Reviewed-on: https://chromium-review.googlesource.com/525272
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Reviewed-by: Naina Raisinghani <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477466}
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
index b939018..0c42777 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -1100,38 +1100,6 @@
 }
 
 template <>
-inline CSSIdentifierValue::CSSIdentifierValue(TextUnderlinePosition e)
-    : CSSValue(kIdentifierClass) {
-  switch (e) {
-    case TextUnderlinePosition::kAuto:
-      value_id_ = CSSValueAuto;
-      break;
-    case TextUnderlinePosition::kUnder:
-      value_id_ = CSSValueUnder;
-      break;
-  }
-
-  // FIXME: Implement support for 'under left' and 'under right' values.
-}
-
-template <>
-inline TextUnderlinePosition CSSIdentifierValue::ConvertTo() const {
-  switch (value_id_) {
-    case CSSValueAuto:
-      return TextUnderlinePosition::kAuto;
-    case CSSValueUnder:
-      return TextUnderlinePosition::kUnder;
-    default:
-      break;
-  }
-
-  // FIXME: Implement support for 'under left' and 'under right' values.
-
-  NOTREACHED();
-  return TextUnderlinePosition::kAuto;
-}
-
-template <>
 inline TextDecorationSkip CSSIdentifierValue::ConvertTo() const {
   switch (value_id_) {
     case CSSValueObjects:
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5
index 38b07c9..7fd6171 100644
--- a/third_party/WebKit/Source/core/css/CSSProperties.json5
+++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -2152,16 +2152,17 @@
       field_template: "keyword",
       keywords: ["capitalize", "uppercase", "lowercase", "none"],
     },
+    // FIXME: Implement support for 'under left' and 'under right' values.
     {
       name: "text-underline-position",
       api_class: true,
       api_methods: ["parseSingleValue"],
       inherited: true,
       runtime_flag: "CSS3TextDecorations",
-      field_template: "storage_only",
+      field_template: "keyword",
       type_name: "TextUnderlinePosition",
-      default_value: "TextUnderlinePosition::kAuto",
-      field_size: 1,
+      default_value: "auto",
+      keywords: ["auto", "under"],
       field_group: "rare-inherited",
     },
     {
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 0fb31b4..6b139c0f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1480,17 +1480,6 @@
     SET_VAR(rare_non_inherited_data_, text_decoration_style_, v);
   }
 
-  // text-underline-position
-  static TextUnderlinePosition InitialTextUnderlinePosition() {
-    return TextUnderlinePosition::kAuto;
-  }
-  TextUnderlinePosition GetTextUnderlinePosition() const {
-    return TextUnderlinePositionInternal();
-  }
-  void SetTextUnderlinePosition(TextUnderlinePosition v) {
-    SetTextUnderlinePositionInternal(v);
-  }
-
   // text-decoration-skip
   static TextDecorationSkip InitialTextDecorationSkip() {
     return TextDecorationSkip::kObjects;
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index 1adb46d..c0170a6 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -236,12 +236,6 @@
   return a = a | b;
 }
 
-enum class TextUnderlinePosition {
-  // FIXME: Implement support for 'under left' and 'under right' values.
-  kAuto,
-  kUnder
-};
-
 enum ETransformStyle3D { kTransformStyle3DFlat, kTransformStyle3DPreserve3D };
 
 enum OffsetRotationType { kOffsetRotationAuto, kOffsetRotationFixed };