| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 #ifndef ComputedStyleBase_h | 4 #ifndef ComputedStyleBase_h |
| 5 #define ComputedStyleBase_h | 5 #define ComputedStyleBase_h |
| 6 | 6 |
| 7 #include "core/ComputedStyleBaseConstants.h" | 7 #include "core/ComputedStyleBaseConstants.h" |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 | 9 |
| 10 {# Returns the default value for the field, converted to fit in the storage cont
ainer. #} | 10 {# Returns the default value for the field, converted to fit in the storage cont
ainer. #} |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Copies the values of any independent inherited properties from the parent | 93 // Copies the values of any independent inherited properties from the parent |
| 94 // style that are marked as inherited by this style. | 94 // style that are marked as inherited by this style. |
| 95 void propagateIndependentInheritedProperties( | 95 void propagateIndependentInheritedProperties( |
| 96 const ComputedStyleBase& parentStyle); | 96 const ComputedStyleBase& parentStyle); |
| 97 | 97 |
| 98 // Fields. | 98 // Fields. |
| 99 // TODO(sashab): Remove initialFoo() static methods and update callers to | 99 // TODO(sashab): Remove initialFoo() static methods and update callers to |
| 100 // use resetFoo(), which can be more efficient. | 100 // use resetFoo(), which can be more efficient. |
| 101 {% for field in fields %} | 101 {% for field in fields %} |
| 102 // {{field.property_name}} | 102 // {{field.property_name}} |
| 103 inline static {{field.type}} {{field.initial_method_name}}() { return {{field.
default_value}}; } | 103 inline static {{field.storage_type}} {{field.initial_method_name}}() { return
{{field.default_value}}; } |
| 104 {{field.type}} {{field.getter_method_name}}() const { return static_cast<{{fie
ld.type}}>({{field.name}}); } | 104 {{field.storage_type}} {{field.getter_method_name}}() const { return static_ca
st<{{field.storage_type}}>({{field.name}}); } |
| 105 void {{field.setter_method_name}}({{field.type}} v) { {{field.name}} = static_
cast<unsigned>(v); } | 105 void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} =
static_cast<unsigned>(v); } |
| 106 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu
e(field)}}; } | 106 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu
e(field)}}; } |
| 107 | 107 |
| 108 {% endfor %} | 108 {% endfor %} |
| 109 protected: | 109 protected: |
| 110 // Storage. | 110 // Storage. |
| 111 {% for field in fields %} | 111 {% for field in fields %} |
| 112 unsigned {{field.name}} : {{field.size}}; // {{field.type}} | 112 unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}} |
| 113 {% endfor %} | 113 {% endfor %} |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| 117 | 117 |
| 118 #endif // ComputedStyleBase_h | 118 #endif // ComputedStyleBase_h |
| OLD | NEW |