Chromium Code Reviews| 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 d7758bc4d1519484d5ec0281cb5c301acc07f711..b1b4f6faf3fa03311d61cfb4070468c8c173693b 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSProperties.json5 |
| +++ b/third_party/WebKit/Source/core/css/CSSProperties.json5 |
| @@ -55,28 +55,24 @@ |
| valid_values: ["parseSingleValue", "parseShorthand"], |
| }, |
| - // - keyword_only |
| - // These properties only store keyword values. This is used when |
| - // generating the ComputedStyle storage for the property. The initial |
| - // value for this property on a ComputedStyle is specified with the |
| - // initial_keyword flag below. |
| - // TODO(sashab): Rename this to field_type=keyword once we support |
| - // multiple types of generatable fields in ComputedStyle |
| + // - field_template |
| + // Affects how this field is generated in terms of storage and getter/setter methods. |
|
meade_UTC10
2017/02/13 06:46:24
How is it affected? + the same question as before
|
| // TODO(sashab, meade): Remove this once TypedOM types are specified for |
| // every property, since this value can be inferred from that. |
| - keyword_only: { |
| - default: false, |
| - valid_type: "bool", |
| + field_template: { |
| + valid_values: [ |
| + "keyword", // Field can take on one of several keyword values. Stored as enum. |
| + ], |
| }, |
| - // - field_storage_type: "path/to/Type" |
| + // - 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_storage_type: { |
| + field_type_path: { |
| }, |
| // - keywords: ["keyword1", "keyword2"] |
| @@ -88,8 +84,7 @@ |
| }, |
| // - initial_keyword: "keyword-value" |
| - // This specifies the initial keyword value for the keyword_only |
| - // property. |
| + // This specifies the initial keyword value for the keyword fields. |
| initial_keyword: { |
| }, |
| @@ -328,10 +323,10 @@ |
| { |
| name: "direction", |
| custom_value: true, |
| - field_storage_type: "platform/text/TextDirection", |
| + field_type_path: "platform/text/TextDirection", |
| inherited: true, |
| initial_keyword: "ltr", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["ltr", "rtl"], |
| priority: "High", |
| }, |
| @@ -481,10 +476,10 @@ |
| { |
| name: "writing-mode", |
| custom_value: true, |
| - field_storage_type: "platform/text/WritingMode", |
| + field_type_path: "platform/text/WritingMode", |
| inherited: true, |
| initial_keyword: "horizontal-tb", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["horizontal-tb", "vertical-rl", "vertical-lr"], |
| priority: "High", |
| type_name: "WritingMode", |
| @@ -641,7 +636,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "separate", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["separate", "collapse"], |
| }, |
| { |
| @@ -784,7 +779,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "top", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["top", "bottom", "left", "right"], |
| }, |
| { |
| @@ -798,7 +793,7 @@ |
| { |
| name: "clear", |
| initial_keyword: "none", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["none", "left", "right", "both"], |
| }, |
| { |
| @@ -905,7 +900,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "show", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["show", "hide"], |
| type_name: "EEmptyCells", |
| }, |
| @@ -964,7 +959,7 @@ |
| { |
| name: "float", |
| initial_keyword: "none", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["none", "left", "right"], |
| name_for_methods: "Floating", |
| type_name: "EFloat", |
| @@ -1158,14 +1153,14 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "outside", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["outside", "inside"], |
| }, |
| { |
| name: "list-style-type", |
| inherited: true, |
| initial_keyword: "disc", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "disc", "circle", "square", "decimal", "decimal-leading-zero", "arabic-indic", "bengali", "cambodian", "khmer", "devanagari", "gujarati", "gurmukhi", "kannada", "lao", "malayalam", "mongolian", "myanmar", "oriya", "persian", "urdu", "telugu", "tibetan", "thai", "lower-roman", "upper-roman", "lower-greek", "lower-alpha", "lower-latin", "upper-alpha", "upper-latin", "cjk-earthly-branch", "cjk-heavenly-stem", "ethiopic-halehame", "ethiopic-halehame-am", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "hangul", "hangul-consonant", "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", "hebrew", "armenian", "lower-armenian", "upper-armenian", "georgian", "cjk-ideographic", "simp-chinese-formal", "simp-chinese-informal", "trad-chinese-formal", "trad-chinese-informal", "hiragana", "katakana", "hiragana-iroha", "katakana-iroha", "none", |
| ], |
| @@ -1381,7 +1376,7 @@ |
| runtime_flag: "ScrollAnchoring", |
| inherited: false, |
| initial_keyword: "auto", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "visible", "none", "auto", |
| ], |
| @@ -1454,7 +1449,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "auto", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "none", "auto", "stroke", "fill", "painted", "visible", "visibleStroke", "visibleFill", "visiblePainted", "bounding-box", "all", |
| ], |
| @@ -1674,7 +1669,7 @@ |
| { |
| name: "table-layout", |
| initial_keyword: "auto", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "auto", "fixed" |
| ] |
| @@ -1692,7 +1687,7 @@ |
| custom_value: true, |
| inherited: true, |
| initial_keyword: "start", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "left", "right", "center", "justify", "webkitLeft", "webkitRight", "webkitCenter", "start", "end", |
| ], |
| @@ -1788,7 +1783,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "none", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["capitalize", "uppercase", "lowercase", "none"], |
| }, |
| { |
| @@ -1861,9 +1856,9 @@ |
| }, |
| { |
| name: "unicode-bidi", |
| - field_storage_type: "platform/text/UnicodeBidi", |
| + field_type_path: "platform/text/UnicodeBidi", |
| initial_keyword: "normal", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: [ |
| "normal", "embed", "bidi-override", "isolate", "plaintext", "isolate-override", |
| ], |
| @@ -1887,7 +1882,7 @@ |
| inherited: true, |
| initial_keyword: "visible", |
| interpolable: true, |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["visible", "hidden", "collapse"], |
| }, |
| { |
| @@ -1952,7 +1947,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "normal", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["normal", "reverse"], |
| }, |
| { |
| @@ -2157,7 +2152,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "economy", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["economy", "exact"], |
| }, |
| { |
| @@ -2166,7 +2161,7 @@ |
| inherited: true, |
| initial: "initialRtlOrdering", |
| initial_keyword: "logical", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["logical", "visual"], |
| setter: "setRtlOrdering", |
| type_name: "EOrder", |
| @@ -2267,7 +2262,7 @@ |
| independent: true, |
| inherited: true, |
| initial_keyword: "normal", |
| - keyword_only: true, |
| + field_template: "keyword", |
| keywords: ["normal", "pre", "pre-wrap", "pre-line", "nowrap", "-webkit-nowrap"], |
| }, |
| { |