Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl

Issue 2744693002: Use default copy constructor for ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10 matching lines...) Expand all
21 // The generated portion of ComputedStyle. For more info, see the header comment 21 // The generated portion of ComputedStyle. For more info, see the header comment
22 // in ComputedStyle.h. 22 // in ComputedStyle.h.
23 class CORE_EXPORT ComputedStyleBase { 23 class CORE_EXPORT ComputedStyleBase {
24 public: 24 public:
25 ALWAYS_INLINE ComputedStyleBase() : 25 ALWAYS_INLINE ComputedStyleBase() :
26 {% for field in fields %} 26 {% for field in fields %}
27 {{field.name}}({{default_value(field)}}){{print_if(not loop.last, ',')}} 27 {{field.name}}({{default_value(field)}}){{print_if(not loop.last, ',')}}
28 {% endfor %} 28 {% endfor %}
29 {} 29 {}
30 30
31 ALWAYS_INLINE ComputedStyleBase(const ComputedStyleBase& o) :
meade_UTC10 2017/03/10 04:09:11 Are we sure all the members of ComputedStyleBase w
shend 2017/03/10 05:54:52 Hopefully that won't happen :P Anyway, if one of t
32 {% for field in fields %}
33 {{field.name}}(o.{{field.name}}){{print_if(not loop.last, ',')}}
34 {% endfor %}
35 {}
36
37 inline bool inheritedEqual(const ComputedStyleBase& o) const { 31 inline bool inheritedEqual(const ComputedStyleBase& o) const {
38 return ( 32 return (
39 {% for field in fields if field.is_property and field.is_inherited %} 33 {% for field in fields if field.is_property and field.is_inherited %}
40 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}} 34 {{field.name}} == o.{{field.name}}{{print_if(not loop.last, ' &&')}}
41 {% endfor %} 35 {% endfor %}
42 ); 36 );
43 } 37 }
44 38
45 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { 39 inline bool independentInheritedEqual(const ComputedStyleBase& o) const {
46 return ( 40 return (
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 protected: 103 protected:
110 // Storage. 104 // Storage.
111 {% for field in fields %} 105 {% for field in fields %}
112 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}} 106 unsigned {{field.name}} : {{field.size}}; // {{field.type_name}}
113 {% endfor %} 107 {% endfor %}
114 }; 108 };
115 109
116 } // namespace blink 110 } // namespace blink
117 111
118 #endif // ComputedStyleBase_h 112 #endif // ComputedStyleBase_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698