Open Bug 1663035 Opened 4 years ago Updated 6 months ago

New wpt failures in /css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html

Categories

(Core :: Layout: Grid, defect)

defect

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

(Depends on 2 open bugs, Blocks 2 open bugs)

Details

(Whiteboard: [wpt])

Attachments

(2 files)

Syncing wpt PR 25390 found new untriaged test failures in CI

Tests Affected

Firefox-only failures

/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html
'grid' with: grid-template-columns: max-content; and grid-template-rows: max-content;: FAIL
'grid' with: grid-template-columns: minmax(0, max-content); and grid-template-rows: minmax(0, max-content);: FAIL
'grid' with: grid-template-columns: minmax(max-content, 10px); and grid-template-rows: minmax(max-content, 10px);: FAIL
'grid' with: grid-template-columns: auto auto; and grid-template-rows: auto auto;: FAIL
'grid' with: grid-template-columns: max-content max-content; and grid-template-rows: max-content max-content;: FAIL
'grid' with: grid-template-columns: minmax(0, auto) minmax(0, auto); and grid-template-rows: minmax(0, auto) minmax(0, auto);: FAIL
'grid' with: grid-template-columns: minmax(0, max-content) minmax(0, max-content); and grid-template-rows: minmax(0, max-content) minmax(0, max-content);: FAIL
'grid' with: grid-template-columns: minmax(max-content, 10px) minmax(max-content, 10px); and grid-template-rows: minmax(max-content, 10px) minmax(max-content, 10px);: FAIL
'grid' with: grid-template-columns: 20px max-content; and grid-template-rows: 20px max-content;: FAIL
'grid' with: grid-template-columns: 20px minmax(0, max-content); and grid-template-rows: 20px minmax(0, max-content);: FAIL
'grid' with: grid-template-columns: 20px minmax(max-content, 6px); and grid-template-rows: 20px minmax(max-content, 6px);: FAIL
'grid' with: grid-template-columns: 20px minmax(max-content, 30px); and grid-template-rows: 20px minmax(max-content, 30px);: FAIL
'grid' with: grid-template-columns: max-content min-content; and grid-template-rows: max-content min-content;: FAIL

CI Results

Gecko CI (Treeherder)
GitHub PR Head

Notes

These updates will be on mozilla-central once bug 1663026 lands.

Note: this bug is for tracking fixing the issues and is not
owned by the wpt sync bot.

This bug is linked to the relevant tests by an annotation in
https://github.com/web-platform-tests/wpt-metadata. These annotations
can be edited using the wpt interop dashboard
https://jgraham.github.io/wptdash/

If this bug is split into multiple bugs, please also update the
annotations, otherwise we are unable to track which wpt issues are
already triaged. Resolving as duplicate or closing this issue should
be cause the bot to automatically update or remove the annotation.

Severity: -- → S3
See Also: → 1661206

wpt.fyi: https://wpt.fyi/results/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html

Live link to test:
http://wpt.live/css/css-grid/layout-algorithm/grid-intrinsic-track-sizes-001.html

The failures look like a very small rounding difference between Firefox and the test's expectations (off by 0.0167px, i.e. 1 nscoord app-unit).

It looks like the presence/absence of a <br> element seems to be responsible (or at least involved) in this 1-app-unit difference, in a reduced testcase.

Expectation for testcase 1/reference case 1
Consistent output between the two.

Actual results:
The testcase shows 20.0167px whereas the reference case shows 20px

Frame tree when testcase 1 is loaded -- note w=1201 on the item and w=1 on the BR frame in particular:

              GridContainer(div id=grid)(0)@7ba573186b18 parent=7ba573186a10 next=7ba573186df8 (x=0, y=0, w=7560, h=7560) [content=7ba576d043a0] [cs=7ba57958a808] <
                Block(div id=item)(1)@7ba573186bd8 parent=7ba573186b18 (x=180, y=180, w=1201, h=600) [content=7ba576d044c0] [cs=7ba57958ab08] <
                  line@7ba573186da8 count=2 state=inline,clean,prevmarginclean,not-impacted,not-wrapped,forced-break-after,clear-before:none,clear-after:none(x=0, y=0, w=1201, h=600) <
                    Text(0)"XX"@7ba573186c90 parent=7ba573186bd8 next=7ba573186d30 (x=0, y=0, w=1200, h=600) [content=7ba576d05300] [cs=7ba5795d8b08:-moz-text] [run=7ba576375700][0,2,T] 
                    BR(br)(1)@7ba573186d30 parent=7ba573186bd8 (x=1200, y=0, w=1, h=600) [content=7ba576d04670] [cs=7ba5795d5508]
                  >

I guess that comes from this:
https://searchfox.org/mozilla-central/rev/1d4c27f9f166ce6e967fb0e8c8d6e0795dbbd12e/layout/generic/BRFrame.cpp#95-96,152-153

void BRFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics,
                     const ReflowInput& aReflowInput, nsReflowStatus& aStatus) {
...
      // The code below in AddInlinePrefISize also adds 1 appunit to width
      finalSize.ISize(wm) = 1;

...and this:
https://searchfox.org/mozilla-central/rev/1d4c27f9f166ce6e967fb0e8c8d6e0795dbbd12e/layout/generic/BRFrame.cpp#176,179-180

void BRFrame::AddInlinePrefISize(gfxContext* aRenderingContext,
...
    // Match the 1 appunit width assigned in the Reflow method above
    aData->mCurrentLine += 1;

Looks like we have bug 421436 on file to fix this 1-app-unit hack, and we landed a patch to fix it 10 years ago, but it caused a regression so it was backed out.

So: in any case, this bug here seems to just be a variant of bug 421436.

Depends on: 421436
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: