Closed Bug 1700849 Opened 4 years ago Closed 2 years ago

WPT test grid-positioned-items-content-alignment-001.html and grid-positioned-items-content-alignment-rtl-001.html fail in Firefox (in a way that looks like it's expecting a particular rounding behavior at an edge case?)

Categories

(Core :: Layout: Grid, task)

task

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

grid-positioned-items-content-alignment-001.html has two tests that fail in Firefox:

https://wpt.fyi/results/css/css-grid/abspos/grid-positioned-items-content-alignment-001.html?label=experimental&label=master&aligned

Fail .grid 45 assert_equals: <div class="grid contentSpaceAround"> <div style="grid-column: 2 / auto; grid-row: 2 / auto;" data-offset-x="288" data-offset-y="145" data-expected-width="112" data-expected-height="55"> </div> </div> width expected 112 but got 113

Fail .grid 46 assert_equals: <div class="grid contentSpaceAround"> <div class="offsets" style="grid-column: 2 / auto; grid-row: 2 / auto;" data-offset-x="288" data-offset-y="145" data-expected-width="112" data-expected-height="55"> </div> </div> width expected 112 but got 113

It fails in Safari, too, according to the above wpt.fyi table.

Also, if I run the test in Chrome Dev Edition (Version 91.0.4449.6 (Official Build) dev (64-bit)) on a system with 200% pixel scaling, it fails the same way -- "expected 112 but got 113" for .grid 45 and .grid 46. So I suspect there's some fragile pixel-rounding behavior that the test is inadvertently depending on here.

So really, this is probably a case of "the test is broken", not a Firefox bug.

This is one of the tests that the Chromium folks selected for their compat2021 effort, FWIW (it's currently listed in https://github.com/Ecosystem-Infra/wpt-results-analysis/blob/master/compat-2021/css-grid-tests.txt )

The RTL version https://wpt.fyi/results/css/css-grid/abspos/grid-positioned-items-content-alignment-rtl-001.html?label=master&label=experimental&aligned&q=firefox%3Afail seems to be the same sort of issue (expected 162 but got 163) -- off by 1px, which happens in Chrome as well with 200% device pixel scaling, configured in my system settings.

Summary: WPT test grid-positioned-items-content-alignment-001.html fails in Firefox (in a way that looks like it's expecting a particular rounding behavior at an edge case?) → WPT test grid-positioned-items-content-alignment-001.html and grid-positioned-items-content-alignment-rtl-001.html fail in Firefox (in a way that looks like it's expecting a particular rounding behavior at an edge case?)

Looks like the test passes now, based on the above WPT.fyi links.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.