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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 134013002: Upgrade align-self and align-items parsing to CSS 3 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really fix the tests Created 6 years, 11 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/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 411ba05315c85980ec55c7f35c67f0e4f985cb95..41a83418a98808476db4985c99cfce67ddbd87e6 100755
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -1713,6 +1713,30 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
return;
}
+ case CSSPropertyAlignSelf: {
+ HANDLE_INHERIT_AND_INITIAL(alignSelf, AlignSelf);
+ CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
+ if (Pair* pairValue = primitiveValue->getPairValue()) {
+ state.style()->setAlignSelf(*pairValue->first());
+ state.style()->setAlignSelfOverflowAlignment(*pairValue->second());
+ } else {
+ state.style()->setAlignSelf(*primitiveValue);
+ }
+ return;
+ }
+
+ case CSSPropertyAlignItems: {
+ HANDLE_INHERIT_AND_INITIAL(alignItems, AlignItems);
+ CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
+ if (Pair* pairValue = primitiveValue->getPairValue()) {
+ state.style()->setAlignItems(*pairValue->first());
+ state.style()->setAlignItemsOverflowAlignment(*pairValue->second());
+ } else {
+ state.style()->setAlignItems(*primitiveValue);
+ }
+ return;
+ }
+
// These properties are aliased and we already applied the property on the prefixed version.
case CSSPropertyAnimationDelay:
case CSSPropertyAnimationDirection:
@@ -1885,8 +1909,6 @@ void StyleBuilder::oldApplyProperty(CSSPropertyID id, StyleResolverState& state,
case CSSPropertyWebkitColumnSpan:
case CSSPropertyWebkitColumnWidth:
case CSSPropertyAlignContent:
- case CSSPropertyAlignItems:
- case CSSPropertyAlignSelf:
case CSSPropertyFlexBasis:
case CSSPropertyFlexDirection:
case CSSPropertyFlexGrow:

Powered by Google App Engine
This is Rietveld 408576698