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

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

Issue 669553002: Remove <marquee> leftovers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 2 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 | Source/core/core.gypi » ('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 "config.h" 9 #include "config.h"
10 #include "StyleBuilderFunctions.h" 10 #include "StyleBuilderFunctions.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 if (!namedGridAreas.isEmpty()) 486 if (!namedGridAreas.isEmpty())
487 StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(namedGri dAreas, namedGridLines, For{{type}}s); 487 StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea(namedGri dAreas, namedGridLines, For{{type}}s);
488 state.style()->setGridTemplate{{type}}s(trackSizes); 488 state.style()->setGridTemplate{{type}}s(trackSizes);
489 state.style()->setNamedGrid{{type}}Lines(namedGridLines); 489 state.style()->setNamedGrid{{type}}Lines(namedGridLines);
490 state.style()->setOrderedNamedGrid{{type}}Lines(orderedNamedGridLines); 490 state.style()->setOrderedNamedGrid{{type}}Lines(orderedNamedGridLines);
491 } 491 }
492 {% endmacro %} 492 {% endmacro %}
493 {{apply_grid_template('CSSPropertyGridTemplateColumns', 'Column')}} 493 {{apply_grid_template('CSSPropertyGridTemplateColumns', 'Column')}}
494 {{apply_grid_template('CSSPropertyGridTemplateRows', 'Row')}} 494 {{apply_grid_template('CSSPropertyGridTemplateRows', 'Row')}}
495 495
496 {% macro apply_value_number(property_id, id_for_minus_one) %}
497 {{declare_value_function(property_id)}}
498 {
499 {% set property = properties[property_id] %}
500 if (!value->isPrimitiveValue())
501 return;
502
503 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
504 if (primitiveValue->getValueID() == {{id_for_minus_one}})
505 {{set_value(property)}}(-1);
506 else
507 {{set_value(property)}}(primitiveValue->getValue<{{property.type_name}}> (CSSPrimitiveValue::CSS_NUMBER));
508 }
509 {% endmacro %}
510 {{apply_value_number('CSSPropertyInternalMarqueeRepetition', 'CSSValueInfinite') }}
511
512 {% macro apply_alignment(property_id, alignment_type) %} 496 {% macro apply_alignment(property_id, alignment_type) %}
513 {% set property = properties[property_id] %} 497 {% set property = properties[property_id] %}
514 {{declare_initial_function(property_id)}} 498 {{declare_initial_function(property_id)}}
515 { 499 {
516 state.style()->set{{alignment_type}}(RenderStyle::initial{{alignment_type}}( )); 500 state.style()->set{{alignment_type}}(RenderStyle::initial{{alignment_type}}( ));
517 state.style()->set{{alignment_type}}OverflowAlignment(RenderStyle::initial{{ alignment_type}}OverflowAlignment()); 501 state.style()->set{{alignment_type}}OverflowAlignment(RenderStyle::initial{{ alignment_type}}OverflowAlignment());
518 } 502 }
519 503
520 {{declare_inherit_function(property_id)}} 504 {{declare_inherit_function(property_id)}}
521 { 505 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 582 }
599 {{set_value(property)}}(ptype, c, url, 583 {{set_value(property)}}(ptype, c, url,
600 state.applyPropertyToRegularStyle(), 584 state.applyPropertyToRegularStyle(),
601 state.applyPropertyToVisitedLinkStyle()); 585 state.applyPropertyToVisitedLinkStyle());
602 } 586 }
603 } 587 }
604 {% endmacro %} 588 {% endmacro %}
605 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}} 589 {{apply_svg_paint('CSSPropertyFill', 'FillPaint')}}
606 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}} 590 {{apply_svg_paint('CSSPropertyStroke', 'StrokePaint')}}
607 } // namespace blink 591 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698