| Index: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
|
| diff --git a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
|
| index b72300c1096ea9e3790bef6a13b2bde3bb33fe0b..6d3777521d1bfb5d94308a9cdb111444d2e1e46a 100644
|
| --- a/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
|
| +++ b/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl
|
| @@ -1,4 +1,4 @@
|
| -{% from 'macros.tmpl' import license %}
|
| +{% from 'macros.tmpl' import license, trailing %}
|
| {{license()}}
|
|
|
| #ifndef ComputedStyleBase_h
|
| @@ -11,9 +11,10 @@
|
| {% endfor %}
|
|
|
| {# Returns the default value for the field, converted to fit in the storage container. #}
|
| -{% macro default_value(field) %}
|
| +{% macro default_value(field) -%}
|
| {# We only support enum fields for now. #}
|
| -static_cast<unsigned>({{field.default_value}}){% endmacro %}
|
| +static_cast<unsigned>({{field.default_value}})
|
| +{%- endmacro %}
|
|
|
| namespace blink {
|
|
|
| @@ -23,25 +24,23 @@ class CORE_EXPORT ComputedStyleBase {
|
| public:
|
| ALWAYS_INLINE ComputedStyleBase() :
|
| {% for field in fields %}
|
| - {% set trailing_comma = "," if field != fields[-1] else "" %}
|
| - {{field.name}}({{default_value(field)}}){{trailing_comma}}
|
| + {{field.name}}({{default_value(field)}}){{trailing(loop, ',')}}
|
| {% endfor %}
|
| {}
|
| ~ComputedStyleBase() {}
|
|
|
| ALWAYS_INLINE ComputedStyleBase(const ComputedStyleBase& o) :
|
| {% for field in fields %}
|
| - {% set trailing_comma = "," if field != fields[-1] else "" %}
|
| - {{field.name}}(o.{{field.name}}){{trailing_comma}}
|
| + {{field.name}}(o.{{field.name}}){{trailing(loop, ',')}}
|
| {% endfor %}
|
| {}
|
|
|
| bool operator==(const ComputedStyleBase& o) const {
|
| return true &&
|
| {% for field in fields %}
|
| - {{field.name}} == o.{{field.name}} &&
|
| + {{field.name}} == o.{{field.name}}{{trailing(loop, ' &&')}}
|
| {% endfor %}
|
| - true;
|
| + ;
|
| }
|
|
|
| bool operator!=(const ComputedStyleBase& o) const { return !(*this == o); }
|
| @@ -49,33 +48,33 @@ class CORE_EXPORT ComputedStyleBase {
|
| inline bool inheritedEqual(const ComputedStyleBase& o) const {
|
| return true &&
|
| {% for field in fields if field.is_property and field.is_inherited %}
|
| - {{field.name}} == o.{{field.name}} &&
|
| + {{field.name}} == o.{{field.name}}{{trailing(loop, ' &&')}}
|
| {% endfor %}
|
| - true;
|
| + ;
|
| }
|
|
|
| inline bool independentInheritedEqual(const ComputedStyleBase& o) const {
|
| return true &&
|
| {% for field in fields if field.is_property and field.is_inherited and field.is_independent %}
|
| - {{field.name}} == o.{{field.name}} &&
|
| + {{field.name}} == o.{{field.name}}{{trailing(loop, ' &&')}}
|
| {% endfor %}
|
| - true;
|
| + ;
|
| }
|
|
|
| inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const {
|
| return true &&
|
| {% for field in fields if field.is_property and field.is_inherited and not field.is_independent %}
|
| - {{field.name}} == o.{{field.name}} &&
|
| + {{field.name}} == o.{{field.name}}{{trailing(loop, ' &&')}}
|
| {% endfor %}
|
| - true;
|
| + ;
|
| }
|
|
|
| inline bool nonInheritedEqual(const ComputedStyleBase& o) const {
|
| return true &&
|
| {% for field in fields if field.is_property and not field.is_inherited %}
|
| - {{field.name}} == o.{{field.name}} &&
|
| + {{field.name}} == o.{{field.name}}{{trailing(loop, ' &&')}}
|
| {% endfor %}
|
| - true;
|
| + ;
|
| }
|
|
|
| void setBitDefaults() {
|
|
|