Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 { | |
| 2 // This file specifies fields in ComputedStyle that we would like to | |
| 3 // generate, but are not CSS properties. | |
| 4 | |
| 5 parameters: { | |
| 6 // - field_size | |
| 7 // Number of bits needed to store this field. Only used for storage_only | |
| 8 // fields. If specified, the field will be stored as bit field. Otherwise | |
| 9 // it will be stored as a normal data member. | |
| 10 field_size: { | |
| 11 valid_type: "int", | |
| 12 }, | |
| 13 | |
| 14 // If the field has_custom_compare_and_copy, then it does not appear in | |
| 15 // ComputedStyle::operator== and ComputedStyle::CopyNonInheritedFromCached. | |
| 16 has_custom_compare_and_copy: { | |
| 17 default: false, | |
| 18 }, | |
| 19 | |
| 20 // The rest is the same as CSSProperties.json5 | |
|
alancutter (OOO until 2018)
2017/04/19 07:13:32
Full stop.
Not all parameters in CSSProperties.js
shend
2017/04/19 07:38:58
Done.
Bugs Nash
2017/04/19 22:56:55
If the list might grow in future then I would not
alancutter (OOO until 2018)
2017/04/20 03:29:58
I share your concerns for the list becoming stale.
| |
| 21 }, | |
| 22 | |
| 23 data: [ | |
| 24 { | |
| 25 name: "IsLink", | |
| 26 field_template: "monotonic_flag", | |
| 27 default_value: "false", | |
| 28 has_custom_compare_and_copy: true, | |
| 29 }, | |
| 30 { | |
| 31 name: "OriginalDisplay", | |
| 32 field_template: "keyword", | |
| 33 default_value: "inline", | |
| 34 type_name: "EDisplay", | |
| 35 keywords: [ | |
| 36 "inline", "block", "list-item", "inline-block", "table", "inline-table ", "table-row-group", "table-header-group", | |
| 37 "table-footer-group", "table-row", "table-column-group", "table-column ", "table-cell", "table-caption", "-webkit-box", | |
| 38 "-webkit-inline-box", "flex", "inline-flex", "grid", "inline-grid", "c ontents", "flow-root", "none", | |
| 39 ], | |
| 40 has_custom_compare_and_copy: true, | |
| 41 }, | |
| 42 { | |
| 43 name: "InsideLink", | |
| 44 field_template: "keyword", | |
| 45 default_value: "not-inside-link", | |
| 46 keywords: ["not-inside-link", "inside-unvisited-link", "inside-visited-lin k"], | |
| 47 inherited: true, | |
| 48 has_custom_compare_and_copy: true, | |
| 49 }, | |
| 50 // Style can not be shared. | |
| 51 { | |
| 52 name: "Unique", | |
| 53 field_template: "monotonic_flag", | |
| 54 default_value: "false", | |
| 55 has_custom_compare_and_copy: true, | |
| 56 }, | |
| 57 // Whether this style is affected by these pseudo-classes. | |
| 58 { | |
| 59 name: "AffectedByFocus", | |
| 60 field_template: "monotonic_flag", | |
| 61 default_value: "false", | |
| 62 has_custom_compare_and_copy: true, | |
| 63 }, | |
| 64 { | |
| 65 name: "AffectedByFocusWithin", | |
| 66 field_template: "monotonic_flag", | |
| 67 default_value: "false", | |
| 68 has_custom_compare_and_copy: true, | |
| 69 }, | |
| 70 { | |
| 71 name: "AffectedByHover", | |
| 72 field_template: "monotonic_flag", | |
| 73 default_value: "false", | |
| 74 has_custom_compare_and_copy: true, | |
| 75 }, | |
| 76 { | |
| 77 name: "AffectedByActive", | |
| 78 field_template: "monotonic_flag", | |
| 79 default_value: "false", | |
| 80 has_custom_compare_and_copy: true, | |
| 81 }, | |
| 82 { | |
| 83 name: "AffectedByDrag", | |
| 84 field_template: "monotonic_flag", | |
| 85 default_value: "false", | |
| 86 has_custom_compare_and_copy: true, | |
| 87 }, | |
| 88 // A non-inherited property references a variable or @apply is used | |
| 89 { | |
| 90 name: "HasVariableReferenceFromNonInheritedProperty", | |
| 91 field_template: "monotonic_flag", | |
| 92 default_value: "false", | |
| 93 has_custom_compare_and_copy: true, | |
| 94 }, | |
| 95 // Explicitly inherits a non-inherited property | |
| 96 { | |
| 97 name: "HasExplicitlyInheritedProperties", | |
| 98 field_template: "monotonic_flag", | |
| 99 default_value: "false", | |
| 100 has_custom_compare_and_copy: true, | |
| 101 }, | |
| 102 // These are set if we used viewport or rem units when resolving a length. | |
| 103 // TODO(shend): HasViewportUnits should be a monotonic_flag. | |
| 104 { | |
| 105 name: "HasViewportUnits", | |
| 106 field_template: "primitive", | |
| 107 default_value: "false", | |
| 108 type_name: "bool", | |
| 109 has_custom_compare_and_copy: true, | |
| 110 }, | |
| 111 { | |
| 112 name: "HasRemUnits", | |
| 113 field_template: "monotonic_flag", | |
| 114 default_value: "false", | |
| 115 has_custom_compare_and_copy: true, | |
| 116 }, | |
| 117 // These properties only have generated storage, and their methods are handw ritten in ComputedStyle. | |
| 118 // TODO(shend): Remove these fields and delete the 'storage_only' template. | |
| 119 { | |
| 120 name: "EmptyState", | |
| 121 field_template: "storage_only", | |
| 122 field_size: 1, | |
| 123 default_value: "false", | |
| 124 type_name: "bool", | |
| 125 has_custom_compare_and_copy: true, | |
| 126 }, | |
| 127 { | |
| 128 name: "StyleType", | |
| 129 field_template: "storage_only", | |
| 130 field_size: 6, | |
| 131 default_value: "0", | |
| 132 type_name: "PseudoId", | |
| 133 has_custom_compare_and_copy: true, | |
| 134 }, | |
| 135 { | |
| 136 name: "PseudoBits", | |
| 137 field_template: "storage_only", | |
| 138 field_size: 8, | |
| 139 default_value: "kPseudoIdNone", | |
| 140 type_name: "PseudoId", | |
| 141 has_custom_compare_and_copy: true, | |
| 142 }, | |
| 143 // True if 'underline solid' is the only text decoration on this element. | |
| 144 { | |
| 145 name: "HasSimpleUnderline", | |
| 146 field_template: "storage_only", | |
| 147 field_size: 1, | |
| 148 default_value: "false", | |
| 149 type_name: "bool", | |
| 150 inherited: true, | |
| 151 has_custom_compare_and_copy: true, | |
| 152 }, | |
| 153 // TODO(shend): vertical align is actually a CSS property, but since we don' t support union fields | |
| 154 // which can be either a keyword or Length, this is generated as a nonproper ty for now. Remove this | |
| 155 // once we can support union fields and groups. | |
| 156 { | |
| 157 name: "VerticalAlign", | |
| 158 field_template: "storage_only", | |
| 159 field_size: 4, | |
| 160 default_value: "EVerticalAlign::kBaseline", | |
| 161 type_name: "EVerticalAlign", | |
| 162 has_custom_compare_and_copy: true, | |
| 163 }, | |
| 164 ], | |
| 165 } | |
| OLD | NEW |