| 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 11 matching lines...) Expand all Loading... |
| 22 } %} | 22 } %} |
| 23 | 23 |
| 24 namespace blink { | 24 namespace blink { |
| 25 | 25 |
| 26 // The generated portion of ComputedStyle. For more info, see the header comment | 26 // The generated portion of ComputedStyle. For more info, see the header comment |
| 27 // in ComputedStyle.h. | 27 // in ComputedStyle.h. |
| 28 class CORE_EXPORT ComputedStyleBase { | 28 class CORE_EXPORT ComputedStyleBase { |
| 29 public: | 29 public: |
| 30 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { | 30 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { |
| 31 return ( | 31 return ( |
| 32 {% for field in fields if field.is_property and field.is_inherited and field
.is_independent %} | 32 {% for field in fields if field.is_inherited and field.is_independent %} |
| 33 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 33 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 34 {% endfor %} | 34 {% endfor %} |
| 35 ); | 35 ); |
| 36 } | 36 } |
| 37 | 37 |
| 38 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { | 38 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { |
| 39 return ( | 39 return ( |
| 40 {% for field in fields if field.is_property and field.is_inherited and not f
ield.is_independent %} | 40 {% for field in fields if field.is_inherited and not field.is_independent %} |
| 41 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 41 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 42 {% endfor %} | 42 {% endfor %} |
| 43 ); | 43 ); |
| 44 } | 44 } |
| 45 | 45 |
| 46 inline bool inheritedEqual(const ComputedStyleBase& o) const { | 46 inline bool inheritedEqual(const ComputedStyleBase& o) const { |
| 47 return independentInheritedEqual(o) && nonIndependentInheritedEqual(o); | 47 return independentInheritedEqual(o) && nonIndependentInheritedEqual(o); |
| 48 } | 48 } |
| 49 | 49 |
| 50 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { | 50 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 // Storage. | 90 // Storage. |
| 91 {% for field in fields %} | 91 {% for field in fields %} |
| 92 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} | 92 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} |
| 93 {% endfor %} | 93 {% endfor %} |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace blink | 96 } // namespace blink |
| 97 | 97 |
| 98 #endif // ComputedStyleBase_h | 98 #endif // ComputedStyleBase_h |
| OLD | NEW |