OLD | NEW |
1 {% from 'macros.tmpl' import license, print_if %} | 1 {% from 'macros.tmpl' import license, print_if %} |
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/style/ComputedStyleConstants.h" | 7 #include "core/style/ComputedStyleConstants.h" |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 {% for path in include_paths %} | 9 {% for path in include_paths %} |
10 #include "{{path}}" | 10 #include "{{path}}" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // Fields. | 72 // Fields. |
73 // TODO(sashab): Remove initialFoo() static methods and update callers to | 73 // TODO(sashab): Remove initialFoo() static methods and update callers to |
74 // use resetFoo(), which can be more efficient. | 74 // use resetFoo(), which can be more efficient. |
75 | 75 |
76 {% for field in fields %} | 76 {% for field in fields %} |
77 // {{field.property_name}} | 77 // {{field.property_name}} |
78 {{field_templates[field.field_template].decl_methods(field)|indent(2)}} | 78 {{field_templates[field.field_template].decl_methods(field)|indent(2)}} |
79 | 79 |
80 {% endfor %} | 80 {% endfor %} |
81 protected: | 81 protected: |
| 82 // Constructor and destructor are protected so that only the parent class Comp
utedStyle |
| 83 // can instantiate this class. |
82 ALWAYS_INLINE ComputedStyleBase() : | 84 ALWAYS_INLINE ComputedStyleBase() : |
83 {% for field in fields %} | 85 {% for field in fields %} |
84 {{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(n
ot loop.last, ',')}} | 86 {{field.name}}(static_cast<unsigned>({{field.default_value}})){{print_if(n
ot loop.last, ',')}} |
85 {% endfor %} | 87 {% endfor %} |
86 {} | 88 {} |
87 | 89 |
88 ~ComputedStyleBase() = default; | 90 ~ComputedStyleBase() = default; |
89 | 91 |
90 // Storage. | 92 // Storage. |
91 {% for field in fields %} | 93 {% for field in fields %} |
92 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} | 94 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} |
93 {% endfor %} | 95 {% endfor %} |
94 }; | 96 }; |
95 | 97 |
96 } // namespace blink | 98 } // namespace blink |
97 | 99 |
98 #endif // ComputedStyleBase_h | 100 #endif // ComputedStyleBase_h |
OLD | NEW |