Unreviewed build fix after r205102.
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 16:51:08 +0000 (16:51 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Sep 2016 16:51:08 +0000 (16:51 +0000)
The change made in r205102 caused compilation failures on
builds with the CSS_GRID_LAYOUT compilation flag disabled.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::resolveJustifySelfAuto): Deleted.
* css/CSSPropertyNames.in:
* css/parser/CSSParser.cpp:
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/parser/CSSParser.cpp

index 550f5c6..7c7c912 100644 (file)
@@ -1,3 +1,18 @@
+2016-09-01  Javier Fernandez  <jfernandez@igalia.com>
+
+        Unreviewed build fix after r205102.
+
+        The change made in r205102 caused compilation failures on
+        builds with the CSS_GRID_LAYOUT compilation flag disabled.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        (WebCore::resolveJustifySelfAuto): Deleted.
+        * css/CSSPropertyNames.in:
+        * css/parser/CSSParser.cpp:
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+
 2016-09-01  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Fix the Mac cmake clean build issue
index 619d399..2369844 100644 (file)
@@ -312,8 +312,10 @@ static const CSSPropertyID computedProperties[] = {
     CSSPropertyFlexDirection,
     CSSPropertyFlexWrap,
     CSSPropertyJustifyContent,
+#if ENABLE(CSS_GRID_LAYOUT)
     CSSPropertyJustifySelf,
     CSSPropertyJustifyItems,
+#endif
 #if ENABLE(FILTERS_LEVEL_2)
     CSSPropertyWebkitBackdropFilter,
 #endif
@@ -2291,6 +2293,7 @@ static StyleSelfAlignmentData resolveLegacyJustifyItems(const StyleSelfAlignment
     return data;
 }
 
+#if ENABLE(CSS_GRID_LAYOUT)
 static StyleSelfAlignmentData resolveJustifyItemsAuto(const StyleSelfAlignmentData& data, Node* parent)
 {
     if (data.position() != ItemPositionAuto)
@@ -2315,6 +2318,7 @@ static StyleSelfAlignmentData resolveJustifySelfAuto(const StyleSelfAlignmentDat
         return { ItemPositionNormal, OverflowAlignmentDefault };
     return resolveLegacyJustifyItems(resolveJustifyItemsAuto(parent->computedStyle()->justifyItems(), parent->parentNode()));
 }
+#endif
 
 static StyleSelfAlignmentData resolveAlignSelfAuto(const StyleSelfAlignmentData& data, Node* parent)
 {
@@ -2830,10 +2834,12 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID,
             return cssValuePool.createValue(style->flexWrap());
         case CSSPropertyJustifyContent:
             return valueForContentPositionAndDistributionWithOverflowAlignment(style->justifyContent());
+#if ENABLE(CSS_GRID_LAYOUT)
         case CSSPropertyJustifyItems:
             return valueForItemPositionWithOverflowAlignment(resolveJustifyItemsAuto(style->justifyItems(), styledNode->parentNode()));
         case CSSPropertyJustifySelf:
             return valueForItemPositionWithOverflowAlignment(resolveJustifySelfAuto(style->justifySelf(), styledNode->parentNode()));
+#endif
         case CSSPropertyOrder:
             return cssValuePool.createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyFloat:
index e90860f..fa43995 100644 (file)
@@ -491,11 +491,11 @@ justify-content [Initial=initialContentAlignment, Converter=ContentAlignmentData
 #if defined(ENABLE_FILTERS_LEVEL_2) && ENABLE_FILTERS_LEVEL_2
 -webkit-backdrop-filter [ConditionalConverter=FilterOperations]
 #endif
-justify-self [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData]
 -webkit-font-size-delta [SkipBuilder]
+#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
+justify-self [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData]
 justify-items [Initial=initialSelfAlignment, Converter=SelfOrDefaultAlignmentData]
 -webkit-justify-items = justify-items
-#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
 grid [Longhands=grid-template-rows|grid-template-columns|grid-template-areas|grid-auto-flow|grid-auto-rows|grid-auto-columns|grid-column-gap|grid-row-gap]
 grid-area [Longhands=grid-row-start|grid-column-start|grid-row-end|grid-column-end]
 grid-auto-columns [Converter=GridTrackSizeList]
index 1c4490c..d3070e8 100644 (file)
@@ -1157,7 +1157,11 @@ static inline bool isKeywordPropertyID(CSSPropertyID propertyId)
         return true;
     case CSSPropertyAlignItems:
     case CSSPropertyAlignSelf:
+#if ENABLE(CSS_GRID_LAYOUT)
         return !RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
+#else
+        return true;
+#endif
     default:
         return false;
     }
@@ -2737,16 +2741,18 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyJustifyContent:
         parsedValue = parseContentDistributionOverflowPosition();
         break;
+#if ENABLE(CSS_GRID_LAYOUT)
     case CSSPropertyJustifySelf:
-        ASSERT(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled());
+        if (!isCSSGridLayoutEnabled())
+            return false;
         return parseItemPositionOverflowPosition(propId, important);
     case CSSPropertyJustifyItems:
-        ASSERT(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled());
+        if (!isCSSGridLayoutEnabled())
+            return false;
         if (parseLegacyPosition(propId, important))
             return true;
         m_valueList->setCurrentIndex(0);
         return parseItemPositionOverflowPosition(propId, important);
-#if ENABLE(CSS_GRID_LAYOUT)
     case CSSPropertyGridAutoColumns:
     case CSSPropertyGridAutoRows:
         if (!isCSSGridLayoutEnabled())
@@ -3159,6 +3165,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyAlignContent:
         parsedValue = parseContentDistributionOverflowPosition();
         break;
+#if ENABLE(CSS_GRID_LAYOUT)
     case CSSPropertyAlignSelf:
         ASSERT(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled());
         return parseItemPositionOverflowPosition(propId, important);
@@ -3166,6 +3173,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyAlignItems:
         ASSERT(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled());
         return parseItemPositionOverflowPosition(propId, important);
+#endif
     case CSSPropertyBorderBottomStyle:
     case CSSPropertyBorderCollapse:
     case CSSPropertyBorderLeftStyle: