Chromium Code Reviews| Index: Source/build/scripts/templates/StyleBuilder.cpp.tmpl |
| diff --git a/Source/build/scripts/templates/StyleBuilder.cpp.tmpl b/Source/build/scripts/templates/StyleBuilder.cpp.tmpl |
| index 94b468d233c1b729746b2cfbb55697a7bc861a8d..883367488faadd76e5da865a3ab29684c79f6290 100644 |
| --- a/Source/build/scripts/templates/StyleBuilder.cpp.tmpl |
| +++ b/Source/build/scripts/templates/StyleBuilder.cpp.tmpl |
| @@ -30,6 +30,8 @@ void StyleBuilderFunctions::applyInitial{{property_id}}(StyleResolverState& stat |
| { |
| {%- if property.svg %} |
| {{ set_value(property) }}(SVGRenderStyle::{{property.initial}}()); |
| +{%- elif property.font %} |
| + state.fontBuilder().{{property.setter}}(FontBuilder::{{property.initial}}()); |
| {%- else %} |
| {{ set_value(property) }}(RenderStyle::{{property.initial}}()); |
| {%- endif %} |
| @@ -41,6 +43,8 @@ void StyleBuilderFunctions::applyInherit{{property_id}}(StyleResolverState& stat |
| { |
| {%- if property.svg %} |
| {{ set_value(property) }}(state.parentStyle()->svgStyle()->{{property.getter}}()); |
| +{%- elif property.font %} |
| + state.fontBuilder().{{property.setter}}(state.parentFontDescription().{{property.getter}}()); |
| {%- else %} |
| {{ set_value(property) }}(state.parentStyle()->{{property.getter}}()); |
| {%- endif %} |
| @@ -52,6 +56,10 @@ void StyleBuilderFunctions::applyValue{{property_id}}(StyleResolverState& state, |
| { |
| {%- if property.converter %} |
| {{ set_value(property) }}(StyleBuilderConverter::{{property.converter}}(state, value)); |
| +{%- elif property.font %} |
| + if (!value->isPrimitiveValue()) |
|
Timothy Loh
2014/03/04 05:58:22
Can we see if removing this branch doesn't break a
dglazkov
2014/03/05 04:05:19
Will do next!
|
| + return; |
| + state.fontBuilder().{{property.setter}}(static_cast<{{property.type_name}}>(*toCSSPrimitiveValue(value))); |
| {%- else %} |
| {{ set_value(property) }}(static_cast<{{property.type_name}}>(*toCSSPrimitiveValue(value))); |
| {%- endif %} |