| 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); |
| 37 DCHECK(!isInherit); |
| 37 StyleBuilderFunctions::applyValueCSSPropertyVariable(state, value); | 38 StyleBuilderFunctions::applyValueCSSPropertyVariable(state, value); |
| 38 return; | 39 return; |
| 39 {% for property_id, property in properties.items() if property.direction_awa
re %} | 40 {% for property_id, property in properties.items() if property.direction_awa
re %} |
| 40 case {{property_id}}: | 41 case {{property_id}}: |
| 41 {% endfor %} | 42 {% endfor %} |
| 42 { | 43 { |
| 43 CSSPropertyID resolvedProperty = CSSProperty::ResolveDirectionAwarePropert
y(property, state.Style()->Direction(), state.Style()->GetWritingMode()); | 44 CSSPropertyID resolvedProperty = CSSProperty::ResolveDirectionAwarePropert
y(property, state.Style()->Direction(), state.Style()->GetWritingMode()); |
| 44 DCHECK_NE(resolvedProperty, property); | 45 DCHECK_NE(resolvedProperty, property); |
| 45 ApplyProperty(resolvedProperty, state, value); | 46 ApplyProperty(resolvedProperty, state, value); |
| 46 return; | 47 return; |
| 47 } | 48 } |
| 48 {% for property_id, property in properties.items() if property.builder_skip
%} | 49 {% for property_id, property in properties.items() if property.builder_skip
%} |
| 49 case {{property_id}}: | 50 case {{property_id}}: |
| 50 {% endfor %} | 51 {% endfor %} |
| 51 return; | 52 return; |
| 52 default: | 53 default: |
| 53 NOTREACHED(); | 54 NOTREACHED(); |
| 54 } | 55 } |
| 55 } | 56 } |
| 56 | 57 |
| 57 } // namespace blink | 58 } // namespace blink |
| OLD | NEW |