Diff
Modified: trunk/LayoutTests/ChangeLog (200754 => 200755)
--- trunk/LayoutTests/ChangeLog 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/ChangeLog 2016-05-12 09:12:13 UTC (rev 200755)
@@ -1,3 +1,26 @@
+2016-05-12 Manuel Rego Casasnovas <r...@igalia.com>
+
+ [css-grid] Incorrect parsing when using just 'span" as grid-line value
+ https://bugs.webkit.org/show_bug.cgi?id=157615
+
+ Reviewed by Sergio Villar Senin.
+
+ Add new test case in grid-item-column-row-get-set.html.
+
+ Updated other tests that were using "span" alone, with 2 approaches:
+ - In some of them changing "span" by "span 1" making it valid.
+ - In other changing the expected result to "auto", as it's invalid now.
+
+ * fast/css-grid-layout/grid-item-area-get-set.html:
+ * fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
+ * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
+ * fast/css-grid-layout/grid-item-column-row-get-set.html:
+ * fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
+ * fast/css-grid-layout/grid-item-end-after-get-set.html:
+ * fast/css-grid-layout/grid-item-negative-position-resolution.html:
+ * fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
+ * fast/css-grid-layout/grid-item-start-before-get-set.html:
+
2016-05-12 Joseph Pecoraro <pecor...@apple.com>
Web Inspector: CRASH getting internal properties of function with no bound arguments causes
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-area-get-set.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-area-get-set.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-area-get-set.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -25,7 +25,7 @@
}
#threeValueGridArea {
- grid-area: span / 10 / -1;
+ grid-area: span 1 / 10 / -1;
}
#fourValueGridArea {
@@ -33,7 +33,7 @@
}
#fourValueMixedGridArea {
- grid-area: firstArea / span / nonexistent / 1 foobar;
+ grid-area: firstArea / span 1 / nonexistent / 1 foobar;
}
</style>
<script src=""
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -31,7 +31,7 @@
.namedGridLineSpanColumn {
grid-row: 1;
- grid-column: nonExistentArea / span;
+ grid-column: nonExistentArea / span 1;
background-color: lime;
}
</style>
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt 2016-05-12 09:12:13 UTC (rev 200755)
@@ -52,12 +52,12 @@
PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue('grid-row') is "3 / span 5"
PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue('grid-row-start') is "3"
PASS getComputedStyle(gridItemWithAfterSpanElement, '').getPropertyValue('grid-row-end') is "span 5"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column') is "span 1 / span 1"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column-start') is "span 1"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column-end') is "span 1"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row') is "span 1 / span 1"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row-start') is "span 1"
-PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row-end') is "span 1"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column') is "auto / auto"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column-start') is "auto"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-column-end') is "auto"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row') is "auto / auto"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row-start') is "auto"
+PASS getComputedStyle(gridItemWith2OnlySpanElement, '').getPropertyValue('grid-row-end') is "auto"
PASS getComputedStyle(gridItemWith2AutoElement, '').getPropertyValue('grid-column') is "auto / auto"
PASS getComputedStyle(gridItemWith2AutoElement, '').getPropertyValue('grid-column-start') is "auto"
PASS getComputedStyle(gridItemWith2AutoElement, '').getPropertyValue('grid-column-end') is "auto"
@@ -170,6 +170,12 @@
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row') is "auto / 8"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-start') is "auto"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-end') is "8"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-end') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-end') is "auto"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column') is "span 1 / 3"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-start') is "span 1"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-end') is "3"
@@ -460,6 +466,18 @@
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row') is "auto / auto"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-start') is "auto"
PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-end') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-end') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-end') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-column-end') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row') is "auto / auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-start') is "auto"
+PASS getComputedStyle(gridItem, '').getPropertyValue('grid-row-end') is "auto"
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -76,7 +76,7 @@
grid-row: firstArea;
}
.gridItemWithNamedGridAreaAndSpan {
- grid-column: thirdArea / span;
+ grid-column: thirdArea / span 1;
grid-row: firstArea / span 2;
}
</style>
@@ -116,7 +116,7 @@
testColumnRowCSSParsing("gridItemWithNegativePositiveIntegerElement", "10 / -10", "-8 / 5");
testColumnRowCSSParsing("gridItemWithBeforeSpanElement", "span 2 / 4", "3 / span 5");
testColumnRowCSSParsing("gridItemWithAfterSpanElement", "span 2 / 4", "3 / span 5");
- testColumnRowCSSParsing("gridItemWith2OnlySpanElement", "span 1 / span 1", "span 1 / span 1");
+ testColumnRowCSSParsing("gridItemWith2OnlySpanElement", "auto / auto", "auto / auto");
testColumnRowCSSParsing("gridItemWith2AutoElement", "auto / auto" , "auto / auto");
testColumnRowCSSParsing("gridItemWithBothShortLongHandElement", "10 / 11", "4 / 5");
testColumnRowCSSParsing("gridItemWithNoSpaceElement", "auto / 1", "5 / auto");
@@ -148,7 +148,8 @@
testColumnRowJSParsing("-5 / 5", "4 / -4");
testColumnRowJSParsing("4 / auto", "5 / auto");
testColumnRowJSParsing("auto / 5", "auto / 8");
- testColumnRowJSParsing("span / 3", "5 / span", "span 1 / 3", "5 / span 1");
+ testColumnRowJSParsing("span / 3", "5 / span", "auto / auto", "auto / auto");
+ testColumnRowJSParsing("span 1 / 3", "5 / span 1", "span 1 / 3", "5 / span 1");
testColumnRowJSParsing("first span / 3", "5 / last span", "span 1 first / 3", "5 / span 1 last");
testColumnRowJSParsing("first / last", "nav / last span", "first / last", "nav / span 1 last");
testColumnRowJSParsing("3 first / 2 last", "5 nav / last 7 span", "3 first / 2 last", "5 nav / span 7 last");
@@ -201,6 +202,10 @@
testColumnRowInvalidJSParsing("6 / 0", "8 / 0");
testColumnRowInvalidJSParsing("0", "0");
+ // 'span' alone is invalid
+ testColumnRowInvalidJSParsing("span", "span");
+ testColumnRowInvalidJSParsing("span / span", "span / span");
+
testColumnRowInvalidJSParsing("span span / span span", "span span / span span");
// More than 1 <integer> and / or <string>.
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-expected.txt (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-expected.txt 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-expected.txt 2016-05-12 09:12:13 UTC (rev 200755)
@@ -34,12 +34,12 @@
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row') is "auto / span 9"
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row-start') is "auto"
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row-end') is "span 9"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column') is "auto / span 1"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column') is "auto / auto"
PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-start') is "auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-end') is "span 1"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row') is "auto / span 1"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-end') is "auto"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row') is "auto / auto"
PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-start') is "auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-end') is "span 1"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-end') is "auto"
PASS getComputedStyle(gridItemWithAutoElement, '').getPropertyValue('grid-column') is "auto / auto"
PASS getComputedStyle(gridItemWithAutoElement, '').getPropertyValue('grid-column-start') is "auto"
PASS getComputedStyle(gridItemWithAutoElement, '').getPropertyValue('grid-column-end') is "auto"
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -81,7 +81,7 @@
testColumnRowCSSParsing("gridItemWithNegativeInteger", "auto / -10", "auto / -15");
testColumnRowCSSParsing("gridItemWithBeforeSpan", "auto / span 2", "auto / span 9");
testColumnRowCSSParsing("gridItemWithAfterSpan", "auto / span 2", "auto / span 9");
- testColumnRowCSSParsing("gridItemWithOnlySpan", "auto / span 1", "auto / span 1");
+ testColumnRowCSSParsing("gridItemWithOnlySpan", "auto / auto", "auto / auto");
testColumnRowCSSParsing("gridItemWithAutoElement", "auto / auto", "auto / auto");
testColumnRowCSSParsing("gridItemWithCustomIdent", "auto / first", "auto / last");
testColumnRowCSSParsing("gridItemWithNumberCustomIdent", "auto / 2 first", "auto / 3 last");
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-negative-position-resolution.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -59,7 +59,7 @@
}
.negativeEndPositionStartSpanInColumnDirection {
- grid-column: span / -1;
+ grid-column: span 1 / -1;
grid-row: 1;
}
@@ -69,7 +69,7 @@
}
.negativeNamedGridLineEndPositionStartSpanInColumnDirection {
- grid-column: span / last;
+ grid-column: span 1 / last;
grid-row: 1;
}
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set-expected.txt 2016-05-12 09:12:13 UTC (rev 200755)
@@ -32,11 +32,11 @@
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row') is "span 8 / auto"
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row-start') is "span 8"
PASS getComputedStyle(gridItemWithAfterSpan, '').getPropertyValue('grid-row-end') is "auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column') is "span 1 / auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-start') is "span 1"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column') is "auto / auto"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-start') is "auto"
PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-column-end') is "auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row') is "span 1 / auto"
-PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-start') is "span 1"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row') is "auto / auto"
+PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-start') is "auto"
PASS getComputedStyle(gridItemWithOnlySpan, '').getPropertyValue('grid-row-end') is "auto"
PASS getComputedStyle(gridItemWithAutoElement, '').getPropertyValue('grid-column') is "auto / auto"
PASS getComputedStyle(gridItemWithAutoElement, '').getPropertyValue('grid-column-start') is "auto"
Modified: trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html (200754 => 200755)
--- trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html 2016-05-12 09:12:13 UTC (rev 200755)
@@ -86,7 +86,7 @@
testColumnRowCSSParsing("gridItemWithNegativeInteger", "-10 / auto", "-15 / auto");
testColumnRowCSSParsing("gridItemWithBeforeSpan", "span 2 / auto", "span 8 / auto");
testColumnRowCSSParsing("gridItemWithAfterSpan", "span 2 / auto", "span 8 / auto");
- testColumnRowCSSParsing("gridItemWithOnlySpan", "span 1 / auto", "span 1 / auto");
+ testColumnRowCSSParsing("gridItemWithOnlySpan", "auto / auto", "auto / auto");
testColumnRowCSSParsing("gridItemWithAutoElement", "auto / auto", "auto / auto");
testColumnRowCSSParsing("gridItemWithCustomIdent", "first / auto", "last / auto");
testColumnRowCSSParsing("gridItemWithNumberCustomIdent", "2 first / auto", "3 last / auto");
Modified: trunk/Source/WebCore/ChangeLog (200754 => 200755)
--- trunk/Source/WebCore/ChangeLog 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/Source/WebCore/ChangeLog 2016-05-12 09:12:13 UTC (rev 200755)
@@ -1,3 +1,21 @@
+2016-05-12 Manuel Rego Casasnovas <r...@igalia.com>
+
+ [css-grid] Incorrect parsing when using just 'span" as grid-line value
+ https://bugs.webkit.org/show_bug.cgi?id=157615
+
+ Reviewed by Sergio Villar Senin.
+
+ The spec is pretty clear about this:
+ https://drafts.csswg.org/css-grid/#typedef-grid-row-start-grid-line
+
+ The possible options when using "span" to reference a grid line are:
+ [ span && [ <integer> || <custom-ident> ] ]
+
+ Thus, "span" keyword alone produces an invalid declaration.
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseGridPosition):
+
2016-05-12 Csaba Osztrogonác <o...@webkit.org>
Remove ENABLE(ES6_ARROWFUNCTION_SYNTAX) guards
Modified: trunk/Source/WebCore/css/CSSParser.cpp (200754 => 200755)
--- trunk/Source/WebCore/css/CSSParser.cpp 2016-05-12 09:12:12 UTC (rev 200754)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2016-05-12 09:12:13 UTC (rev 200755)
@@ -5503,6 +5503,10 @@
if (!hasSeenSpanKeyword && !gridLineName && !numericValue)
return nullptr;
+ // If we have "span" keyword alone is invalid.
+ if (hasSeenSpanKeyword && !gridLineName && !numericValue)
+ return nullptr;
+
// Negative numbers are not allowed for span (but are for <integer>).
if (hasSeenSpanKeyword && numericValue && numericValue->getIntValue() < 0)
return nullptr;