OLD | NEW |
1 {% from "macros.tmpl" import wrap_with_condition, license -%} | 1 {% from "macros.tmpl" import wrap_with_condition, license -%} |
2 {{ license() }} | 2 {{ license() }} |
3 | 3 |
4 #include "config.h" | 4 #include "config.h" |
5 #include "core/css/resolver/StyleBuilder.h" | 5 #include "core/css/resolver/StyleBuilder.h" |
6 | 6 |
7 #include "StyleBuilderFunctions.h" | 7 #include "StyleBuilderFunctions.h" |
8 #include "core/css/CSSPrimitiveValueMappings.h" | 8 #include "core/css/CSSPrimitiveValueMappings.h" |
9 #include "core/css/resolver/StyleResolverState.h" | 9 #include "core/css/resolver/StyleResolverState.h" |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 {%- endif %} | 52 {%- endif %} |
53 } | 53 } |
54 {% endif %} | 54 {% endif %} |
55 | 55 |
56 {%- if not property.custom_value %} | 56 {%- if not property.custom_value %} |
57 void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state,
CSSValue* value) | 57 void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state,
CSSValue* value) |
58 { | 58 { |
59 {%- if property.converter %} | 59 {%- if property.converter %} |
60 {{ set_value(property) }}(StyleBuilderConverter::{{property.converter}}(stat
e, value)); | 60 {{ set_value(property) }}(StyleBuilderConverter::{{property.converter}}(stat
e, value)); |
61 {%- elif property.font %} | 61 {%- elif property.font %} |
| 62 if (!value->isPrimitiveValue()) |
| 63 return; |
62 {{ set_value(property) }}(static_cast<{{property.type_name}}>(*toCSSPrimitiv
eValue(value))); | 64 {{ set_value(property) }}(static_cast<{{property.type_name}}>(*toCSSPrimitiv
eValue(value))); |
63 {%- else %} | 65 {%- else %} |
64 {{ set_value(property) }}(static_cast<{{property.type_name}}>(*toCSSPrimitiv
eValue(value))); | 66 {{ set_value(property) }}(static_cast<{{property.type_name}}>(*toCSSPrimitiv
eValue(value))); |
65 {%- endif %} | 67 {%- endif %} |
66 } | 68 } |
67 {% endif %} | 69 {% endif %} |
68 | 70 |
69 {%- endcall %} | 71 {%- endcall %} |
70 {%- endfor %} | 72 {%- endfor %} |
71 | 73 |
(...skipping 12 matching lines...) Expand all Loading... |
84 StyleBuilderFunctions::applyValue{{ used_property_id }}(state, value
); | 86 StyleBuilderFunctions::applyValue{{ used_property_id }}(state, value
); |
85 return true; | 87 return true; |
86 {%- endcall %} | 88 {%- endcall %} |
87 {% endfor %} | 89 {% endfor %} |
88 default: | 90 default: |
89 return false; | 91 return false; |
90 } | 92 } |
91 } | 93 } |
92 | 94 |
93 } // namespace WebCore | 95 } // namespace WebCore |
OLD | NEW |