Closed Bug 2087705 Opened 29 days ago Closed 18 days ago

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

Categories

(Core :: Layout, 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 64015 into mozilla-central (this bug is closed when the sync is complete).

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

Claudio Saavedra <csaavedra@igalia.com> wrote:

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

WebKit export from bug: [WPE][arm64] imported/w3c/web-platform-tests/css/css-box/margin-trim/block-container-block-in-inline-001.html and block-container-block-in-inline-006.html time out (crashes already expected)

<pre>
[margin-trim] Block-start margin of a block nested in an inline box is trimmed when the block is not at the block-start edge

layoutBlockChildFromInlineLayout sets LayoutState::marginTrimBlockStart
for every block nested in an inline box when the container has
margin-trim: block-start and can collapse margins with its children,
without checking that the block is still at the block-start edge. The
inline formatting context clears atBeforeSideOfBlock in the margin state
once a line with content or a block with content has been placed, so a
later block arrives with the flag set while MarginInfo says it is no
longer at the edge, and marginValuesForChild discards its block-start
margin. A self-collapsing block in that position loses both margins.

With assertions enabled this hits ASSERT_IMPLIES(marginTrimBlockStart(),
atBeforeSideOfBlock()) in collapseMarginsWithChildInfo, which is why
css-box/margin-trim/block-container-block-in-inline-001.html and -006.html
are gardened as crashes: the margins those two tests misplace happen to
be zero or to be trimmed by the block-end edge anyway, so builds without
assertions render them correctly.

Require canCollapseWithMarginBefore instead, which also checks
atBeforeSideOfBlock, matching layoutBlockChildren where the flag is only
seeded at the block-start edge and cleared by layoutBlockChild after the
first child with content.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=323050">https://bugs.webkit.org/show_bug.cgi?id=323050</a>
</pre>

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 111 tests

Status Summary

Firefox

OK : 39
PASS: 1[GitHub] 64[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 98[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 99[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]
FAIL: 2[GitHub] 77[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 114[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] 115[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

PASS: 3

Safari

FAIL: 3

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.