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

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

Issue 424983002: Stop using WebCore namespace in generated code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 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
11 // FIXME: currently we're just generating a switch statement, but we should 11 // FIXME: currently we're just generating a switch statement, but we should
12 // test other variations for performance once we have more properties here. 12 // test other variations for performance once we have more properties here.
13 13
14 namespace WebCore { 14 namespace blink {
15 15
16 void StyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& sta te, CSSValue* value, bool isInitial, bool isInherit) { 16 void StyleBuilder::applyProperty(CSSPropertyID property, StyleResolverState& sta te, CSSValue* value, bool isInitial, bool isInherit) {
17 switch(property) { 17 switch(property) {
18 {% for property_id, property in properties.items() 18 {% for property_id, property in properties.items()
19 if not property.direction_aware and not property.skip %} 19 if not property.direction_aware and not property.skip %}
20 {% set used_property = properties[property.use_handlers_for] or property %} 20 {% set used_property = properties[property.use_handlers_for] or property %}
21 {% set used_property_id = used_property.property_id %} 21 {% set used_property_id = used_property.property_id %}
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);
(...skipping 16 matching lines...) Expand all
41 {% for property_id, property in properties.items() if property.skip %} 41 {% for property_id, property in properties.items() if property.skip %}
42 case {{property_id}}: 42 case {{property_id}}:
43 {% endfor %} 43 {% endfor %}
44 return; 44 return;
45 default: 45 default:
46 // FIXME: We should explicitly handle all cases here once we merge the v arious .in files 46 // FIXME: We should explicitly handle all cases here once we merge the v arious .in files
47 ASSERT_NOT_REACHED(); 47 ASSERT_NOT_REACHED();
48 } 48 }
49 } 49 }
50 50
51 } // namespace WebCore 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698