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

Unified Diff: third_party/WebKit/Source/core/css/CSSProperties.json5

Issue 2904483003: Replace "field_type_path" with "include_paths" in CSSProperties.json5. (Closed)
Patch Set: Rebase Created 3 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
Index: third_party/WebKit/Source/core/css/CSSProperties.json5
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5
index 8214c556090dc5ddcb6e48d9463966e16374ba16..1a80d1d8e2f36360832cdf38fe5ad45ac280945d 100644
--- a/third_party/WebKit/Source/core/css/CSSProperties.json5
+++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -84,6 +84,8 @@
field_template: {
valid_values: [
// Field is stored as an enum and has a initial/getter/setter/resetter.
+ // If include_paths is empty, we would also generate the corresponding
+ // enum definition in ComputedStyleConstants.h.
"keyword",
// Field stores a primitive value like int/bool. The type is specified by
// type_name. The interface has a initial/getter/setter/resetter.
@@ -99,14 +101,13 @@
],
},
- // - field_type_path: "path/to/Type"
- // For properties that have generated field storage in ComputedStyle,
- // this optional argument will override the field's generated type with
- // an external one specified at the given path. The type must be defined
- // in a header file at that path, and have the same name as the file.
- // Currently, only enum types are supported, and the enum's only values
- // must be CamelCase values of the keywords of the property.
- field_type_path: {
+ // - include_paths: ["path/to/file1.h", "path/to/file2.h"]
+ // List of files containing the definitions of types in 'type_name'. Each of
+ // these files will appear as a #include in ComputedStyleBase.h. For
+ // example, if the type_name is 'Vector<String>', include_paths should be
+ // ["platform/wtf/Vector.h", "platform/wtf/text/WTFString.h"]
+ include_paths: {
+ default: [],
},
// - keywords: ["keyword1", "keyword2"]
@@ -360,12 +361,13 @@
{
name: "direction",
custom_value: true,
- field_type_path: "platform/text/TextDirection",
+ type_name: "TextDirection",
inherited: true,
default_value: "ltr",
field_template: "keyword",
keywords: ["ltr", "rtl"],
priority: "High",
+ include_paths: ["platform/text/TextDirection.h"],
},
{
name: "font-family",
@@ -525,13 +527,13 @@
{
name: "writing-mode",
custom_value: true,
- field_type_path: "platform/text/WritingMode",
inherited: true,
default_value: "horizontal-tb",
field_template: "keyword",
keywords: ["horizontal-tb", "vertical-rl", "vertical-lr"],
priority: "High",
type_name: "WritingMode",
+ include_paths: ["platform/text/WritingMode.h"],
},
{
name: "-webkit-writing-mode",
@@ -657,10 +659,11 @@
name: "border-bottom-color",
custom_all: true,
interpolable: true,
+ type_name: "Color",
field_template: "storage_only",
- field_type_path: "platform/graphics/Color",
default_value: "0",
field_group: "surround",
+ include_paths: ["platform/graphics/Color.h"],
},
{
name: "border-bottom-left-radius",
@@ -669,7 +672,8 @@
converter: "ConvertRadius",
interpolable: true,
field_template: "external",
- field_type_path: "platform/LengthSize",
+ include_paths: ["platform/LengthSize.h"],
+ type_name: "LengthSize",
field_group: "surround",
default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
},
@@ -680,7 +684,8 @@
converter: "ConvertRadius",
interpolable: true,
field_template: "external",
- field_type_path: "platform/LengthSize",
+ include_paths: ["platform/LengthSize.h"],
+ type_name: "LengthSize",
field_group: "surround",
default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
},
@@ -702,7 +707,8 @@
keywords: ["thin", "medium", "thick"],
typedom_types: ["Length"],
field_template: "storage_only",
- field_type_path: "platform/LayoutUnit",
+ include_paths: ["platform/LayoutUnit.h"],
+ type_name: "LayoutUnit",
default_value: "LayoutUnit(3)",
field_group: "surround",
},
@@ -751,7 +757,8 @@
custom_all: true,
interpolable: true,
field_template: "storage_only",
- field_type_path: "platform/graphics/Color",
+ include_paths: ["platform/graphics/Color.h"],
+ type_name: "Color",
default_value: "0",
field_group: "surround",
},
@@ -773,7 +780,8 @@
keywords: ["thin", "medium", "thick"],
typedom_types: ["Length"],
field_template: "storage_only",
- field_type_path: "platform/LayoutUnit",
+ include_paths: ["platform/LayoutUnit.h"],
+ type_name: "LayoutUnit",
default_value: "LayoutUnit(3)",
field_group: "surround",
},
@@ -782,7 +790,8 @@
custom_all: true,
interpolable: true,
field_template: "storage_only",
- field_type_path: "platform/graphics/Color",
+ include_paths: ["platform/graphics/Color.h"],
+ type_name: "Color",
default_value: "0",
field_group: "surround",
},
@@ -804,7 +813,8 @@
keywords: ["thin", "medium", "thick"],
typedom_types: ["Length"],
field_template: "storage_only",
- field_type_path: "platform/LayoutUnit",
+ include_paths: ["platform/LayoutUnit.h"],
+ type_name: "LayoutUnit",
default_value: "LayoutUnit(3)",
field_group: "surround",
},
@@ -813,7 +823,8 @@
custom_all: true,
interpolable: true,
field_template: "storage_only",
- field_type_path: "platform/graphics/Color",
+ include_paths: ["platform/graphics/Color.h"],
+ type_name: "Color",
default_value: "0",
field_group: "surround",
},
@@ -824,7 +835,8 @@
converter: "ConvertRadius",
interpolable: true,
field_template: "external",
- field_type_path: "platform/LengthSize",
+ include_paths: ["platform/LengthSize.h"],
+ type_name: "LengthSize",
field_group: "surround",
default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
},
@@ -835,7 +847,8 @@
converter: "ConvertRadius",
interpolable: true,
field_template: "external",
- field_type_path: "platform/LengthSize",
+ include_paths: ["platform/LengthSize.h"],
+ type_name: "LengthSize",
field_group: "surround",
default_value: "LengthSize(Length(0, kFixed), Length(0, kFixed))",
},
@@ -858,7 +871,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "storage_only",
- field_type_path: "platform/LayoutUnit",
+ include_paths: ["platform/LayoutUnit.h"],
+ type_name: "LayoutUnit",
default_value: "LayoutUnit(3)",
field_group: "surround",
},
@@ -872,7 +886,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length()",
},
@@ -953,7 +968,8 @@
custom_all: true,
interpolable: true,
field_template: "storage_only",
- field_type_path: "platform/LengthBox",
+ include_paths: ["platform/LengthBox.h"],
+ type_name: "LengthBox",
default_value: "LengthBox()",
field_group: "visual",
},
@@ -1237,7 +1253,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length()",
},
@@ -1294,7 +1311,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length()",
},
@@ -1324,7 +1342,8 @@
inherited: true,
interpolable: true,
field_template: "storage_only",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
default_value: "Length(-100.0, kPercent)",
field_group: "inherited",
},
@@ -1369,7 +1388,8 @@
converter: "ConvertQuirkyLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1380,7 +1400,8 @@
converter: "ConvertQuirkyLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1391,7 +1412,8 @@
converter: "ConvertQuirkyLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1402,7 +1424,8 @@
converter: "ConvertQuirkyLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1452,7 +1475,8 @@
is_descriptor: true,
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length(kMaxSizeNone)",
},
@@ -1462,7 +1486,8 @@
is_descriptor: true,
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length(kMaxSizeNone)",
},
@@ -1473,7 +1498,8 @@
is_descriptor: true,
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length()",
},
@@ -1484,7 +1510,8 @@
is_descriptor: true,
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length()",
},
@@ -1622,7 +1649,8 @@
converter: "ConvertLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1633,7 +1661,8 @@
converter: "ConvertLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1644,7 +1673,8 @@
converter: "ConvertLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1655,7 +1685,8 @@
converter: "ConvertLength",
interpolable: true,
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length(kFixed)",
},
@@ -1719,7 +1750,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length()",
},
@@ -2040,7 +2072,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "surround",
default_value: "Length()",
},
@@ -2105,7 +2138,7 @@
},
{
name: "unicode-bidi",
- field_type_path: "platform/text/UnicodeBidi",
+ include_paths: ["platform/text/UnicodeBidi.h"],
default_value: "normal",
field_template: "keyword",
keywords: [
@@ -2549,7 +2582,8 @@
supports_percentage: true,
typedom_types: ["Length"],
field_template: "external",
- field_type_path: "platform/Length",
+ include_paths: ["platform/Length.h"],
+ type_name: "Length",
field_group: "box",
default_value: "Length()"
},

Powered by Google App Engine
This is Rietveld 408576698