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

Side by Side Diff: trunk/Source/build/scripts/templates/StyleBuilder.cpp.tmpl

Issue 203583004: Revert 168577 "Remove spurious check for invalid value." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698