Chromium Code Reviews| Index: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl | 
| diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl | 
| index 25853f8c9e4e99feba4c022882a5823e29ecd179..7cb7dc4dd13d3b313a2196ffb6a6b90e7f4f2fe0 100644 | 
| --- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl | 
| +++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl | 
| @@ -523,6 +523,29 @@ namespace WebCore { | 
| {{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} | 
| {{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} | 
| +{% macro apply_alignment1(property_id, alignment_type) %} | 
| 
 
cbiesinger
2014/06/21 00:45:23
That is a terrible name for this macro. Please ren
 
 | 
| +{{declare_value_function(property_id)}} | 
| +{ | 
| + CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 
| + if (Pair* pairValue = primitiveValue->getPairValue()) { | 
| + if (pairValue->first()->getValueID() == CSSValueLegacy) { | 
| + state.style()->set{{alignment_type}}IsLegacy(true); | 
| + state.style()->set{{alignment_type}}(*pairValue->second()); | 
| + } else { | 
| + state.style()->set{{alignment_type}}IsLegacy(false); | 
| + state.style()->set{{alignment_type}}(*pairValue->first()); | 
| + state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second()); | 
| + } | 
| + } else { | 
| + state.style()->set{{alignment_type}}IsLegacy(false); | 
| + state.style()->set{{alignment_type}}(*primitiveValue); | 
| + // FIXME: We should clear the overflow-alignment mode here and probably | 
| + // also set it in the initial and inherit handlers | 
| + } | 
| +} | 
| +{% endmacro %} | 
| +{{apply_alignment1('CSSPropertyJustifyItems', 'JustifyItems')}} | 
| + | 
| {% macro apply_svg_paint(property_id, paint_type) %} | 
| {% set property = properties[property_id] %} | 
| {{declare_initial_function(property_id)}} |