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

Side by Side Diff: sky/engine/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 1214633005: Remove CSS clients of ImageResource (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | sky/engine/core/animation/DeferredLegacyStyleInterpolation.h » ('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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 /* Reset any remaining layers to not have the property set. */ 363 /* Reset any remaining layers to not have the property set. */
364 currChild->clear{{fill_type}}(); 364 currChild->clear{{fill_type}}();
365 currChild = currChild->next(); 365 currChild = currChild->next();
366 } 366 }
367 } 367 }
368 368
369 {{declare_value_function(property_id)}} 369 {{declare_value_function(property_id)}}
370 { 370 {
371 FillLayer* currChild = &state.style()->{{access_layers}}(); 371 FillLayer* currChild = &state.style()->{{access_layers}}();
372 FillLayer* prevChild = 0; 372 FillLayer* prevChild = 0;
373 if (value->isValueList() && !value->isImageSetValue()) { 373 if (value->isValueList()) {
374 /* Walk each value and put it into a layer, creating new layers as neede d. */ 374 /* Walk each value and put it into a layer, creating new layers as neede d. */
375 CSSValueList* valueList = toCSSValueList(value); 375 CSSValueList* valueList = toCSSValueList(value);
376 for (unsigned int i = 0; i < valueList->length(); i++) { 376 for (unsigned int i = 0; i < valueList->length(); i++) {
377 if (!currChild) 377 if (!currChild)
378 currChild = prevChild->ensureNext(); 378 currChild = prevChild->ensureNext();
379 state.styleMap().{{map_fill}}(currChild, valueList->item(i)); 379 state.styleMap().{{map_fill}}(currChild, valueList->item(i));
380 prevChild = currChild; 380 prevChild = currChild;
381 currChild = currChild->next(); 381 currChild = currChild->next();
382 } 382 }
383 } else { 383 } else {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second ()); 439 state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second ());
440 } else { 440 } else {
441 state.style()->set{{alignment_type}}(*primitiveValue); 441 state.style()->set{{alignment_type}}(*primitiveValue);
442 } 442 }
443 } 443 }
444 {% endmacro %} 444 {% endmacro %}
445 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} 445 {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}}
446 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} 446 {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}}
447 447
448 } // namespace blink 448 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/animation/DeferredLegacyStyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698