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

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

Issue 2667543002: Moved nonproperty 'unique' to be generated in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 {% from 'macros.tmpl' import license %} 1 {% from 'macros.tmpl' import license %}
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 field in fields if field.storage_type_path != None %} 9 {% for field in fields if field.storage_type_path != None %}
10 #include "{{field.storage_type_path}}.h" 10 #include "{{field.storage_type_path}}.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void propagateIndependentInheritedProperties( 98 void propagateIndependentInheritedProperties(
99 const ComputedStyleBase& parentStyle); 99 const ComputedStyleBase& parentStyle);
100 100
101 // Fields. 101 // Fields.
102 // TODO(sashab): Remove initialFoo() static methods and update callers to 102 // TODO(sashab): Remove initialFoo() static methods and update callers to
103 // use resetFoo(), which can be more efficient. 103 // use resetFoo(), which can be more efficient.
104 {% for field in fields %} 104 {% for field in fields %}
105 // {{field.property_name}} 105 // {{field.property_name}}
106 inline static {{field.storage_type}} {{field.initial_method_name}}() { return {{field.default_value}}; } 106 inline static {{field.storage_type}} {{field.initial_method_name}}() { return {{field.default_value}}; }
107 {{field.storage_type}} {{field.getter_method_name}}() const { return static_ca st<{{field.storage_type}}>({{field.name}}); } 107 {{field.storage_type}} {{field.getter_method_name}}() const { return static_ca st<{{field.storage_type}}>({{field.name}}); }
108 {% if field.is_nonproperty %}
109 void {{field.setter_method_name}}() { {{field.name}} = static_cast<unsigned>(t rue); }
110 {% else %}
108 void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); } 111 void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); }
112 {% endif %}
109 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu e(field)}}; } 113 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu e(field)}}; }
110 114
111 {% endfor %} 115 {% endfor %}
112 protected: 116 protected:
113 // Storage. 117 // Storage.
114 {% for field in fields %} 118 {% for field in fields %}
115 unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}} 119 unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}}
116 {% endfor %} 120 {% endfor %}
117 }; 121 };
118 122
119 } // namespace blink 123 } // namespace blink
120 124
121 #endif // ComputedStyleBase_h 125 #endif // ComputedStyleBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698