| 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 18 matching lines...) Expand all Loading... |
| 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 bool operator==(const ComputedStyleBase& o) const { | 38 bool operator==(const ComputedStyleBase& o) const { |
| 39 return true && | 39 return ( |
| 40 {% for field in fields %} | 40 {% for field in fields %} |
| 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 bool operator!=(const ComputedStyleBase& o) const { return !(*this == o); } | 46 bool operator!=(const ComputedStyleBase& o) const { return !(*this == o); } |
| 47 | 47 |
| 48 inline bool inheritedEqual(const ComputedStyleBase& o) const { | 48 inline bool inheritedEqual(const ComputedStyleBase& o) const { |
| 49 return true && | 49 return ( |
| 50 {% for field in fields if field.is_property and field.is_inherited %} | 50 {% for field in fields if field.is_property and field.is_inherited %} |
| 51 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 51 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 52 {% endfor %} | 52 {% endfor %} |
| 53 ; | 53 ); |
| 54 } | 54 } |
| 55 | 55 |
| 56 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { | 56 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { |
| 57 return true && | 57 return ( |
| 58 {% for field in fields if field.is_property and field.is_inherited and field
.is_independent %} | 58 {% for field in fields if field.is_property and field.is_inherited and field
.is_independent %} |
| 59 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 59 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 60 {% endfor %} | 60 {% endfor %} |
| 61 ; | 61 ); |
| 62 } | 62 } |
| 63 | 63 |
| 64 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { | 64 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { |
| 65 return true && | 65 return ( |
| 66 {% for field in fields if field.is_property and field.is_inherited and not f
ield.is_independent %} | 66 {% for field in fields if field.is_property and field.is_inherited and not f
ield.is_independent %} |
| 67 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 67 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 68 {% endfor %} | 68 {% endfor %} |
| 69 ; | 69 ); |
| 70 } | 70 } |
| 71 | 71 |
| 72 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { | 72 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { |
| 73 return true && | 73 return ( |
| 74 {% for field in fields if field.is_property and not field.is_inherited %} | 74 {% for field in fields if field.is_property and not field.is_inherited %} |
| 75 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} | 75 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} |
| 76 {% endfor %} | 76 {% endfor %} |
| 77 ; | 77 ); |
| 78 } | 78 } |
| 79 | 79 |
| 80 enum IsAtShadowBoundary { | 80 enum IsAtShadowBoundary { |
| 81 AtShadowBoundary, | 81 AtShadowBoundary, |
| 82 NotAtShadowBoundary, | 82 NotAtShadowBoundary, |
| 83 }; | 83 }; |
| 84 void inheritFrom(const ComputedStyleBase& inheritParent, | 84 void inheritFrom(const ComputedStyleBase& inheritParent, |
| 85 IsAtShadowBoundary isAtShadowBoundary = NotAtShadowBoundary); | 85 IsAtShadowBoundary isAtShadowBoundary = NotAtShadowBoundary); |
| 86 | 86 |
| 87 void copyNonInheritedFromCached(const ComputedStyleBase& other); | 87 void copyNonInheritedFromCached(const ComputedStyleBase& other); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 protected: | 120 protected: |
| 121 // Storage. | 121 // Storage. |
| 122 {% for field in fields %} | 122 {% for field in fields %} |
| 123 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} | 123 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} |
| 124 {% endfor %} | 124 {% endfor %} |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 } // namespace blink | 127 } // namespace blink |
| 128 | 128 |
| 129 #endif // ComputedStyleBase_h | 129 #endif // ComputedStyleBase_h |
| OLD | NEW |