WPT css-grid/parsing/grid-template-shorthand-areas-valid.html fails in Firefox
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox115 | --- | fixed |
People
(Reporter: dholbert, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
wpt.fyi:
https://wpt.fyi/results/css/css-grid/parsing/grid-template-shorthand-areas-valid.html
Direct link to test:
http://wpt.live/css/css-grid/parsing/grid-template-shorthand-areas-valid.html
The test does something like the following:
let elem = document.documentElement;
elem.style.gridTemplate = "none / 1px" ;
elem.style.gridTemplateAreas = "";
elem.style.gridTemplateAreas = '"a"';
...and then it inspects elem.style.gridTemplate.
The lines that adjust grid-template-areas seem to also reset the serialization of the grid-template shorthand property itself.
| Reporter | ||
Comment 1•3 years ago
|
||
So this seems to be a style-system bug with serialization of these interrelated properties.
Note, the grid-template property is defined here:
https://drafts.csswg.org/css-grid/#explicit-grid-shorthand
| Reporter | ||
Comment 2•3 years ago
|
||
| Comment hidden (obsolete) |
| Reporter | ||
Comment 4•3 years ago
|
||
Aha, I was missing quotes around "a" in order to trigger the thing that the test is actually testing. When I add those quotes, I do see a difference between Firefox and Chrome. I'll update comment 0 to reflect that, and post an updated version of the testcase.
| Reporter | ||
Comment 5•3 years ago
|
||
| Reporter | ||
Comment 6•3 years ago
•
|
||
I think this might be a test bug? The grid-template shorthand is supposed to set the grid-template-areas property to none. So once it's been set to some other valid value, it makes sense that it wouldn't be possible to serialize a value from it.
This seems similar to e.g. the situation with font shorthand and the font-size-adjust longhand, which (per MDN) it resets to its initial value (none) despite not directly having the ability to set a custom value for it. It looks like we have the same behavior-difference with Chrome for that example, actually; I'll attach a testcase to demonstrate.
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 7•3 years ago
|
||
| Reporter | ||
Comment 8•3 years ago
|
||
Here's a screenshot showing the difference for testcase 2.
| Reporter | ||
Comment 9•3 years ago
|
||
emilio, does this ring any bells for you? I'm pretty sure we're correct to decline-to-serialize-the-shorthand in this situation, right? (Is there a known Chrome bug on their behavior, assuming they're the buggy ones here?)
Comment 10•3 years ago
|
||
Blink is clearly wrong, probably https://bugs.chromium.org/p/chromium/issues/detail?id=1322084 or similar.
| Assignee | ||
Comment 11•3 years ago
|
||
The test is broken. grid-template can't serialize to something which
doesn't really round-trip, so firefox is correct and Blink is wrong.
Updated•3 years ago
|
Comment 13•3 years ago
|
||
Comment 15•3 years ago
|
||
Backed out for wpt failures on grid-template-shorthand-areas-valid.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/10fc0d6f32c1f0b2c11c23f38c36fc79dfd8fc96
Log link: https://treeherder.mozilla.org/logviewer?job_id=416101293&repo=autoland&lineNumber=6069
| Assignee | ||
Updated•3 years ago
|
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
| bugherder | ||
Description
•