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

Unified Diff: Source/build/scripts/templates/StyleBuilder.cpp.tmpl

Issue 350333003: Cascade declared property values instead of applying values on top of each other (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/build/scripts/make_style_builder.py ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 861dda7317725bab7184f536f08667c953c1d39b..80deb380491767a2fc35e093ff26652273e458e3 100644
--- a/Source/build/scripts/templates/StyleBuilder.cpp.tmpl
+++ b/Source/build/scripts/templates/StyleBuilder.cpp.tmpl
@@ -16,28 +16,17 @@ namespace blink {
void StyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& state, CSSValue* value, bool isInitial, bool isInherit) {
switch(property) {
{% for property_id, property in properties.items()
- if not property.direction_aware and not property.skip %}
- {% set used_property = properties[property.use_handlers_for] or property %}
- {% set used_property_id = used_property.property_id %}
+ if property.should_declare_functions %}
case {{property_id}}:
if (isInitial)
- StyleBuilderFunctions::applyInitial{{used_property_id}}(state);
+ StyleBuilderFunctions::applyInitial{{property_id}}(state);
else if (isInherit)
- StyleBuilderFunctions::applyInherit{{used_property_id}}(state);
+ StyleBuilderFunctions::applyInherit{{property_id}}(state);
else
- StyleBuilderFunctions::applyValue{{used_property_id}}(state, value);
+ StyleBuilderFunctions::applyValue{{property_id}}(state, value);
return;
{% endfor %}
- {% for property_id, property in properties.items() if property.direction_aware %}
- case {{property_id}}:
- {% endfor %}
- {
- CSSPropertyID resolvedProperty = CSSProperty::resolveDirectionAwareProperty(property, state.style()->direction(), state.style()->writingMode());
- ASSERT(resolvedProperty != property);
- applyProperty(resolvedProperty, state, value);
- return;
- }
{% for property_id, property in properties.items() if property.skip %}
case {{property_id}}:
{% endfor %}
« no previous file with comments | « Source/build/scripts/make_style_builder.py ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698