Closed Bug 1933288 Opened 16 days ago Closed 14 days ago

Add comprehensive WPT tests for 'stretch' keyword

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 3 open bugs)

Details

Attachments

(9 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
1.88 KB, text/html
Details
35.96 KB, image/png
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Filing this bug as a helper for bug 1789477 to land some tests for the CSS 'stretch' sizing keyword.

Assignee: nobody → dholbert
Status: NEW → ASSIGNED

I'm adding this test as a modified-copy of the similar inline-size test added
in the previous patch in this series.

The stretch value for these properties (when applied on a clamp on extreme
values) should mostly produce the same results as if we directly specified
"inline-size:stretch", so these tests have mostly the same expectations as the
equivalent test that just sets "inline-size".

The stretch value for these properties (when applied on a clamp on extreme
values) should mostly produce the same results as if we directly specified
"block-size:stretch", so these tests have mostly the same expectations as the
equivalent test that just sets "block-size".

These new tests mostly fail for now (per these auto-generated annotations), but
they pass with my local patch stack for bug 1789477.

Notably, I'm not testing tables in these tests, because I found some interop differences between the behavior of stretch in tables, in my work-in-progress patch stack, vs. Blink, vs. WebKit (with -webkit-fill-available since they don't yet handle stretch).

It's not entirely clear what's correct for stretch in various table scenarios (since tables are underspecified and often involve at least one content-measuring pass where stretch would fall back to content-sizing; and many table-part CSS sizes are really just a starting suggestion; etc.), so I'm going to add those tests separately as .tentative or in the mozilla private WPT directory, since I have less confidence about what expectations are correct there.

The testcase that I just attached (comment 8, screenshot in comment 9) is to demonstrate the bug (or at least inconsistency) that Chrome has with stretch for the min/max block sizing properties (typically min-height/max-height), which I alluded to in
https://phabricator.services.mozilla.com/D230159#7961971

I'll be filing a Chrome bug on that shortly, linking to the testcase/screenshot attached here.

Chrome bug for the min/max-block-size failures with nonzero inset values: https://issues.chromium.org/issues/380912396

These tests are all annotated as expected-failure for now, pending our
implementation of stretch/-webkit-fill-available landing and being enabled in
this directory in subsequent bugs.

Attachment #9439845 - Attachment description: Bug 1933288 part 6: Add .tentative copies of tests from previous patch, testing "-webkit-fill-available", assuming it to be an alias of "stretch". r?jwatt,#layout → Bug 1933288 part 6: Add .tentative copies of the tests from previous patches, now testing "-webkit-fill-available", assumed to be an alias of "stretch". r?jwatt,#layout
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6314926bcd51 part 1: Add a WPT to test the behavior of the 'stretch' keyword as an inline-size. r=jwatt https://hg.mozilla.org/integration/autoland/rev/b0d3b4945584 part 2: Add a WPT to test the behavior of the 'stretch' keyword as a block-size. r=jwatt https://hg.mozilla.org/integration/autoland/rev/de4f982de09c part 3: Add WPTs to test the behavior of the 'stretch' keyword as a min-inline-size and max-inline-size. r=jwatt https://hg.mozilla.org/integration/autoland/rev/f78271585a62 part 4: Add WPTs to test the behavior of the 'stretch' keyword as a min-block-size and max-block-size. r=jwatt https://hg.mozilla.org/integration/autoland/rev/8f90d4080eec part 5: Add test expected-failure annotations. r=jwatt

Try's looking good so far for parts 1-5 ( https://treeherder.mozilla.org/jobs?repo=try&revision=1af82ac5e8970e727fe28ad50f9a6f80f1106b22 ), so I landed those.

--> leave-open to land part 6 (which just adds copies with -webkit-fill-available) once that's r+.

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49364 for changes under testing/web-platform/tests
Blocks: 1789477
No longer depends on: 1789477
Blocks: 1933408

(In reply to Daniel Holbert [:dholbert] from comment #14)

--> leave-open to land part 6 (which just adds copies with -webkit-fill-available) once that's r+.

whoops, I forgot to add leave-open. Reopening, though I just triggered lando for part 6 and we can let this close when that makes it to m-c.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8c4ccbbd99e2 part 6: Add .tentative copies of the tests from previous patches, now testing "-webkit-fill-available", assumed to be an alias of "stretch". r=jwatt

I'll be adding another patch here to extend these tests, actually. --> leave-open after all.

Keywords: leave-open

box-sizing:border-box shouldn't impact the sizing because we're growing to fill
the containing block, which means we end up with the same overall size in the
relevant axis regardless of whether we're stretching the border-box or the
content-box.

(There's one special case in these tests where it does actually matter, but
not in a way that's really based on how 'stretch' itself is resolved; so I
simply opt that subtest out of this second pass.)

Blocks: 1933596
Pushed by dholbert@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7892bfc41933 part 7: Add a second pass to 'stretch' WPTs to test with "box-sizing:border-box", to validate that it doesn't impact the sizing. r=TYLin
Upstream PR merged by moz-wptsync-bot
Status: REOPENED → RESOLVED
Closed: 15 days ago14 days ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: