Firefox fails WPT css/css-grid/abspos/positioned-grid-items-025.html
Categories
(Core :: CSS Parsing and Computation, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox117 | --- | fixed |
People
(Reporter: twisniewski, Assigned: dholbert)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
wpt.fyi:
https://wpt.fyi/results/css/css-grid/abspos/positioned-grid-items-025.html
It appears as though Firefox has the bigger blue box on the test too far right by 1px, compared to the test's expectations.
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Comparing our rendering to Chrome, zoomed in to 500%, it looks like we agree on the rendering of the testcase, and we disagree on the rendering of the reference case.
| Assignee | ||
Comment 2•3 years ago
|
||
The reference case is accidentally depending on the width of a single space character. :)
There's whitespace between the two blue rectangles, which renders (as the width of a space character). Then the testcase adds an additional 146px translation to the second blue rectangle.
But its position is still influenced by the width of that space character. And in Firefox, that space is 1px wider than it is in WebKit and Chrome.
So: the fix here is to remove that whitespace (or remove its influence, by making the blue divs not be inline-blocks. I don't think there's any reason for them to be inline-blocks; that's just how the test author happened to decide on making them stack horizontally.)
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
This testcase happened to use two inline-blocks, with whitespace between them,
which renders as a space character. The reference case's positioning for the
second inline-block was hand-tuned with a particular magic number of pixels,
which only produced the actual intended rendering if the space character
happened to render at a particular width.
This patch addresses this issue by making the elements be blocks instead of
inline-blocks, so that the whitespace between them gets collapsed away and
doesn't impact the rendering. I then make them "stack horizontally" by
translating the second one upwards to still show up alongside the first one.
(There are of course other ways to achieve this, but this requires the least
edits to this existing file, while keeping things still fairly understandable.)
| Assignee | ||
Comment 4•3 years ago
|
||
[CC'ing mattwoodrow as an FYI, since he wrote this test as part of his grid work in WebKit]
Comment 7•3 years ago
|
||
| bugherder | ||
Description
•