[wpt-sync] Sync PR 64185 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321236
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 64185 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64185
Details from upstream follow.
Alan Baradlay <zalan@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321236
WebKit export from bug: [<!---->block-<!---->in-<!---->inline]<!----> A block level box'<!---->s margin after is counted twice when only that box needs layout
<pre>
[block-in-inline] A block level box's margin after is counted twice when only that box needs layoutlayoutSimpleBlockContentInInline() is the fast-path taken when a container with inline children needs
layout only because one of its block level boxes does. It walks the block level boxes, lays each one out,
and takes the MarginInfo the last one leaves behind. The lines are not laid out at all.That is fine while the block level box is the only in-flow content, since its margins are then the
container's own. A line next to the box changes that: the line consumes the adjacent margin as its own
spacing, so nothing is left to collapse with the container. Normal line layout accounts for this in
LineBuilder::layoutInlineContent (see updateMarginStateIfNeeded), which does two things once a line places
contentful inline content - it resets the margin values, and it leaves the before side of the block. The
shortcut lays out no lines, so it has to do both itself as the walk passes contentful inline content.<div><span><div style="margin-bottom: 16px">block</div></span>line after</div>reports a 16px margin after on the container once something inside the block changes and this path runs:
the margin is still in MarginInfo when the caller hands it to handleAfterSideOfBlock(), so it is counted a
second time.<div>line before<span><div style="margin-top: 16px">block</div></span></div>reports a 16px margin before for the same reason. Resetting the margin values is not enough here, because
canCollapseWithMarginBefore() reads m_atBeforeSideOfBlock rather than the values, so collapseMargins()
still promotes the block's own margin before into the container's collapsed margin before and the container
is then repositioned by its parent.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=321236">https://bugs.webkit.org/show_bug.cgi?id=321236</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318792@main">https://commits.webkit.org/318792@main</a>
</pre>
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=111574
| Assignee | ||
Comment 2•26 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 817 tests and 2 subtests
Status Summary
Firefox
OK : 2[GitHub] 26[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-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 4[GitHub] 98[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 877[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 879[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] 882[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 26[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 31[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 34[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] 36[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 2
PASS: 4
Safari
OK : 2
PASS: 4
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /css/CSS2/normal-flow/block-replaced-height-002.xht [wpt.fyi]:
FAIL[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],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/CSS2/normal-flow/inline-block-replaced-height-002.xht [wpt.fyi]:
FAIL[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],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/CSS2/normal-flow/inline-replaced-height-002.xht [wpt.fyi]:
FAIL[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],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/CSS2/normal-flow/inlines-017.xht [wpt.fyi]:
FAIL[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],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/CSS2/normal-flow/margin-collapse-through-percentage-height-block-inside-table-cell.html [wpt.fyi]:
FAIL - /css/CSS2/normal-flow/margin-collapse-through-percentage-height-block.html [wpt.fyi]:
FAIL - /css/CSS2/normal-flow/margin-collapse-through-percentage-padding.html [wpt.fyi]:
FAIL - /css/CSS2/normal-flow/max-height-applies-to-012.xht [wpt.fyi]:
FAIL[Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - /css/CSS2/normal-flow/max-width-applies-to-012.xht [wpt.fyi]:
FAIL[Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - /css/CSS2/normal-flow/min-height-applies-to-012.xht [wpt.fyi]:
FAIL[Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - /css/CSS2/normal-flow/min-width-applies-to-012.xht [wpt.fyi]:
FAIL[Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - /css/CSS2/normal-flow/overflow-scroll-paint-order.html [wpt.fyi]:
FAIL[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],PASS[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt] - /css/CSS2/normal-flow/replaced-intrinsic-001.xht [wpt.fyi]:
FAIL - /css/CSS2/normal-flow/replaced-intrinsic-002.xht [wpt.fyi]:
FAIL - /css/CSS2/normal-flow/width-applies-to-012.xht [wpt.fyi]:
FAIL[Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - /css/CSS2/normal-flow/auto-margins-root-element.html [wpt.fyi]
- Root element auto margins resolve:
FAIL
- Root element auto margins resolve:
- /css/CSS2/normal-flow/auto-margins-used-values-with-floats.tentative.html [wpt.fyi]
- .box 1:
FAIL - .box 2:
FAIL[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - .box 3:
FAIL - .box 4:
FAIL - .box 5:
FAIL[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug,Gecko-windows11-64-25h2-opt],PASS[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] - .box 6:
FAIL
- .box 1:
- /css/CSS2/normal-flow/margin-collapse-through-for-various-height-values.tentative.html [wpt.fyi]
- {"height":"1%","parentHeight":"auto"}:
FAIL - {"height":"1%","parentHeight":"0px"}:
FAIL - {"height":"calc(0px + 1%)","parentHeight":"auto"}:
FAIL - {"height":"calc(0px + 1%)","parentHeight":"0px"}:
FAIL - {"height":"calc(1px + 0%)","parentHeight":"auto"}:
FAIL - {"height":"calc(1px + 1%)","parentHeight":"auto"}:
FAIL - {"minHeight":"1%","parentHeight":"auto"}:
FAIL - {"minHeight":"1%","parentHeight":"0px"}:
FAIL - {"minHeight":"calc(0px + 1%)","parentHeight":"auto"}:
FAIL - {"minHeight":"calc(0px + 1%)","parentHeight":"0px"}:
FAIL - {"minHeight":"calc(1px + 0%)","parentHeight":"auto"}:
FAIL - {"minHeight":"calc(1px + 1%)","parentHeight":"auto"}:
FAIL - {"height":"1px","maxHeight":"0px"}:
FAIL - {"height":"1px","maxHeight":"0%","parentHeight":"0px"}:
FAIL - {"height":"1px","maxHeight":"0%","parentHeight":"100px"}:
FAIL - {"height":"1px","maxHeight":"1%","parentHeight":"0px"}:
FAIL - {"height":"1px","maxHeight":"calc(0px + 0%)","parentHeight":"0px"}:
FAIL - {"height":"1px","maxHeight":"calc(0px + 0%)","parentHeight":"100px"}:
FAIL - {"height":"1px","maxHeight":"calc(0px + 1%)","parentHeight":"0px"}:
FAIL
- {"height":"1%","parentHeight":"auto"}:
Comment 4•18 days ago
|
||
| bugherder | ||
Description
•