Closed Bug 2086902 Opened 1 month ago Closed 18 days ago

[wpt-sync] Sync PR 64179 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321504

Categories

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

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Alan Baradlay <zalan@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321504

WebKit export from bug: [<!---->block-<!---->in-<!---->inline]<!----> A fieldset on a line takes its legend'<!---->s overhang twice

<pre>
[block-in-inline] A fieldset on a line takes its legend's overhang twice

A legend that reaches past its fieldset's border edge is carried as an intrinsic border, which
RenderBlock::borderBefore adds to the fieldset's border. The border box height the fieldset ends up with is
measured with that border in it, so RenderBox::contentBoxHeight has nothing left and clamps at zero.

updateLayoutBoxDimensions builds the geometry for a box on a line from both of those: the content box height from
the renderer, and the border from adjustBorderForTableAndFieldset, which adds the intrinsic border again. The
margin box the line gets is then max(0, H - BP) + BP, which is BP rather than H whenever the legend overhangs, so
the fieldset takes the overhang twice and its container grows by it.

The overhang belongs to the fieldset's own content: the lines inside it start below the legend. It says nothing
about the box a line holds, whose inner layout the render tree does. So take it where the fieldset is the
formatting context root and nowhere else, which leaves logicalBorder about a table's collapsed borders. The
content box size comes from what is left of the border box, since the renderer's own answer is measured against a
border that has the overhang in it. Only the fieldset's own block axis grew, which is the container's inline axis
when the two writing modes differ in orientation.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=321504">https://bugs.webkit.org/show_bug.cgi?id=321504</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/319033@main">https://commits.webkit.org/319033@main</a>
</pre>

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 86 tests

Status Summary

Firefox

OK : 37
PASS: 1[GitHub] 8[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 302[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 340[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: 6[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 9[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]

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.