Closed Bug 2091517 Opened 7 days ago Closed 2 days ago

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

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: [<!---->CSS]<!----> Support the white-<!---->space-<!---->trim property (<!---->discard-<!---->before /<!----> discard-<!---->after)<!---->

<pre>
[CSS] Support the white-space-trim property (discard-before / discard-after)

Implement the 'discard-before' and 'discard-after' values of the CSS Text 4
'white-space-trim' property (<a href="https://drafts.csswg.org/css-text-4/#white-space-trim)">https://drafts.csswg.org/css-text-4/#white-space-trim)</a>
in the modern inline layout path, behind the CSSWhiteSpaceTrimEnabled setting
(off by default).

'discard-before' / 'discard-after' remove the collapsible white space
immediately before the start / after the end of an element. We do this at
inline-item building time: InlineItemsBuilder::adjustInlineItemsForWhiteSpaceTrim
discards the corresponding InlineTextItems in a single forward pass before line
building, bidi resolution and intrinsic sizing run, so the removed white space
is kept out of every downstream computation (rendering, soft-wrap opportunities
and min/max-content) at once. The property applies to inline boxes and block
containers, so an inline box or a non-replaced inline-block carries it. Inline
box boundaries -- and floats / out-of-flow boxes -- are transparent to this
adjacency, matching white space collapsing, while other atomic inlines, replaced
content, iframes and block-in-inline boxes are real content that ends it.

Because the property changes which inline items are generated, a value change
invalidates the cached inline item list (InlineInvalidation) and requires layout
(StyleDifference). Since the discard depends on cross-box adjacency that a
partial rebuild starting mid-content cannot resolve, the inline formatting
context re-collects all inline items whenever the content carries
white-space-trim rather than doing an incremental rebuild.

'discard-inner' parses and computes to a value but has no layout effect yet.

This includes the header fix from <a href="https://commits.webkit.org/325401@main.">https://commits.webkit.org/325401@main.</a>

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

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

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

Total 571 tests

Status Summary

Firefox

OK : 4[GitHub] 125[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: 4[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 12[GitHub] 1020[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1389[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 1391[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-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 37[GitHub] 210[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 281[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-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 283[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]

Chrome

OK : 4
PASS: 12
FAIL: 37

Safari

OK : 4
PASS: 49

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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