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

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

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ToTed Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 {% from 'macros.tmpl' import license %} 1 {% from 'macros.tmpl' import 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/CSSProperty.h" 8 #include "core/css/CSSProperty.h"
9 #include "core/css/resolver/StyleResolverState.h" 9 #include "core/css/resolver/StyleResolverState.h"
10 10
(...skipping 11 matching lines...) Expand all
22 case {{property_id}}: 22 case {{property_id}}:
23 if (isInitial) 23 if (isInitial)
24 StyleBuilderFunctions::applyInitial{{used_property_id}}(state); 24 StyleBuilderFunctions::applyInitial{{used_property_id}}(state);
25 else if (isInherit) 25 else if (isInherit)
26 StyleBuilderFunctions::applyInherit{{used_property_id}}(state); 26 StyleBuilderFunctions::applyInherit{{used_property_id}}(state);
27 else 27 else
28 StyleBuilderFunctions::applyValue{{used_property_id}}(state, value); 28 StyleBuilderFunctions::applyValue{{used_property_id}}(state, value);
29 return; 29 return;
30 30
31 {% endfor %} 31 {% endfor %}
32 case CSSPropertyVariable:
33 if (isInitial)
34 ASSERT_NOT_REACHED();
35 else if (isInherit)
36 return; // We reach this via the 'all' property, which does not appl y to variables
Timothy Loh 2015/08/25 09:21:09 We probably shouldn't get here for 'all', or at le
37 else
38 StyleBuilderFunctions::applyValueCSSPropertyVariable(state, value);
39 return;
32 {% 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 %}
33 case {{property_id}}: 41 case {{property_id}}:
34 {% endfor %} 42 {% endfor %}
35 { 43 {
36 CSSPropertyID resolvedProperty = CSSProperty::resolveDirectionAwarePrope rty(property, state.style()->direction(), state.style()->writingMode()); 44 CSSPropertyID resolvedProperty = CSSProperty::resolveDirectionAwarePrope rty(property, state.style()->direction(), state.style()->writingMode());
37 ASSERT(resolvedProperty != property); 45 ASSERT(resolvedProperty != property);
38 applyProperty(resolvedProperty, state, value); 46 applyProperty(resolvedProperty, state, value);
39 return; 47 return;
40 } 48 }
41 {% for property_id, property in properties.items() if property.builder_skip %} 49 {% for property_id, property in properties.items() if property.builder_skip %}
42 case {{property_id}}: 50 case {{property_id}}:
43 {% endfor %} 51 {% endfor %}
44 return; 52 return;
45 default: 53 default:
46 ASSERT_NOT_REACHED(); 54 ASSERT_NOT_REACHED();
47 } 55 }
48 } 56 }
49 57
50 } // namespace blink 58 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698