Bug 1117538 part 1 - [css-grid] Remove 'grid-auto-flow: stack'. r=dholbert
authorMats Palmgren <mats@mozilla.com>
Mon, 05 Jan 2015 22:20:56 +0000
changeset 247962 5f96dee075de1d388b20e206b9c0756bb07e4e6d
parent 247961 4356ad137ddfa487d2419dd02528ac413cc53da1
child 247963 576c21be1808221944401b82b0c23e0565d03b98
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1117538
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1117538 part 1 - [css-grid] Remove 'grid-auto-flow: stack'. r=dholbert Because it has been removed from the spec per: http://lists.w3.org/Archives/Public/www-style/2014Dec/0321.html
layout/style/nsCSSKeywordList.h
layout/style/nsCSSParser.cpp
layout/style/nsCSSProps.cpp
layout/style/nsCSSValue.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsStyleConsts.h
layout/style/test/property_database.js
layout/style/test/test_grid_container_shorthands.html
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -491,17 +491,16 @@ CSS_KEY(smooth, smooth)
 CSS_KEY(soft, soft)
 CSS_KEY(soft-light, soft_light)
 CSS_KEY(solid, solid)
 CSS_KEY(space-around, space_around)
 CSS_KEY(space-between, space_between)
 CSS_KEY(span, span)
 CSS_KEY(spell-out, spell_out)
 CSS_KEY(square, square)
-CSS_KEY(stack, stack)
 CSS_KEY(stacked-fractions, stacked_fractions)
 CSS_KEY(start, start)
 CSS_KEY(static, static)
 CSS_KEY(status-bar, status_bar)
 CSS_KEY(step-end, step_end)
 CSS_KEY(step-start, step_start)
 CSS_KEY(sticky, sticky)
 CSS_KEY(stretch, stretch)
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -7642,35 +7642,27 @@ CSSParserImpl::ParseGridAutoFlow()
   nsCSSValue value;
   if (ParseVariant(value, VARIANT_INHERIT, nullptr)) {
     AppendValue(eCSSProperty_grid_auto_flow, value);
     return true;
   }
 
   static const int32_t mask[] = {
     NS_STYLE_GRID_AUTO_FLOW_ROW | NS_STYLE_GRID_AUTO_FLOW_COLUMN,
-    NS_STYLE_GRID_AUTO_FLOW_DENSE | NS_STYLE_GRID_AUTO_FLOW_STACK,
     MASK_END_VALUE
   };
   if (!ParseBitmaskValues(value, nsCSSProps::kGridAutoFlowKTable, mask)) {
     return false;
   }
   int32_t bitField = value.GetIntValue();
 
-  // Requires one of these
+  // Require one of these.
   if (!(bitField & NS_STYLE_GRID_AUTO_FLOW_ROW ||
-        bitField & NS_STYLE_GRID_AUTO_FLOW_COLUMN ||
-        bitField & NS_STYLE_GRID_AUTO_FLOW_STACK)) {
-    return false;
-  }
-
-  // 'stack' without 'row' or 'column' defaults to 'stack row'
-  if (bitField == NS_STYLE_GRID_AUTO_FLOW_STACK) {
-    value.SetIntValue(bitField | NS_STYLE_GRID_AUTO_FLOW_ROW,
-                      eCSSUnit_Enumerated);
+        bitField & NS_STYLE_GRID_AUTO_FLOW_COLUMN)) {
+    return false;
   }
 
   AppendValue(eCSSProperty_grid_auto_flow, value);
   return true;
 }
 
 CSSParseResult
 CSSParserImpl::ParseGridLineNames(nsCSSValue& aValue)
@@ -8521,21 +8513,20 @@ CSSParserImpl::ParseGrid()
   }
 
   // An empty value is always invalid.
   if (!GetToken(true)) {
     return false;
   }
 
   // The values starts with a <'grid-auto-flow'> if and only if
-  // it starts with a 'stack', 'dense', 'column' or 'row' keyword.
+  // it starts with a 'dense', 'column' or 'row' keyword.
   if (mToken.mType == eCSSToken_Ident) {
     nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(mToken.mIdent);
-    if (keyword == eCSSKeyword_stack ||
-        keyword == eCSSKeyword_dense ||
+    if (keyword == eCSSKeyword_dense ||
         keyword == eCSSKeyword_column ||
         keyword == eCSSKeyword_row) {
       UngetToken();
       return ParseGridAutoFlow() && ParseGridShorthandAutoProps();
     }
   }
   UngetToken();
 
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1353,17 +1353,16 @@ const KTableValue nsCSSProps::kFontWeigh
   eCSSKeyword_normal, NS_STYLE_FONT_WEIGHT_NORMAL,
   eCSSKeyword_bold, NS_STYLE_FONT_WEIGHT_BOLD,
   eCSSKeyword_bolder, NS_STYLE_FONT_WEIGHT_BOLDER,
   eCSSKeyword_lighter, NS_STYLE_FONT_WEIGHT_LIGHTER,
   eCSSKeyword_UNKNOWN,-1
 };
 
 const KTableValue nsCSSProps::kGridAutoFlowKTable[] = {
-  eCSSKeyword_stack, NS_STYLE_GRID_AUTO_FLOW_STACK,
   eCSSKeyword_row, NS_STYLE_GRID_AUTO_FLOW_ROW,
   eCSSKeyword_column, NS_STYLE_GRID_AUTO_FLOW_COLUMN,
   eCSSKeyword_dense, NS_STYLE_GRID_AUTO_FLOW_DENSE,
   eCSSKeyword_UNKNOWN,-1
 };
 
 const KTableValue nsCSSProps::kGridTrackBreadthKTable[] = {
   eCSSKeyword_min_content, NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT,
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -1259,17 +1259,17 @@ nsCSSValue::AppendToString(nsCSSProperty
       nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
                                          NS_FONT_VARIANT_NUMERIC_LINING,
                                          NS_FONT_VARIANT_NUMERIC_ORDINAL,
                                          aResult);
       break;
 
     case eCSSProperty_grid_auto_flow:
       nsStyleUtil::AppendBitmaskCSSValue(aProperty, intValue,
-                                         NS_STYLE_GRID_AUTO_FLOW_STACK,
+                                         NS_STYLE_GRID_AUTO_FLOW_ROW,
                                          NS_STYLE_GRID_AUTO_FLOW_DENSE,
                                          aResult);
       break;
 
     case eCSSProperty_grid_column_start:
     case eCSSProperty_grid_column_end:
     case eCSSProperty_grid_row_start:
     case eCSSProperty_grid_row_end:
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -2365,17 +2365,17 @@ nsComputedDOMStyle::GetGridTemplateColum
 }
 
 CSSValue*
 nsComputedDOMStyle::DoGetGridAutoFlow()
 {
   nsAutoString str;
   nsStyleUtil::AppendBitmaskCSSValue(eCSSProperty_grid_auto_flow,
                                      StylePosition()->mGridAutoFlow,
-                                     NS_STYLE_GRID_AUTO_FLOW_STACK,
+                                     NS_STYLE_GRID_AUTO_FLOW_ROW,
                                      NS_STYLE_GRID_AUTO_FLOW_DENSE,
                                      str);
   nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
   val->SetString(str);
   return val;
 }
 
 CSSValue*
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -569,20 +569,19 @@ static inline mozilla::css::Side operato
 #define NS_STYLE_FONT_INFO                      11
 #define NS_STYLE_FONT_DIALOG                    12
 #define NS_STYLE_FONT_BUTTON                    13
 #define NS_STYLE_FONT_PULL_DOWN_MENU            14
 #define NS_STYLE_FONT_LIST                      15
 #define NS_STYLE_FONT_FIELD                     16
 
 // grid-auto-flow keywords
-#define NS_STYLE_GRID_AUTO_FLOW_STACK           (1 << 0)
-#define NS_STYLE_GRID_AUTO_FLOW_ROW             (1 << 1)
-#define NS_STYLE_GRID_AUTO_FLOW_COLUMN          (1 << 2)
-#define NS_STYLE_GRID_AUTO_FLOW_DENSE           (1 << 3)
+#define NS_STYLE_GRID_AUTO_FLOW_ROW             (1 << 0)
+#define NS_STYLE_GRID_AUTO_FLOW_COLUMN          (1 << 1)
+#define NS_STYLE_GRID_AUTO_FLOW_DENSE           (1 << 2)
 
 // 'subgrid' keyword in grid-template-{columns,rows}
 #define NS_STYLE_GRID_TEMPLATE_SUBGRID          0
 
 // CSS Grid <track-breadth> keywords
 // Should not overlap with NS_STYLE_GRID_TEMPLATE_SUBGRID
 #define NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT 1
 #define NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT 2
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -5072,29 +5072,23 @@ if (SpecialPowers.getBoolPref("layout.cs
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "row" ],
     other_values: [
       "column",
       "column dense",
       "row dense",
       "dense column",
       "dense row",
-      "stack column",
-      "stack row",
-      "stack",
     ],
     invalid_values: [
       "",
       "auto",
       "none",
       "10px",
       "dense",
-      "stack dense",
-      "stack stack",
-      "stack row stack",
       "column row",
       "dense row dense",
     ]
   };
 
   gCSSProperties["grid-auto-columns"] = {
     domProp: "gridAutoColumns",
     inherited: false,
@@ -5315,17 +5309,17 @@ if (SpecialPowers.getBoolPref("layout.cs
       "grid-auto-columns",
       "grid-auto-rows",
     ],
     initial_values: [
       "none",
       "none / none",
     ],
     other_values: [
-      "stack 40px",
+      "column 40px",
       "column dense auto",
       "dense row minmax(min-content, 2fr)",
       "row 40px / 100px",
     ].concat(
       gCSSProperties["grid-template"].other_values,
       gCSSProperties["grid-auto-flow"].other_values
     ),
     invalid_values: [
--- a/layout/style/test/test_grid_container_shorthands.html
+++ b/layout/style/test/test_grid_container_shorthands.html
@@ -174,23 +174,23 @@ var grid_template_test_cases = [
 ];
 
 grid_test_cases = grid_template_test_cases.concat([
     {
         specified: "row",
         gridAutoFlow: "row",
     },
     {
-        specified: "stack 40px",
-        gridAutoFlow: "stack row",
+        specified: "row 40px",
+        gridAutoFlow: "row",
         gridAutoColumns: "40px",
     },
     {
-        specified: "stack column 40px",
-        gridAutoFlow: "stack column",
+        specified: "column 40px",
+        gridAutoFlow: "column",
         gridAutoColumns: "40px",
     },
     {
         specified: "column dense auto",
         gridAutoFlow: "column dense",
         gridAutoColumns: "minmax(min-content, max-content)",
     },
     {