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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: Rebasing the fixes... 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 28 matching lines...) Expand all
39 bool operator==(const ComputedStyleBase& o) const { 39 bool operator==(const ComputedStyleBase& o) const {
40 return true && 40 return true &&
41 {% for field in fields %} 41 {% for field in fields %}
42 {{field.name}} == o.{{field.name}} && 42 {{field.name}} == o.{{field.name}} &&
43 {% endfor %} 43 {% endfor %}
44 true; 44 true;
45 } 45 }
46 46
47 bool operator!=(const ComputedStyleBase& o) const { return !(*this == o); } 47 bool operator!=(const ComputedStyleBase& o) const { return !(*this == o); }
48 48
49 inline bool inheritedEqual(const ComputedStyleBase& o) const { 49 inline bool InheritedEqual(const ComputedStyleBase& o) const {
50 return true && 50 return true &&
51 {% for field in fields if field.is_property and field.is_inherited %} 51 {% for field in fields if field.is_property and field.is_inherited %}
52 {{field.name}} == o.{{field.name}} && 52 {{field.name}} == o.{{field.name}} &&
53 {% endfor %} 53 {% endfor %}
54 true; 54 true;
55 } 55 }
56 56
57 inline bool independentInheritedEqual(const ComputedStyleBase& o) const { 57 inline bool IndependentInheritedEqual(const ComputedStyleBase& o) const {
58 return true && 58 return true &&
59 {% for field in fields if field.is_property and field.is_inherited and field .is_independent %} 59 {% for field in fields if field.is_property and field.is_inherited and field .is_independent %}
60 {{field.name}} == o.{{field.name}} && 60 {{field.name}} == o.{{field.name}} &&
61 {% endfor %} 61 {% endfor %}
62 true; 62 true;
63 } 63 }
64 64
65 inline bool nonIndependentInheritedEqual(const ComputedStyleBase& o) const { 65 inline bool NonIndependentInheritedEqual(const ComputedStyleBase& o) const {
66 return true && 66 return true &&
67 {% for field in fields if field.is_property and field.is_inherited and not f ield.is_independent %} 67 {% for field in fields if field.is_property and field.is_inherited and not f ield.is_independent %}
68 {{field.name}} == o.{{field.name}} && 68 {{field.name}} == o.{{field.name}} &&
69 {% endfor %} 69 {% endfor %}
70 true; 70 true;
71 } 71 }
72 72
73 inline bool nonInheritedEqual(const ComputedStyleBase& o) const { 73 inline bool NonInheritedEqual(const ComputedStyleBase& o) const {
74 return true && 74 return true &&
75 {% for field in fields if field.is_property and not field.is_inherited %} 75 {% for field in fields if field.is_property and not field.is_inherited %}
76 {{field.name}} == o.{{field.name}} && 76 {{field.name}} == o.{{field.name}} &&
77 {% endfor %} 77 {% endfor %}
78 true; 78 true;
79 } 79 }
80 80
81 void setBitDefaults() { 81 void SetBitDefaults() {
82 {% for field in fields %} 82 {% for field in fields %}
83 {{field.resetter_method_name}}(); 83 {{field.resetter_method_name}}();
84 {% endfor %} 84 {% endfor %}
85 } 85 }
86 86
87 enum IsAtShadowBoundary { 87 enum IsAtShadowBoundary {
88 AtShadowBoundary, 88 kAtShadowBoundary,
89 NotAtShadowBoundary, 89 kNotAtShadowBoundary,
90 }; 90 };
91 void inheritFrom(const ComputedStyleBase& inheritParent, 91 void InheritFrom(const ComputedStyleBase& inheritParent,
92 IsAtShadowBoundary isAtShadowBoundary = NotAtShadowBoundary); 92 IsAtShadowBoundary isAtShadowBoundary = kNotAtShadowBoundary) ;
93 93
94 void copyNonInheritedFromCached(const ComputedStyleBase& other); 94 void CopyNonInheritedFromCached(const ComputedStyleBase& other);
95 95
96 // Copies the values of any independent inherited properties from the parent 96 // Copies the values of any independent inherited properties from the parent
97 // style that are marked as inherited by this style. 97 // style that are marked as inherited by this style.
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 void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); } 108 void {{field.setter_method_name}}({{field.storage_type}} v) { {{field.name}} = static_cast<unsigned>(v); }
109 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu e(field)}}; } 109 inline void {{field.resetter_method_name}}() { {{field.name}} = {{default_valu e(field)}}; }
110 110
111 {% endfor %} 111 {% endfor %}
112 protected: 112 protected:
113 // Storage. 113 // Storage.
114 {% for field in fields %} 114 {% for field in fields %}
115 unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}} 115 unsigned {{field.name}} : {{field.size}}; // {{field.storage_type}}
116 {% endfor %} 116 {% endfor %}
117 }; 117 };
118 118
119 } // namespace blink 119 } // namespace blink
120 120
121 #endif // ComputedStyleBase_h 121 #endif // ComputedStyleBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698