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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 2891973004: WIP Add memory optimisation option to ConsumeCommaSeparatedList (Closed)
Patch Set: fixed dcheck bug Created 3 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | 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 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 "StyleBuilderFunctions.h" 9 #include "StyleBuilderFunctions.h"
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const CSS{{animation}}Data* parentData = state.ParentStyle()->{{animation}}s() ; 107 const CSS{{animation}}Data* parentData = state.ParentStyle()->{{animation}}s() ;
108 if (!parentData) 108 if (!parentData)
109 applyInitial{{property_id}}(state); 109 applyInitial{{property_id}}(state);
110 else 110 else
111 state.Style()->Access{{animation}}s().{{vector}} = parentData->{{vector}}; 111 state.Style()->Access{{animation}}s().{{vector}} = parentData->{{vector}};
112 } 112 }
113 113
114 {{declare_value_function(property_id)}} { 114 {{declare_value_function(property_id)}} {
115 CSS{{animation}}Data& data = state.Style()->Access{{animation}}s(); 115 CSS{{animation}}Data& data = state.Style()->Access{{animation}}s();
116 data.{{vector}}.clear(); 116 data.{{vector}}.clear();
117 DCHECK(value.IsBaseValueList());
117 for (auto& listValue : ToCSSValueList(value)) 118 for (auto& listValue : ToCSSValueList(value))
118 data.{{vector}}.push_back(CSSToStyleMap::MapAnimation{{attribute}}(*listValu e)); 119 data.{{vector}}.push_back(CSSToStyleMap::MapAnimation{{attribute}}(*listValu e));
119 } 120 }
120 {% endmacro %} 121 {% endmacro %}
121 {{apply_animation('CSSPropertyAnimationDelay', 'Delay', 'Animation')}} 122 {{apply_animation('CSSPropertyAnimationDelay', 'Delay', 'Animation')}}
122 {{apply_animation('CSSPropertyAnimationDirection', 'Direction', 'Animation')}} 123 {{apply_animation('CSSPropertyAnimationDirection', 'Direction', 'Animation')}}
123 {{apply_animation('CSSPropertyAnimationDuration', 'Duration', 'Animation')}} 124 {{apply_animation('CSSPropertyAnimationDuration', 'Duration', 'Animation')}}
124 {{apply_animation('CSSPropertyAnimationFillMode', 'FillMode', 'Animation')}} 125 {{apply_animation('CSSPropertyAnimationFillMode', 'FillMode', 'Animation')}}
125 {{apply_animation('CSSPropertyAnimationIterationCount', 'IterationCount', 'Anima tion')}} 126 {{apply_animation('CSSPropertyAnimationIterationCount', 'IterationCount', 'Anima tion')}}
126 {{apply_animation('CSSPropertyAnimationName', 'Name', 'Animation')}} 127 {{apply_animation('CSSPropertyAnimationName', 'Name', 'Animation')}}
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 : SVG_PAINTTYPE_URI_RGBCOLOR; 561 : SVG_PAINTTYPE_URI_RGBCOLOR;
561 } 562 }
562 {{set_value(property)}}(paintType, color, url, 563 {{set_value(property)}}(paintType, color, url,
563 state.ApplyPropertyToRegularStyle(), 564 state.ApplyPropertyToRegularStyle(),
564 state.ApplyPropertyToVisitedLinkStyle()); 565 state.ApplyPropertyToVisitedLinkStyle());
565 } 566 }
566 {% endmacro %} 567 {% endmacro %}
567 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 568 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
568 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 569 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
569 } // namespace blink 570 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698