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 5672e52a1fb427b10f968bed4e57ea09fbb7b019..e0dba7d86c8e76e0ba1c65298cf9f59f2d6f1d3b 100644 |
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl |
@@ -562,8 +562,6 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt |
state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second()); |
} else { |
state.style()->set{{alignment_type}}(*primitiveValue); |
- // FIXME: We should clear the overflow-alignment mode here and probably |
Timothy Loh
2014/07/01 12:44:51
I'm not sure why you've removed this FIXME, isn't
jfernandez
2014/07/01 20:54:27
I added cases in the layout tests to verify it was
|
- // also set it in the initial and inherit handlers |
} |
} |
{% endmacro %} |
@@ -571,6 +569,25 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt |
{{apply_alignment('CSSPropertyAlignItems', 'AlignItems')}} |
{{apply_alignment('CSSPropertyAlignSelf', 'AlignSelf')}} |
+{% macro apply_alignment_with_legacy_keyword(property_id, alignment_type) %} |
+{{declare_value_function(property_id)}} |
+{ |
+ CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
+ if (Pair* pairValue = primitiveValue->getPairValue()) { |
+ if (pairValue->first()->getValueID() == CSSValueLegacy) { |
+ state.style()->set{{alignment_type}}PositionType(LegacyPosition); |
+ state.style()->set{{alignment_type}}(*pairValue->second()); |
+ } else { |
+ state.style()->set{{alignment_type}}(*pairValue->first()); |
+ state.style()->set{{alignment_type}}OverflowAlignment(*pairValue->second()); |
+ } |
+ } else { |
+ state.style()->set{{alignment_type}}(*primitiveValue); |
+ } |
+} |
+{% endmacro %} |
+{{apply_alignment_with_legacy_keyword('CSSPropertyJustifyItems', 'JustifyItems')}} |
Timothy Loh
2014/07/01 12:44:51
If you're only going to have a single property wit
jfernandez
2014/07/01 20:54:27
I thought that "align-items" would eventually be a
|
+ |
{% macro apply_svg_paint(property_id, paint_type) %} |
{% set property = properties[property_id] %} |
{{declare_initial_function(property_id)}} |