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

Side by Side Diff: Source/build/scripts/templates/StyleBuilderFunctions.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 {# 2 {#
3 This file is for property handlers which use the templating engine to 3 This file is for property handlers which use the templating engine to
4 reduce (handwritten) code duplication. 4 reduce (handwritten) code duplication.
5 5
6 The `properties' dict can be used to access a property's parameters in 6 The `properties' dict can be used to access a property's parameters in
7 jinja2 templates (i.e. setter, getter, initial, type_name) 7 jinja2 templates (i.e. setter, getter, initial, type_name)
8 #} 8 #}
9 #include "config.h" 9 #include "config.h"
10 #include "StyleBuilderFunctions.h" 10 #include "StyleBuilderFunctions.h"
(...skipping 16 matching lines...) Expand all
27 {% macro set_value(property) %} 27 {% macro set_value(property) %}
28 {% if property.svg %} 28 {% if property.svg %}
29 state.style()->accessSVGStyle().{{property.setter}} 29 state.style()->accessSVGStyle().{{property.setter}}
30 {%- elif property.font %} 30 {%- elif property.font %}
31 state.fontBuilder().{{property.setter}} 31 state.fontBuilder().{{property.setter}}
32 {%- else %} 32 {%- else %}
33 state.style()->{{property.setter}} 33 state.style()->{{property.setter}}
34 {%- endif %} 34 {%- endif %}
35 {% endmacro %} 35 {% endmacro %}
36 36
37 namespace WebCore { 37 namespace blink {
38 38
39 {% for property_id, property in properties.items() if property.should_declare_fu nctions %} 39 {% for property_id, property in properties.items() if property.should_declare_fu nctions %}
40 {% set apply_type = property.apply_type %} 40 {% set apply_type = property.apply_type %}
41 {% if not property.custom_initial %} 41 {% if not property.custom_initial %}
42 {{declare_initial_function(property_id)}} 42 {{declare_initial_function(property_id)}}
43 { 43 {
44 {% if property.svg %} 44 {% if property.svg %}
45 {{set_value(property)}}(SVGRenderStyle::{{property.initial}}()); 45 {{set_value(property)}}(SVGRenderStyle::{{property.initial}}());
46 {% elif property.font %} 46 {% elif property.font %}
47 {{set_value(property)}}(FontBuilder::{{property.initial}}()); 47 {{set_value(property)}}(FontBuilder::{{property.initial}}());
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 return; 635 return;
636 } 636 }
637 {{set_value(property)}}(ptype, c, url, 637 {{set_value(property)}}(ptype, c, url,
638 state.applyPropertyToRegularStyle(), 638 state.applyPropertyToRegularStyle(),
639 state.applyPropertyToVisitedLinkStyle()); 639 state.applyPropertyToVisitedLinkStyle());
640 } 640 }
641 } 641 }
642 {% endmacro %} 642 {% endmacro %}
643 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 643 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
644 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 644 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
645 } // namespace WebCore 645 } // namespace blink
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/StyleBuilder.cpp.tmpl ('k') | Source/build/scripts/templates/StyleBuilderFunctions.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698