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

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

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: Created 3 years, 7 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 | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | 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 %} 1 {% from 'macros.tmpl' import license %}
2 {% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwi se_copy %} 2 {% from 'fields/field.tmpl' import getter_expression, setter_expression, fieldwi se_copy %}
3 {{license()}} 3 {{license()}}
4 4
5 #include "core/ComputedStyleBase.h" 5 #include "core/ComputedStyleBase.h"
6 #include "platform/wtf/SizeAssertions.h" 6 #include "platform/wtf/SizeAssertions.h"
7 7
8 namespace blink { 8 namespace blink {
9 9
10 struct SameSizeAsComputedStyleBase { 10 struct SameSizeAsComputedStyleBase {
11 {% if computed_style.subgroups is defined %} 11 {% if computed_style.subgroups is defined %}
12 void* dataRefs[{{computed_style.subgroups|length}}]; 12 void* dataRefs[{{computed_style.subgroups|length}}];
13 {% endif %} 13 {% endif %}
14 {% for field in computed_style.fields|rejectattr("is_bit_field") %} 14 {% for field in computed_style.fields|rejectattr("is_bit_field") %}
15 {{field.type_name}} {{field.name}}}; 15 {{field.type_name}} {{field.name}};
nainar 2017/05/04 03:06:56 This is cleaning up an erroneous bracket added in
16 {% endfor %} 16 {% endfor %}
17 unsigned m_bit_fields[{{computed_style.num_32_bit_words_for_bit_fields}}]; 17 unsigned m_bit_fields[{{computed_style.num_32_bit_words_for_bit_fields}}];
18 }; 18 };
19 19
20 // If this fails, the packing algorithm in make_computed_style_base.py has 20 // If this fails, the packing algorithm in make_computed_style_base.py has
21 // failed to produce the optimal packed size. To fix, update the algorithm to 21 // failed to produce the optimal packed size. To fix, update the algorithm to
22 // ensure that the buckets are placed so that each takes up at most 1 word. 22 // ensure that the buckets are placed so that each takes up at most 1 word.
23 ASSERT_SIZE(ComputedStyleBase, SameSizeAsComputedStyleBase); 23 ASSERT_SIZE(ComputedStyleBase, SameSizeAsComputedStyleBase);
24 24
25 void ComputedStyleBase::InheritFrom(const ComputedStyleBase& other, 25 void ComputedStyleBase::InheritFrom(const ComputedStyleBase& other,
(...skipping 16 matching lines...) Expand all
42 42
43 void ComputedStyleBase::PropagateIndependentInheritedProperties( 43 void ComputedStyleBase::PropagateIndependentInheritedProperties(
44 const ComputedStyleBase& parentStyle) { 44 const ComputedStyleBase& parentStyle) {
45 {% for field in computed_style.all_fields if field.is_property and field.is_in dependent %} 45 {% for field in computed_style.all_fields if field.is_property and field.is_in dependent %}
46 if ({{field.is_inherited_method_name}}()) 46 if ({{field.is_inherited_method_name}}())
47 {{setter_expression(field)}} = parentStyle.{{getter_expression(field)}}; 47 {{setter_expression(field)}} = parentStyle.{{getter_expression(field)}};
48 {% endfor %} 48 {% endfor %}
49 } 49 }
50 50
51 } // namespace blink 51 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSProperties.json5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698