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
This commit is contained in:
Mats Palmgren
2015-01-05 22:20:56 +00:00
parent 7fb0461d77
commit 112eaa3daf
8 changed files with 14 additions and 32 deletions

View File

@@ -496,7 +496,6 @@ 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)

View File

@@ -7647,7 +7647,6 @@ CSSParserImpl::ParseGridAutoFlow()
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)) {
@@ -7655,19 +7654,12 @@ CSSParserImpl::ParseGridAutoFlow()
}
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)) {
bitField & NS_STYLE_GRID_AUTO_FLOW_COLUMN)) {
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);
}
AppendValue(eCSSProperty_grid_auto_flow, value);
return true;
}
@@ -8526,11 +8518,10 @@ CSSParserImpl::ParseGrid()
}
// 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();

View File

@@ -1358,7 +1358,6 @@ const KTableValue nsCSSProps::kFontWeightKTable[] = {
};
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,

View File

@@ -1264,7 +1264,7 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
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;

View File

@@ -2370,7 +2370,7 @@ 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;

View File

@@ -574,10 +574,9 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
#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

View File

@@ -5077,9 +5077,6 @@ if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) {
"row dense",
"dense column",
"dense row",
"stack column",
"stack row",
"stack",
],
invalid_values: [
"",
@@ -5087,9 +5084,6 @@ if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) {
"none",
"10px",
"dense",
"stack dense",
"stack stack",
"stack row stack",
"column row",
"dense row dense",
]
@@ -5320,7 +5314,7 @@ if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) {
"none / none",
],
other_values: [
"stack 40px",
"column 40px",
"column dense auto",
"dense row minmax(min-content, 2fr)",
"row 40px / 100px",

View File

@@ -179,13 +179,13 @@ grid_test_cases = grid_template_test_cases.concat([
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",
},
{