Changeset 288544 in webkit
- Timestamp:
- Jan 25, 2022 1:57:44 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt (modified) (10 diffs)
-
LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html (modified) (2 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/parser/CSSPropertyParser.cpp (modified) (7 diffs)
-
Source/WebCore/style/StyleBuilderConverter.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r288543 r288544 1 2022-01-25 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Fix grid shorthand expansion of initial values 4 https://bugs.webkit.org/show_bug.cgi?id=234430 5 6 Reviewed by Sergio Villar Senin. 7 8 * fast/css-grid-layout/grid-shorthand-get-set-expected.txt: 9 * fast/css-grid-layout/grid-shorthand-get-set.html: 10 1 11 2022-01-24 Myles C. Maxfield <mmaxfield@apple.com> 2 12 -
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set-expected.txt
r284876 r288544 202 202 PASS element.style.gridTemplateAreas is "none" 203 203 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row" 204 PASS element.style.gridAutoFlow is " initial"205 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 206 PASS element.style.gridAutoColumns is " initial"207 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 208 PASS element.style.gridAutoRows is " initial"204 PASS element.style.gridAutoFlow is "row" 205 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 206 PASS element.style.gridAutoColumns is "auto" 207 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 208 PASS element.style.gridAutoRows is "auto" 209 209 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "10px" 210 210 PASS element.style.gridTemplateColumns is "10px" … … 214 214 PASS element.style.gridTemplateAreas is "\"a\"" 215 215 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row" 216 PASS element.style.gridAutoFlow is " initial"217 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 218 PASS element.style.gridAutoColumns is " initial"219 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 220 PASS element.style.gridAutoRows is " initial"216 PASS element.style.gridAutoFlow is "row" 217 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 218 PASS element.style.gridAutoColumns is "auto" 219 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 220 PASS element.style.gridAutoRows is "auto" 221 221 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 222 222 PASS element.style.gridTemplateColumns is "none" 223 223 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none" 224 PASS element.style.gridTemplateRows is " initial"225 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 226 PASS element.style.gridTemplateAreas is " initial"224 PASS element.style.gridTemplateRows is "none" 225 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 226 PASS element.style.gridTemplateAreas is "none" 227 227 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "dense" 228 PASS element.style.gridAutoFlow is " rowdense"229 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 230 PASS element.style.gridAutoColumns is " initial"228 PASS element.style.gridAutoFlow is "dense" 229 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 230 PASS element.style.gridAutoColumns is "auto" 231 231 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "20px" 232 232 PASS element.style.gridAutoRows is "20px" 233 233 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 234 PASS element.style.gridTemplateColumns is " initial"234 PASS element.style.gridTemplateColumns is "none" 235 235 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "20px" 236 236 PASS element.style.gridTemplateRows is "20px" 237 237 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 238 PASS element.style.gridTemplateAreas is " initial"238 PASS element.style.gridTemplateAreas is "none" 239 239 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column" 240 240 PASS element.style.gridAutoFlow is "column" … … 242 242 PASS element.style.gridAutoColumns is "10px" 243 243 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 244 PASS element.style.gridAutoRows is " initial"245 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 246 PASS element.style.gridTemplateColumns is " initial"244 PASS element.style.gridAutoRows is "auto" 245 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 246 PASS element.style.gridTemplateColumns is "none" 247 247 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none" 248 248 PASS element.style.gridTemplateRows is "none" 249 249 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 250 PASS element.style.gridTemplateAreas is " initial"250 PASS element.style.gridTemplateAreas is "none" 251 251 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column dense" 252 252 PASS element.style.gridAutoFlow is "column dense" … … 254 254 PASS element.style.gridAutoColumns is "20px" 255 255 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 256 PASS element.style.gridAutoRows is " initial"257 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 258 PASS element.style.gridTemplateColumns is " initial"256 PASS element.style.gridAutoRows is "auto" 257 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 258 PASS element.style.gridTemplateColumns is "none" 259 259 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "10px" 260 260 PASS element.style.gridTemplateRows is "10px" 261 261 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 262 PASS element.style.gridTemplateAreas is " initial"262 PASS element.style.gridTemplateAreas is "none" 263 263 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column" 264 264 PASS element.style.gridAutoFlow is "column" … … 266 266 PASS element.style.gridAutoColumns is "20px" 267 267 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 268 PASS element.style.gridAutoRows is " initial"268 PASS element.style.gridAutoRows is "auto" 269 269 270 270 Test the initial value … … 284 284 Test setting grid-template-columns and grid-template-rows back to 'none' through JS 285 285 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 286 PASS element.style.gridTemplateColumns is " initial"286 PASS element.style.gridTemplateColumns is "none" 287 287 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "10px" 288 288 PASS element.style.gridTemplateRows is "10px" 289 289 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 290 PASS element.style.gridTemplateAreas is " initial"290 PASS element.style.gridTemplateAreas is "none" 291 291 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column" 292 292 PASS element.style.gridAutoFlow is "column" … … 294 294 PASS element.style.gridAutoColumns is "20px" 295 295 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 296 PASS element.style.gridAutoRows is " initial"296 PASS element.style.gridAutoRows is "auto" 297 297 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 298 298 PASS element.style.gridTemplateColumns is "none" … … 302 302 PASS element.style.gridTemplateAreas is "none" 303 303 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row" 304 PASS element.style.gridAutoFlow is " initial"305 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 306 PASS element.style.gridAutoColumns is " initial"307 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 308 PASS element.style.gridAutoRows is " initial"309 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 310 PASS element.style.gridTemplateColumns is " initial"304 PASS element.style.gridAutoFlow is "row" 305 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 306 PASS element.style.gridAutoColumns is "auto" 307 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 308 PASS element.style.gridAutoRows is "auto" 309 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 310 PASS element.style.gridTemplateColumns is "none" 311 311 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "20px" 312 312 PASS element.style.gridTemplateRows is "20px" 313 313 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "none" 314 PASS element.style.gridTemplateAreas is " initial"314 PASS element.style.gridTemplateAreas is "none" 315 315 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "column" 316 316 PASS element.style.gridAutoFlow is "column" … … 318 318 PASS element.style.gridAutoColumns is "10px" 319 319 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 320 PASS element.style.gridAutoRows is " initial"320 PASS element.style.gridAutoRows is "auto" 321 321 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none" 322 322 PASS element.style.gridTemplateColumns is "none" … … 326 326 PASS element.style.gridTemplateAreas is "none" 327 327 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-flow') is "row" 328 PASS element.style.gridAutoFlow is " initial"329 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 330 PASS element.style.gridAutoColumns is " initial"331 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 332 PASS element.style.gridAutoRows is " initial"328 PASS element.style.gridAutoFlow is "row" 329 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-columns') is "auto" 330 PASS element.style.gridAutoColumns is "auto" 331 PASS getComputedStyle(element, '').getPropertyValue('grid-auto-rows') is "auto" 332 PASS element.style.gridAutoRows is "auto" 333 333 334 334 Test the inherit value does not affect gutter properties (grid-*-gap) -
trunk/LayoutTests/fast/css-grid-layout/grid-shorthand-get-set.html
r284876 r288544 179 179 debug(""); 180 180 debug("Test getting and setting 'grid' shorthand through JS"); 181 testGridDefinitionsSetJSValues("20px / 10px", "10px", "20px", "none", "row", "auto", "auto", "10px", "20px", "none", " initial", "initial", "initial");182 testGridDefinitionsSetJSValues("[line] 'a' 20px / 10px", "10px", "[line] 20px", "\"a\"", "row", "auto", "auto", "10px", "[line] 20px", "\"a\"", " initial", "initial", "initial");183 testGridDefinitionsSetJSValues("auto-flow dense 20px / none", "none", "none", "none", "dense", "auto", "20px", "none", " initial", "initial", "row dense", "initial", "20px");184 testGridDefinitionsSetJSValues("20px / auto-flow 10px", "none", "20px", "none", "column", "10px", "auto", " initial", "20px", "initial", "column", "10px", "initial");185 testGridDefinitionsSetJSValues("none / auto-flow dense 20px", "none", "none", "none", "column dense", "20px", "auto", " initial", "none", "initial", "column dense", "20px", "initial");186 testGridDefinitionsSetJSValues("10px / auto-flow 20px", "none", "10px", "none", "column", "20px", "auto", " initial", "10px", "initial", "column", "20px", "initial");181 testGridDefinitionsSetJSValues("20px / 10px", "10px", "20px", "none", "row", "auto", "auto", "10px", "20px", "none", "row", "auto", "auto"); 182 testGridDefinitionsSetJSValues("[line] 'a' 20px / 10px", "10px", "[line] 20px", "\"a\"", "row", "auto", "auto", "10px", "[line] 20px", "\"a\"", "row", "auto", "auto"); 183 testGridDefinitionsSetJSValues("auto-flow dense 20px / none", "none", "none", "none", "dense", "auto", "20px", "none", "none", "none", "dense", "auto", "20px"); 184 testGridDefinitionsSetJSValues("20px / auto-flow 10px", "none", "20px", "none", "column", "10px", "auto", "none", "20px", "none", "column", "10px", "auto"); 185 testGridDefinitionsSetJSValues("none / auto-flow dense 20px", "none", "none", "none", "column dense", "20px", "auto", "none", "none", "none", "column dense", "20px", "auto"); 186 testGridDefinitionsSetJSValues("10px / auto-flow 20px", "none", "10px", "none", "column", "20px", "auto", "none", "10px", "none", "column", "20px", "auto"); 187 187 188 188 debug(""); … … 200 200 debug(""); 201 201 debug("Test setting grid-template-columns and grid-template-rows back to 'none' through JS"); 202 testGridDefinitionsSetJSValues("10px / auto-flow 20px", "none", "10px", "none", "column", "20px", "auto", " initial", "10px", "initial", "column", "20px", "initial");203 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto", "auto", "none", "none", "none", " initial", "initial", "initial");204 testGridDefinitionsSetJSValues("20px / auto-flow 10px", "none", "20px", "none", "column", "10px", "auto", " initial", "20px", "initial", "column", "10px", "initial");205 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto", "auto", "none", "none", "none", " initial", "initial", "initial");202 testGridDefinitionsSetJSValues("10px / auto-flow 20px", "none", "10px", "none", "column", "20px", "auto", "none", "10px", "none", "column", "20px", "auto"); 203 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto", "auto", "none", "none", "none", "row", "auto", "auto"); 204 testGridDefinitionsSetJSValues("20px / auto-flow 10px", "none", "20px", "none", "column", "10px", "auto", "none", "20px", "none", "column", "10px", "auto"); 205 testGridDefinitionsSetJSValues("none", "none", "none", "none", "row", "auto", "auto", "none", "none", "none", "row", "auto", "auto"); 206 206 207 207 debug(""); -
trunk/LayoutTests/imported/w3c/ChangeLog
r288542 r288544 1 2022-01-25 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Fix grid shorthand expansion of initial values 4 https://bugs.webkit.org/show_bug.cgi?id=234430 5 6 Reviewed by Sergio Villar Senin. 7 8 * web-platform-tests/css/css-grid/parsing/grid-shorthand-expected.txt: 9 * web-platform-tests/css/css-grid/parsing/grid-shorthand-valid-expected.txt: 10 1 11 2022-01-24 Youenn Fablet <youenn@apple.com> 2 12 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-expected.txt
r267650 r288544 1 1 2 FAIL e.style['grid'] = "none" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 3 FAIL e.style['grid'] = "none" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 4 FAIL e.style['grid'] = "none" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 2 PASS e.style['grid'] = "none" should set grid-auto-columns 3 PASS e.style['grid'] = "none" should set grid-auto-flow 4 PASS e.style['grid'] = "none" should set grid-auto-rows 5 5 PASS e.style['grid'] = "none" should set grid-template-areas 6 6 PASS e.style['grid'] = "none" should set grid-template-columns 7 7 PASS e.style['grid'] = "none" should set grid-template-rows 8 8 PASS e.style['grid'] = "none" should not set unrelated longhands 9 FAIL e.style['grid'] = "10px / 20%" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 10 FAIL e.style['grid'] = "10px / 20%" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 11 FAIL e.style['grid'] = "10px / 20%" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 9 PASS e.style['grid'] = "10px / 20%" should set grid-auto-columns 10 PASS e.style['grid'] = "10px / 20%" should set grid-auto-flow 11 PASS e.style['grid'] = "10px / 20%" should set grid-auto-rows 12 12 PASS e.style['grid'] = "10px / 20%" should set grid-template-areas 13 13 PASS e.style['grid'] = "10px / 20%" should set grid-template-columns 14 14 PASS e.style['grid'] = "10px / 20%" should set grid-template-rows 15 15 PASS e.style['grid'] = "10px / 20%" should not set unrelated longhands 16 FAIL e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 17 FAIL e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 18 FAIL e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 16 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-columns 17 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-flow 18 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-auto-rows 19 19 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-template-areas 20 20 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-template-columns 21 21 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should set grid-template-rows 22 22 PASS e.style['grid'] = "fit-content(calc(-0.5em + 10px)) / fit-content(calc(0.5em + 10px))" should not set unrelated longhands 23 FAIL e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 24 FAIL e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 25 FAIL e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 23 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-columns 24 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-flow 25 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-auto-rows 26 26 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-template-areas 27 27 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-template-columns 28 28 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should set grid-template-rows 29 29 PASS e.style['grid'] = "[header-top] \"a a a\" [header-bottom] [main-top] \"b b b\" 1fr [main-bottom] / auto 1fr auto" should not set unrelated longhands 30 FAIL e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 31 FAIL e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 32 FAIL e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 30 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-columns 31 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-flow 32 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-auto-rows 33 33 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-template-areas 34 34 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-template-columns 35 35 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should set grid-template-rows 36 36 PASS e.style['grid'] = " \"a a a\" \"b b b\" 1fr/ auto 1fr auto" should not set unrelated longhands 37 FAIL e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 38 FAIL e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "row" but got "initial" 39 FAIL e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 37 PASS e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-columns 38 PASS e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-flow 39 PASS e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-auto-rows 40 40 PASS e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-template-areas 41 41 PASS e.style['grid'] = " [] \"a a a\" [] [] \"b b b\" 1fr [] / [] auto 1fr [] auto []" should set grid-template-columns … … 44 44 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-auto-columns 45 45 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-auto-flow 46 FAIL e.style['grid'] = "10px / auto-flow dense 20px" should set grid-auto-rows assert_equals: grid-auto-rows should be canonical expected "auto" but got "initial" 47 FAIL e.style['grid'] = "10px / auto-flow dense 20px" should set grid-template-areas assert_equals: grid-template-areas should be canonical expected "none" but got "initial" 48 FAIL e.style['grid'] = "10px / auto-flow dense 20px" should set grid-template-columns assert_equals: grid-template-columns should be canonical expected "none" but got "initial" 46 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-auto-rows 47 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-template-areas 48 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-template-columns 49 49 PASS e.style['grid'] = "10px / auto-flow dense 20px" should set grid-template-rows 50 50 PASS e.style['grid'] = "10px / auto-flow dense 20px" should not set unrelated longhands 51 FAIL e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-auto-columns assert_equals: grid-auto-columns should be canonical expected "auto" but got "initial" 52 FAIL e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-auto-flow assert_equals: grid-auto-flow should be canonical expected "dense" but got "row dense" 51 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-auto-columns 52 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-auto-flow 53 53 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-auto-rows 54 FAIL e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-template-areas assert_equals: grid-template-areas should be canonical expected "none" but got "initial" 54 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-template-areas 55 55 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-template-columns 56 FAIL e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-template-rows assert_equals: grid-template-rows should be canonical expected "none" but got "initial" 56 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should set grid-template-rows 57 57 PASS e.style['grid'] = "auto-flow dense 30px / 40px" should not set unrelated longhands 58 58 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid-expected.txt
r262130 r288544 1 1 2 FAIL e.style['grid'] = "none" should set the property value assert_equals: serialization should be canonical expected "none" but got "none / none / none "3 FAIL e.style['grid'] = "none / none" should set the property value assert_equals: serialization should be canonical expected "none" but got "none / none / none "4 FAIL e.style['grid'] = "auto / auto" should set the property value assert_equals: serialization should be canonical expected "auto / auto" but got "auto / auto / none "5 FAIL e.style['grid'] = "none / [a] 0px" should set the property value assert_equals: serialization should be canonical expected "none / [a] 0px" but got "none / [a] 0px / none "6 FAIL e.style['grid'] = "none / [] 0px" should set the property value assert_equals: serialization should be canonical expected "none / 0px" but got "none / 0px / none "7 FAIL e.style['grid'] = "[a] 10px / auto" should set the property value assert_equals: serialization should be canonical expected "[a] 10px / auto" but got "[a] 10px / auto / none "8 FAIL e.style['grid'] = "[a] 10px / none" should set the property value assert_equals: serialization should be canonical expected "[a] 10px / none" but got "[a] 10px / none / none "9 FAIL e.style['grid'] = "[] 10px [] / [] auto []" should set the property value assert_equals: serialization should be canonical expected "10px / auto" but got "10px / auto / none "10 FAIL e.style['grid'] = "[a] \"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px" but got "[a] 10px / none / \"a\" "11 FAIL e.style['grid'] = "[a] \"a\" 10px []" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px" but got "[a] 10px / none / \"a\" "12 FAIL e.style['grid'] = "\"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px" but got "10px / none / \"a\" "13 FAIL e.style['grid'] = "[] \"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px" but got "10px / none / \"a\" "14 FAIL e.style['grid'] = "[a] \"a\" 10px [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px [a]" but got "[a] 10px [a] / none / \"a\" "15 FAIL e.style['grid'] = "\"a\"" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" "16 FAIL e.style['grid'] = "\"a\" auto" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" "17 FAIL e.style['grid'] = "\"a\" / 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 10px" but got "auto / 10px / \"a\" "18 FAIL e.style['grid'] = "\"a\" / 20%" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 20%" but got "auto / 20% / \"a\" "19 FAIL e.style['grid'] = "\"a\" / 5fr" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 5fr" but got "auto / 5fr / \"a\" "20 FAIL e.style['grid'] = "[a] \"a\"" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\"" but got "[a] auto / none / \"a\" "21 FAIL e.style['grid'] = "[a] \"a\" [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" [a]" but got "[a] auto [a] / none / \"a\" "22 FAIL e.style['grid'] = "[] \"a\"" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" "23 FAIL e.style['grid'] = "\"a\" [] [] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"b\"" but got "auto auto / none / \"a\" \"b\" "24 FAIL e.style['grid'] = "\"a\" [] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"b\"" but got "auto auto / none / \"a\" \"b\" "25 FAIL e.style['grid'] = "\"a\" [a] [b] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a b] \"b\"" but got "auto [a b] auto / none / \"a\" \"b\" "26 FAIL e.style['grid'] = "\"a\" [a] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\"" but got "auto [a] auto / none / \"a\" \"b\" "27 FAIL e.style['grid'] = "\"a\" / 0" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 0px" but got "auto / 0px / \"a\" "28 FAIL e.style['grid'] = "\"a\" 10px / 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px / 10px" but got "10px / 10px / \"a\" "29 FAIL e.style['grid'] = "\"a\" [a] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px" but got "auto [a] 10px / none / \"a\" \"b\" "30 FAIL e.style['grid'] = "\"a\" [a] \"b\" 10px [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px [a]" but got "auto [a] 10px [a] / none / \"a\" \"b\" "31 FAIL e.style['grid'] = "\"a\" [a] [a] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a a] \"b\" 10px" but got "auto [a a] 10px / none / \"a\" \"b\" "32 FAIL e.style['grid'] = "\"a\" [a] [] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px" but got "auto [a] 10px / none / \"a\" \"b\" "33 FAIL e.style['grid'] = "\"a\" 10px [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px [a] \"b\" [a]" but got "10px [a] auto [a] / none / \"a\" \"b\" "34 FAIL e.style['grid'] = "\"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" [a]" but got "auto [a] auto [a] / none / \"a\" \"b\" "35 FAIL e.style['grid'] = "[a] \"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" [a] \"b\" [a]" but got "[a] auto [a] auto [a] / none / \"a\" \"b\" "36 FAIL e.style['grid'] = "\"a\" \"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"a\" [a] \"b\" [a]" but got "auto auto [a] auto [a] / none / \"a\" \"a\" \"b\" "37 FAIL e.style['grid'] = "\"a\" [a] \"b\" [a] / 0" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" [a] / 0px" but got "auto [a] auto [a] / 0px / \"a\" \"b\" "38 FAIL e.style['grid'] = "\"a\" \"a\" [a] [a] \"b\" / auto" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"a\" [a a] \"b\" / auto" but got "auto auto [a a] auto / auto / \"a\" \"a\" \"b\" "2 FAIL e.style['grid'] = "none" should set the property value assert_equals: serialization should be canonical expected "none" but got "none / none / none / row / auto / auto" 3 FAIL e.style['grid'] = "none / none" should set the property value assert_equals: serialization should be canonical expected "none" but got "none / none / none / row / auto / auto" 4 FAIL e.style['grid'] = "auto / auto" should set the property value assert_equals: serialization should be canonical expected "auto / auto" but got "auto / auto / none / row / auto / auto" 5 FAIL e.style['grid'] = "none / [a] 0px" should set the property value assert_equals: serialization should be canonical expected "none / [a] 0px" but got "none / [a] 0px / none / row / auto / auto" 6 FAIL e.style['grid'] = "none / [] 0px" should set the property value assert_equals: serialization should be canonical expected "none / 0px" but got "none / 0px / none / row / auto / auto" 7 FAIL e.style['grid'] = "[a] 10px / auto" should set the property value assert_equals: serialization should be canonical expected "[a] 10px / auto" but got "[a] 10px / auto / none / row / auto / auto" 8 FAIL e.style['grid'] = "[a] 10px / none" should set the property value assert_equals: serialization should be canonical expected "[a] 10px / none" but got "[a] 10px / none / none / row / auto / auto" 9 FAIL e.style['grid'] = "[] 10px [] / [] auto []" should set the property value assert_equals: serialization should be canonical expected "10px / auto" but got "10px / auto / none / row / auto / auto" 10 FAIL e.style['grid'] = "[a] \"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px" but got "[a] 10px / none / \"a\" / row / auto / auto" 11 FAIL e.style['grid'] = "[a] \"a\" 10px []" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px" but got "[a] 10px / none / \"a\" / row / auto / auto" 12 FAIL e.style['grid'] = "\"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px" but got "10px / none / \"a\" / row / auto / auto" 13 FAIL e.style['grid'] = "[] \"a\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px" but got "10px / none / \"a\" / row / auto / auto" 14 FAIL e.style['grid'] = "[a] \"a\" 10px [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" 10px [a]" but got "[a] 10px [a] / none / \"a\" / row / auto / auto" 15 FAIL e.style['grid'] = "\"a\"" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" / row / auto / auto" 16 FAIL e.style['grid'] = "\"a\" auto" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" / row / auto / auto" 17 FAIL e.style['grid'] = "\"a\" / 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 10px" but got "auto / 10px / \"a\" / row / auto / auto" 18 FAIL e.style['grid'] = "\"a\" / 20%" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 20%" but got "auto / 20% / \"a\" / row / auto / auto" 19 FAIL e.style['grid'] = "\"a\" / 5fr" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 5fr" but got "auto / 5fr / \"a\" / row / auto / auto" 20 FAIL e.style['grid'] = "[a] \"a\"" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\"" but got "[a] auto / none / \"a\" / row / auto / auto" 21 FAIL e.style['grid'] = "[a] \"a\" [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" [a]" but got "[a] auto [a] / none / \"a\" / row / auto / auto" 22 FAIL e.style['grid'] = "[] \"a\"" should set the property value assert_equals: serialization should be canonical expected "\"a\"" but got "auto / none / \"a\" / row / auto / auto" 23 FAIL e.style['grid'] = "\"a\" [] [] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"b\"" but got "auto auto / none / \"a\" \"b\" / row / auto / auto" 24 FAIL e.style['grid'] = "\"a\" [] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"b\"" but got "auto auto / none / \"a\" \"b\" / row / auto / auto" 25 FAIL e.style['grid'] = "\"a\" [a] [b] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a b] \"b\"" but got "auto [a b] auto / none / \"a\" \"b\" / row / auto / auto" 26 FAIL e.style['grid'] = "\"a\" [a] \"b\"" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\"" but got "auto [a] auto / none / \"a\" \"b\" / row / auto / auto" 27 FAIL e.style['grid'] = "\"a\" / 0" should set the property value assert_equals: serialization should be canonical expected "\"a\" / 0px" but got "auto / 0px / \"a\" / row / auto / auto" 28 FAIL e.style['grid'] = "\"a\" 10px / 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px / 10px" but got "10px / 10px / \"a\" / row / auto / auto" 29 FAIL e.style['grid'] = "\"a\" [a] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px" but got "auto [a] 10px / none / \"a\" \"b\" / row / auto / auto" 30 FAIL e.style['grid'] = "\"a\" [a] \"b\" 10px [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px [a]" but got "auto [a] 10px [a] / none / \"a\" \"b\" / row / auto / auto" 31 FAIL e.style['grid'] = "\"a\" [a] [a] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a a] \"b\" 10px" but got "auto [a a] 10px / none / \"a\" \"b\" / row / auto / auto" 32 FAIL e.style['grid'] = "\"a\" [a] [] \"b\" 10px" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" 10px" but got "auto [a] 10px / none / \"a\" \"b\" / row / auto / auto" 33 FAIL e.style['grid'] = "\"a\" 10px [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" 10px [a] \"b\" [a]" but got "10px [a] auto [a] / none / \"a\" \"b\" / row / auto / auto" 34 FAIL e.style['grid'] = "\"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" [a]" but got "auto [a] auto [a] / none / \"a\" \"b\" / row / auto / auto" 35 FAIL e.style['grid'] = "[a] \"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "[a] \"a\" [a] \"b\" [a]" but got "[a] auto [a] auto [a] / none / \"a\" \"b\" / row / auto / auto" 36 FAIL e.style['grid'] = "\"a\" \"a\" [a] \"b\" [a]" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"a\" [a] \"b\" [a]" but got "auto auto [a] auto [a] / none / \"a\" \"a\" \"b\" / row / auto / auto" 37 FAIL e.style['grid'] = "\"a\" [a] \"b\" [a] / 0" should set the property value assert_equals: serialization should be canonical expected "\"a\" [a] \"b\" [a] / 0px" but got "auto [a] auto [a] / 0px / \"a\" \"b\" / row / auto / auto" 38 FAIL e.style['grid'] = "\"a\" \"a\" [a] [a] \"b\" / auto" should set the property value assert_equals: serialization should be canonical expected "\"a\" \"a\" [a a] \"b\" / auto" but got "auto auto [a a] auto / auto / \"a\" \"a\" \"b\" / row / auto / auto" 39 39 -
trunk/Source/WebCore/ChangeLog
r288542 r288544 1 2022-01-25 Ziran Sun <zsun@igalia.com> 2 3 [css-grid] Fix grid shorthand expansion of initial values 4 https://bugs.webkit.org/show_bug.cgi?id=234430 5 6 Reviewed by Sergio Villar Senin. 7 8 This CL is to add the InitialValue support when parsing the grid shorthand for 6 grid properties 9 including grid-auto-columns, grid-auto-flow, grid-auto-rows, grid-template-areas, 10 grid-template-columns and grid-template-rows. The original code only adds a CSSInitial. 11 12 This is an import of chromium change at 13 https://chromium-review.googlesource.com/c/chromium/src/+/3299364 14 15 Apart from fixing wpt test imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand.html, 16 The CL also updates the expectation file for test 17 imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid.html. This test fails before 18 this CL and need to be investigated as a seperated issue. Related bugs have been raised at - 19 https://bugs.chromium.org/p/chromium/issues/detail?id=1028283 & 20 https://bugs.webkit.org/show_bug.cgi?id=204611 21 22 * css/parser/CSSPropertyParser.cpp: 23 (WebCore::consumeImplicitGridAutoFlow): 24 (WebCore::CSSPropertyParser::consumeGridShorthand): 25 * style/StyleBuilderConverter.h: 26 (WebCore::Style::BuilderConverter::convertGridTrackSizeList): 27 (WebCore::Style::BuilderConverter::convertGridAutoFlow): 28 1 29 2022-01-24 Youenn Fablet <youenn@apple.com> 2 30 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r288433 r288544 5914 5914 if (range.atEnd()) 5915 5915 return nullptr; 5916 auto list = CSSValueList::createSpaceSeparated(); 5917 list->append(WTFMove(flowDirection)); 5916 RefPtr<CSSValue> denseIdent; 5918 5917 if (range.peek().id() == CSSValueAutoFlow) { 5919 5918 range.consumeIncludingWhitespace(); 5920 RefPtr<CSSValue> denseIdent = consumeIdent<CSSValueDense>(range); 5921 if (denseIdent) 5922 list->append(denseIdent.releaseNonNull()); 5919 denseIdent = consumeIdent<CSSValueDense>(range); 5923 5920 } else { 5924 5921 // Dense case 5925 5922 if (range.peek().id() != CSSValueDense) 5926 5923 return nullptr; 5927 range.consumeIncludingWhitespace(); 5928 if (range.atEnd() || range.peek().id() != CSSValueAutoFlow) 5929 return nullptr; 5930 range.consumeIncludingWhitespace(); 5931 list->append(CSSValuePool::singleton().createIdentifierValue(CSSValueDense)); 5932 } 5924 denseIdent = consumeIdent<CSSValueDense>(range); 5925 if (!denseIdent || !consumeIdent<CSSValueAutoFlow>(range)) 5926 return nullptr; 5927 } 5928 auto list = CSSValueList::createSpaceSeparated(); 5929 if (flowDirection->valueID() == CSSValueColumn || !denseIdent) 5930 list->append(WTFMove(flowDirection)); 5931 if (denseIdent) 5932 list->append(denseIdent.releaseNonNull()); 5933 5933 5934 5934 return list; … … 5945 5945 // It can only be specified the explicit or the implicit grid properties in a single grid declaration. 5946 5946 // The sub-properties not specified are set to their initial value, as normal for shorthands. 5947 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important); 5948 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important); 5949 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, CSSValuePool::singleton().createImplicitInitialValue(), important); 5947 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, CSSValuePool::singleton().createIdentifierValue(CSSValueRow), important); 5948 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, CSSValuePool::singleton().createIdentifierValue(CSSValueAuto), important); 5949 addProperty(CSSPropertyGridAutoRows, CSSPropertyGrid, CSSValuePool::singleton().createIdentifierValue(CSSValueAuto), important); 5950 5950 5951 return true; 5951 5952 } … … 5965 5966 return false; 5966 5967 if (consumeSlashIncludingWhitespace(m_range)) 5967 autoRowsValue = CSSValuePool::singleton().createI mplicitInitialValue();5968 autoRowsValue = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto); 5968 5969 else { 5969 5970 autoRowsValue = consumeGridTrackList(m_range, m_context.mode, GridAuto); … … 5978 5979 if (!templateColumns) 5979 5980 return false; 5980 templateRows = CSSValuePool::singleton().createI mplicitInitialValue();5981 autoColumnsValue = CSSValuePool::singleton().createI mplicitInitialValue();5981 templateRows = CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 5982 autoColumnsValue = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto); 5982 5983 } else { 5983 5984 // 3- <grid-template-rows> / [ auto-flow && dense? ] <grid-auto-columns>? … … 5991 5992 return false; 5992 5993 if (m_range.atEnd()) 5993 autoColumnsValue = CSSValuePool::singleton().createI mplicitInitialValue();5994 autoColumnsValue = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto); 5994 5995 else { 5995 5996 autoColumnsValue = consumeGridTrackList(m_range, m_context.mode, GridAuto); … … 5997 5998 return false; 5998 5999 } 5999 templateColumns = CSSValuePool::singleton().createI mplicitInitialValue();6000 autoRowsValue = CSSValuePool::singleton().createI mplicitInitialValue();6000 templateColumns = CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 6001 autoRowsValue = CSSValuePool::singleton().createIdentifierValue(CSSValueAuto); 6001 6002 } 6002 6003 … … 6008 6009 addProperty(CSSPropertyGridTemplateColumns, CSSPropertyGrid, templateColumns.releaseNonNull(), important); 6009 6010 addProperty(CSSPropertyGridTemplateRows, CSSPropertyGrid, templateRows.releaseNonNull(), important); 6010 addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, CSSValuePool::singleton().createI mplicitInitialValue(), important);6011 addProperty(CSSPropertyGridTemplateAreas, CSSPropertyGrid, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important); 6011 6012 addProperty(CSSPropertyGridAutoFlow, CSSPropertyGrid, gridAutoFlow.releaseNonNull(), important); 6012 6013 addProperty(CSSPropertyGridAutoColumns, CSSPropertyGrid, autoColumnsValue.releaseNonNull(), important); -
trunk/Source/WebCore/style/StyleBuilderConverter.h
r287909 r288544 1130 1130 inline Vector<GridTrackSize> BuilderConverter::convertGridTrackSizeList(BuilderState& builderState, const CSSValue& value) 1131 1131 { 1132 if (is<CSSPrimitiveValue>(value)) { 1133 ASSERT(downcast<CSSPrimitiveValue>(value).isValueID() && downcast<CSSPrimitiveValue>(value).valueID() == CSSValueAuto); 1134 return RenderStyle::initialGridAutoRows(); 1135 } 1136 1132 1137 ASSERT(value.isValueList()); 1133 1138 auto& valueList = downcast<CSSValueList>(value); … … 1158 1163 inline GridAutoFlow BuilderConverter::convertGridAutoFlow(BuilderState&, const CSSValue& value) 1159 1164 { 1160 auto& list = downcast<CSSValueList>(value); 1161 if (!list.length()) 1162 return RenderStyle::initialGridAutoFlow(); 1163 1164 auto& first = downcast<CSSPrimitiveValue>(*list.item(0)); 1165 auto* second = downcast<CSSPrimitiveValue>(list.item(1)); 1165 ASSERT(!is<CSSPrimitiveValue>(value) || downcast<CSSPrimitiveValue>(value).isValueID()); 1166 1167 bool isValuelist = is<CSSValueList>(value); 1168 if (isValuelist) { 1169 auto& list = downcast<CSSValueList>(value); 1170 if (!list.length()) 1171 return RenderStyle::initialGridAutoFlow(); 1172 } 1173 1174 auto& first = downcast<CSSPrimitiveValue>(isValuelist ? *(downcast<CSSValueList>(value).item(0)) : value); 1175 auto* second = downcast<CSSPrimitiveValue>(isValuelist && downcast<CSSValueList>(value).length() == 2 ? downcast<CSSValueList>(value).item(1) : nullptr); 1166 1176 1167 1177 GridAutoFlow autoFlow;
Note: See TracChangeset
for help on using the changeset viewer.