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

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

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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 #include "core/ComputedStyleBase.h" 4 #include "core/ComputedStyleBase.h"
5 #include "wtf/SizeAssertions.h" 5 #include "wtf/SizeAssertions.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 struct SameSizeAsComputedStyleBase { 9 struct SameSizeAsComputedStyleBase {
10 {% for field in fields|rejectattr("is_bit_field") %} 10 {% for field in fields|rejectattr("is_bit_field") %}
11 {{field.type_name}} {{field.name}}}; 11 {{field.type_name}} {{field.name}}};
12 {% endfor %} 12 {% endfor %}
13 unsigned m_bit_fields[{{expected_bit_field_bytes}}]; 13 unsigned m_bit_fields[{{expected_bit_field_bytes}}];
14 }; 14 };
15 // If this fails, the packing algorithm in make_computed_style_base.py has 15 // If this fails, the packing algorithm in make_computed_style_base.py has
16 // failed to produce the optimal packed size. To fix, update the algorithm to 16 // failed to produce the optimal packed size. To fix, update the algorithm to
17 // ensure that the buckets are placed so that each takes up at most 1 word. 17 // ensure that the buckets are placed so that each takes up at most 1 word.
18 ASSERT_SIZE(ComputedStyleBase, SameSizeAsComputedStyleBase); 18 ASSERT_SIZE(ComputedStyleBase, SameSizeAsComputedStyleBase);
19 19
20 void ComputedStyleBase::inheritFrom(const ComputedStyleBase& inheritParent, 20 void ComputedStyleBase::InheritFrom(const ComputedStyleBase& inheritParent,
21 IsAtShadowBoundary isAtShadowBoundary) { 21 IsAtShadowBoundary isAtShadowBoundary) {
22 {% for field in fields if field.is_inherited %} 22 {% for field in fields if field.is_inherited %}
23 {{field.name}} = inheritParent.{{field.name}}; 23 {{field.name}} = inheritParent.{{field.name}};
24 {% endfor %} 24 {% endfor %}
25 } 25 }
26 26
27 void ComputedStyleBase::copyNonInheritedFromCached( 27 void ComputedStyleBase::CopyNonInheritedFromCached(
28 const ComputedStyleBase& other) { 28 const ComputedStyleBase& other) {
29 {% for field in fields if (field.is_property and not field.is_inherited) or fi eld.is_inherited_flag %} 29 {% for field in fields if (field.is_property and not field.is_inherited) or fi eld.is_inherited_flag %}
30 {{field.name}} = other.{{field.name}}; 30 {{field.name}} = other.{{field.name}};
31 {% endfor %} 31 {% endfor %}
32 } 32 }
33 33
34 void ComputedStyleBase::propagateIndependentInheritedProperties( 34 void ComputedStyleBase::PropagateIndependentInheritedProperties(
35 const ComputedStyleBase& parentStyle) { 35 const ComputedStyleBase& parentStyle) {
36 {% for field in fields if field.is_property and field.is_independent %} 36 {% for field in fields if field.is_property and field.is_independent %}
37 if ({{field.is_inherited_method_name}}()) 37 if ({{field.is_inherited_method_name}}())
38 {{field.setter_method_name}}(parentStyle.{{field.getter_method_name}}()); 38 {{field.setter_method_name}}(parentStyle.{{field.getter_method_name}}());
39 {% endfor %} 39 {% endfor %}
40 } 40 }
41 41
42 } // namespace blink 42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698