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, but the only relevant ones i
n |
| 21 // this file are: |
| 22 // name, field_template, field_type_path, default_value, type_name, keyword, |
| 23 // inherited |
| 24 }, |
| 25 |
| 26 data: [ |
| 27 { |
| 28 name: "IsLink", |
| 29 field_template: "monotonic_flag", |
| 30 default_value: "false", |
| 31 has_custom_compare_and_copy: true, |
| 32 }, |
| 33 { |
| 34 name: "OriginalDisplay", |
| 35 field_template: "keyword", |
| 36 default_value: "inline", |
| 37 type_name: "EDisplay", |
| 38 keywords: [ |
| 39 "inline", "block", "list-item", "inline-block", "table", "inline-table
", "table-row-group", "table-header-group", |
| 40 "table-footer-group", "table-row", "table-column-group", "table-column
", "table-cell", "table-caption", "-webkit-box", |
| 41 "-webkit-inline-box", "flex", "inline-flex", "grid", "inline-grid", "c
ontents", "flow-root", "none", |
| 42 ], |
| 43 has_custom_compare_and_copy: true, |
| 44 }, |
| 45 { |
| 46 name: "InsideLink", |
| 47 field_template: "keyword", |
| 48 default_value: "not-inside-link", |
| 49 keywords: ["not-inside-link", "inside-unvisited-link", "inside-visited-lin
k"], |
| 50 inherited: true, |
| 51 has_custom_compare_and_copy: true, |
| 52 }, |
| 53 // Style can not be shared. |
| 54 { |
| 55 name: "Unique", |
| 56 field_template: "monotonic_flag", |
| 57 default_value: "false", |
| 58 has_custom_compare_and_copy: true, |
| 59 }, |
| 60 // Whether this style is affected by these pseudo-classes. |
| 61 { |
| 62 name: "AffectedByFocus", |
| 63 field_template: "monotonic_flag", |
| 64 default_value: "false", |
| 65 has_custom_compare_and_copy: true, |
| 66 }, |
| 67 { |
| 68 name: "AffectedByFocusWithin", |
| 69 field_template: "monotonic_flag", |
| 70 default_value: "false", |
| 71 has_custom_compare_and_copy: true, |
| 72 }, |
| 73 { |
| 74 name: "AffectedByHover", |
| 75 field_template: "monotonic_flag", |
| 76 default_value: "false", |
| 77 has_custom_compare_and_copy: true, |
| 78 }, |
| 79 { |
| 80 name: "AffectedByActive", |
| 81 field_template: "monotonic_flag", |
| 82 default_value: "false", |
| 83 has_custom_compare_and_copy: true, |
| 84 }, |
| 85 { |
| 86 name: "AffectedByDrag", |
| 87 field_template: "monotonic_flag", |
| 88 default_value: "false", |
| 89 has_custom_compare_and_copy: true, |
| 90 }, |
| 91 // A non-inherited property references a variable or @apply is used |
| 92 { |
| 93 name: "HasVariableReferenceFromNonInheritedProperty", |
| 94 field_template: "monotonic_flag", |
| 95 default_value: "false", |
| 96 has_custom_compare_and_copy: true, |
| 97 }, |
| 98 // Explicitly inherits a non-inherited property |
| 99 { |
| 100 name: "HasExplicitlyInheritedProperties", |
| 101 field_template: "monotonic_flag", |
| 102 default_value: "false", |
| 103 has_custom_compare_and_copy: true, |
| 104 }, |
| 105 // These are set if we used viewport or rem units when resolving a length. |
| 106 // TODO(shend): HasViewportUnits should be a monotonic_flag. |
| 107 { |
| 108 name: "HasViewportUnits", |
| 109 field_template: "primitive", |
| 110 default_value: "false", |
| 111 type_name: "bool", |
| 112 has_custom_compare_and_copy: true, |
| 113 }, |
| 114 { |
| 115 name: "HasRemUnits", |
| 116 field_template: "monotonic_flag", |
| 117 default_value: "false", |
| 118 has_custom_compare_and_copy: true, |
| 119 }, |
| 120 // These properties only have generated storage, and their methods are handw
ritten in ComputedStyle. |
| 121 // TODO(shend): Remove these fields and delete the 'storage_only' template. |
| 122 { |
| 123 name: "EmptyState", |
| 124 field_template: "storage_only", |
| 125 field_size: 1, |
| 126 default_value: "false", |
| 127 type_name: "bool", |
| 128 has_custom_compare_and_copy: true, |
| 129 }, |
| 130 { |
| 131 name: "StyleType", |
| 132 field_template: "storage_only", |
| 133 field_size: 6, |
| 134 default_value: "0", |
| 135 type_name: "PseudoId", |
| 136 has_custom_compare_and_copy: true, |
| 137 }, |
| 138 { |
| 139 name: "PseudoBits", |
| 140 field_template: "storage_only", |
| 141 field_size: 8, |
| 142 default_value: "kPseudoIdNone", |
| 143 type_name: "PseudoId", |
| 144 has_custom_compare_and_copy: true, |
| 145 }, |
| 146 // True if 'underline solid' is the only text decoration on this element. |
| 147 { |
| 148 name: "HasSimpleUnderline", |
| 149 field_template: "storage_only", |
| 150 field_size: 1, |
| 151 default_value: "false", |
| 152 type_name: "bool", |
| 153 inherited: true, |
| 154 has_custom_compare_and_copy: true, |
| 155 }, |
| 156 // TODO(shend): vertical align is actually a CSS property, but since we don'
t support union fields |
| 157 // which can be either a keyword or Length, this is generated as a nonproper
ty for now. Remove this |
| 158 // once we can support union fields and groups. |
| 159 { |
| 160 name: "VerticalAlign", |
| 161 field_template: "storage_only", |
| 162 field_size: 4, |
| 163 default_value: "EVerticalAlign::kBaseline", |
| 164 type_name: "EVerticalAlign", |
| 165 has_custom_compare_and_copy: true, |
| 166 }, |
| 167 ], |
| 168 } |
OLD | NEW |