| 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/ComputedStyleBaseConstants.h" | 7 #include "core/ComputedStyleBaseConstants.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 17 matching lines...) Expand all Loading... |
| 28 {% endfor %} | 28 {% endfor %} |
| 29 {} | 29 {} |
| 30 ~ComputedStyleBase() {} | 30 ~ComputedStyleBase() {} |
| 31 | 31 |
| 32 ALWAYS_INLINE ComputedStyleBase(const ComputedStyleBase& o) : | 32 ALWAYS_INLINE ComputedStyleBase(const ComputedStyleBase& o) : |
| 33 {% for field in fields %} | 33 {% for field in fields %} |
| 34 {{field.name}}(o.{{field.name}}){{print_if(not loop.last, ',')}} | 34 {{field.name}}(o.{{field.name}}){{print_if(not loop.last, ',')}} |
| 35 {% endfor %} | 35 {% endfor %} |
| 36 {} | 36 {} |
| 37 | 37 |
| 38 inline bool inheritedEqual(const ComputedStyleBase& o) const { | |
| 39 return ( | |
| 40 {% for field in fields if field.is_property and field.is_inherited %} | |
| 41 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | |
| 42 {% endfor %} | |
| 43 ); | |
| 44 } | |
| 45 | |
| 46 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { | 38 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { |
| 47 return ( | 39 return ( |
| 48 {% for field in fields if field.is_property and field.is_inherited and field
.is_independent %} | 40 {% for field in fields if field.is_property and field.is_inherited and field
.is_independent %} |
| 49 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 41 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 50 {% endfor %} | 42 {% endfor %} |
| 51 ); | 43 ); |
| 52 } | 44 } |
| 53 | 45 |
| 54 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { | 46 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { |
| 55 return ( | 47 return ( |
| 56 {% for field in fields if field.is_property and field.is_inherited and not f
ield.is_independent %} | 48 {% for field in fields if field.is_property and field.is_inherited and not f
ield.is_independent %} |
| 57 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 49 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 58 {% endfor %} | 50 {% endfor %} |
| 59 ); | 51 ); |
| 60 } | 52 } |
| 61 | 53 |
| 54 inline bool inheritedEqual(const ComputedStyleBase& o) const { |
| 55 return independentInheritedEqual(o) && nonIndependentInheritedEqual(o); |
| 56 } |
| 57 |
| 62 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { | 58 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { |
| 63 return ( | 59 return ( |
| 64 {% for field in fields if field.is_property and not field.is_inherited %} | 60 {% for field in fields if field.is_property and not field.is_inherited %} |
| 65 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 61 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 66 {% endfor %} | 62 {% endfor %} |
| 67 ); | 63 ); |
| 68 } | 64 } |
| 69 | 65 |
| 70 enum IsAtShadowBoundary { | 66 enum IsAtShadowBoundary { |
| 71 AtShadowBoundary, | 67 AtShadowBoundary, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 protected: | 106 protected: |
| 111 // Storage. | 107 // Storage. |
| 112 {% for field in fields %} | 108 {% for field in fields %} |
| 113 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} | 109 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} |
| 114 {% endfor %} | 110 {% endfor %} |
| 115 }; | 111 }; |
| 116 | 112 |
| 117 } // namespace blink | 113 } // namespace blink |
| 118 | 114 |
| 119 #endif // ComputedStyleBase_h | 115 #endif // ComputedStyleBase_h |
| OLD | NEW |