Closed Bug 2055926 Opened 6 days ago Closed 1 day ago

[wpt-sync] Sync PR 61372 - layout: Implement block-axis centering for buttons

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 61372 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/61372
Details from upstream follow.

Oriol Brufau <obrufau@igalia.com> wrote:

layout: Implement block-axis centering for buttons

Mark <button> elements and <input> that lay out as buttons with a new FragmentFlags::IS_BUTTON flag. Then, if they contain a block formatting context, center their contents in the block axis.

This is done similarly as for vertical-align on table cells: we wrap the contents inside a PositioningFragment, which is then shifted to appear at the correct place. But unlike table cells, this is done before caching the layout results, not afterwards.

In the future, when we implement align-content for block containers, we should probably switch to that.

Testing: 1 tests passes, and adding 3 new tests
Fixes: #<!-- nolink -->41432

Reviewed in servo/servo#46590

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 20 tests and 24 subtests

Status Summary

Firefox

OK : 5
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 3[GitHub] 204[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 218[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 13

Chrome

PASS: 3

Safari

PASS: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/rendering/widgets/button-layout/display-other.html [wpt.fyi]
    • display: run-in: FAIL
    • display: table-row-group: FAIL
    • display: table-header-group: FAIL
    • display: table-footer-group: FAIL
    • display: table-row: FAIL
    • display: table-cell: FAIL
    • display: table-column-group: FAIL
    • display: table-column: FAIL
    • display: table-caption: FAIL
    • display: ruby-base: FAIL
    • display: ruby-text: FAIL
    • display: ruby-base-container: FAIL
    • display: ruby-text-container: FAIL
Status: NEW → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
You need to log in before you can comment on or make changes to this bug.