OLD | NEW |
1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
2 {{license()}} | 2 {{license()}} |
3 | 3 |
4 #include "core/css/resolver/StyleBuilder.h" | 4 #include "core/css/resolver/StyleBuilder.h" |
5 | 5 |
6 #include "StyleBuilderFunctions.h" | 6 #include "StyleBuilderFunctions.h" |
7 #include "core/css/CSSProperty.h" | 7 #include "core/css/CSSProperty.h" |
8 #include "core/css/resolver/StyleResolverState.h" | 8 #include "core/css/resolver/StyleResolverState.h" |
9 | 9 |
10 // FIXME: currently we're just generating a switch statement, but we should | 10 // FIXME: currently we're just generating a switch statement, but we should |
(...skipping 15 matching lines...) Expand all Loading... |
26 if (isInitial) | 26 if (isInitial) |
27 StyleBuilderFunctions::applyInitial{{used_property_id}}(state); | 27 StyleBuilderFunctions::applyInitial{{used_property_id}}(state); |
28 else if (isInherit) | 28 else if (isInherit) |
29 StyleBuilderFunctions::applyInherit{{used_property_id}}(state); | 29 StyleBuilderFunctions::applyInherit{{used_property_id}}(state); |
30 else | 30 else |
31 StyleBuilderFunctions::applyValue{{used_property_id}}(state, value); | 31 StyleBuilderFunctions::applyValue{{used_property_id}}(state, value); |
32 return; | 32 return; |
33 | 33 |
34 {% endfor %} | 34 {% endfor %} |
35 case CSSPropertyVariable: | 35 case CSSPropertyVariable: |
36 ASSERT(!isInitial && !isInherit); | 36 DCHECK(!isInitial && !isInherit); |
37 StyleBuilderFunctions::applyValueCSSPropertyVariable(state, value); | 37 StyleBuilderFunctions::applyValueCSSPropertyVariable(state, value); |
38 return; | 38 return; |
39 {% for property_id, property in properties.items() if property.direction_awa
re %} | 39 {% for property_id, property in properties.items() if property.direction_awa
re %} |
40 case {{property_id}}: | 40 case {{property_id}}: |
41 {% endfor %} | 41 {% endfor %} |
42 { | 42 { |
43 CSSPropertyID resolvedProperty = CSSProperty::ResolveDirectionAwarePropert
y(property, state.Style()->Direction(), state.Style()->GetWritingMode()); | 43 CSSPropertyID resolvedProperty = CSSProperty::ResolveDirectionAwarePropert
y(property, state.Style()->Direction(), state.Style()->GetWritingMode()); |
44 DCHECK_NE(resolvedProperty, property); | 44 DCHECK_NE(resolvedProperty, property); |
45 ApplyProperty(resolvedProperty, state, value); | 45 ApplyProperty(resolvedProperty, state, value); |
46 return; | 46 return; |
47 } | 47 } |
48 {% for property_id, property in properties.items() if property.builder_skip
%} | 48 {% for property_id, property in properties.items() if property.builder_skip
%} |
49 case {{property_id}}: | 49 case {{property_id}}: |
50 {% endfor %} | 50 {% endfor %} |
51 return; | 51 return; |
52 default: | 52 default: |
53 NOTREACHED(); | 53 NOTREACHED(); |
54 } | 54 } |
55 } | 55 } |
56 | 56 |
57 } // namespace blink | 57 } // namespace blink |
OLD | NEW |