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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSProperties.json5

Issue 2693933003: Move field-dependent code in ComputedStyleBase to Jinja macros. (Closed)
Patch Set: DRY Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 { 1 {
2 // This file specifies all the CSS properties we support and the necessary 2 // This file specifies all the CSS properties we support and the necessary
3 // information for our code generation. The various supported arguments 3 // information for our code generation. The various supported arguments
4 // are described below with example usage 4 // are described below with example usage
5 5
6 parameters: { 6 parameters: {
7 // - alias_for: "other-property" 7 // - alias_for: "other-property"
8 // Properties specifying alias_for should be virtually identical to the 8 // Properties specifying alias_for should be virtually identical to the
9 // properties they alias. Minor parsing differences are allowed as long as 9 // properties they alias. Minor parsing differences are allowed as long as
10 // the CSSValues created are of the same format of the aliased property. 10 // the CSSValues created are of the same format of the aliased property.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Affects how the interface to this field is generated. 59 // Affects how the interface to this field is generated.
60 // TODO(sashab, meade): Remove this once TypedOM types are specified for 60 // TODO(sashab, meade): Remove this once TypedOM types are specified for
61 // every property, since this value can be inferred from that. 61 // every property, since this value can be inferred from that.
62 field_template: { 62 field_template: {
63 valid_values: [ 63 valid_values: [
64 // Field is stored as an enum and has a initial/getter/setter/resetter. 64 // Field is stored as an enum and has a initial/getter/setter/resetter.
65 "keyword", 65 "keyword",
66 // Field is stored a packed boolean flag and has a initial/getter/setter /resetter. 66 // Field is stored a packed boolean flag and has a initial/getter/setter /resetter.
67 // TODO(shend): generalise this to "primitive" 67 // TODO(shend): generalise this to "primitive"
68 "flag", 68 "flag",
69 // Field is stored as a bool, whose default value is false
70 // and can only be set to true. Has a initial/getter/setter.
71 "monotonic_flag"
69 ], 72 ],
70 }, 73 },
71 74
72 // - field_type_path: "path/to/Type" 75 // - field_type_path: "path/to/Type"
73 // For properties that have generated field storage in ComputedStyle, 76 // For properties that have generated field storage in ComputedStyle,
74 // this optional argument will override the field's generated type with 77 // this optional argument will override the field's generated type with
75 // an external one specified at the given path. The type must be defined 78 // an external one specified at the given path. The type must be defined
76 // in a header file at that path, and have the same name as the file. 79 // in a header file at that path, and have the same name as the file.
77 // Currently, only enum types are supported, and the enum's only values 80 // Currently, only enum types are supported, and the enum's only values
78 // must be CamelCase values of the keywords of the property. 81 // must be CamelCase values of the keywords of the property.
(...skipping 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 { 3076 {
3074 name: "-webkit-transition-timing-function", 3077 name: "-webkit-transition-timing-function",
3075 alias_for: "transition-timing-function", 3078 alias_for: "transition-timing-function",
3076 }, 3079 },
3077 { 3080 {
3078 name: "-webkit-user-select", 3081 name: "-webkit-user-select",
3079 alias_for: "user-select", 3082 alias_for: "user-select",
3080 }, 3083 },
3081 ], 3084 ],
3082 } 3085 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698