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

Unified Diff: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

Issue 333423005: [CSS Grid Layout] Implement 'justify-items' parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch rebased. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
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)}}
« no previous file with comments | « LayoutTests/webexposed/css-properties-as-js-properties-expected.txt ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698