[wpt-sync] Sync PR 64448 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=313316
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64448 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64448
Details from upstream follow.
Alan Baradlay <zalan@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=313316
WebKit export from bug: Float with margin-<!---->start overlaps adjacent float
<pre>
Float with margin-start overlaps adjacent floatWhen a float has a non-zero start margin, FloatAvoider::inlineEnd() computes the wrong margin box edge.
Inline start's initial value is the border box start. In order to expand it to the margin box
we do inlineStart -= marginStart (correct). However when we compute inline end as
'inlineStart + borderBoxWidth + marginEnd' the start margin is gone now (incorrect).For example, a left float with margin-left: 50px and width: 30px should have a
margin box spanning 0..80. But inlineEnd() returned 30 instead of 80 because it
went from margin-box-left (0) + border-box-width (30) + margin-end (0) = 30,
missing the 50px start margin.This caused findAvailablePosition to think the float was much narrower than it
actually is, so it would not push the float below an adjacent float when the
margin box did not fit.The fix is to use inlineStart() + marginBoxWidth() for floats, which correctly accounts for all margins.
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=313316">https://bugs.webkit.org/show_bug.cgi?id=313316</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/312083@main">https://commits.webkit.org/312083@main</a>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
</pre>
| Assignee | ||
Updated•13 days ago
|
| Assignee | ||
Updated•8 days ago
|
| Assignee | ||
Updated•8 days ago
|
| Assignee | ||
Comment 1•8 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=116941
| Assignee | ||
Comment 2•8 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 157 tests
Status Summary
Firefox
OK : 17
PASS: 9[GitHub] 20[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 116[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 225[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: 11
Chrome
PASS: 9
Safari
PASS: 9
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/CSS2/floats/float-root.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-rule3-outside-left-002.xht [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-rule3-outside-right-002.xht [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-rule7-outside-left-001.xht [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-rule7-outside-right-001.xht [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-wrap-bfc-with-margin-001a.tentative.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-wrap-bfc-with-margin-006.tentative.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-wrap-bfc-with-margin-007.tentative.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-wrap-bfc-with-margin-008.tentative.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-wrap-bfc-with-margin-009.tentative.html [wpt.fyi]:
FAIL - /css/CSS2/floats/floats-zero-height-wrap-002.xht [wpt.fyi]:
FAIL
Comment 4•4 days ago
|
||
| bugherder | ||
Comment 5•4 days ago
|
||
| bugherder | ||
Description
•