[wpt-sync] Sync PR 64611 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=319831
Categories
(Core :: Layout: Text and Fonts, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64611 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64611
Details from upstream follow.
Tim Nguyen <ntim@apple.com> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=319831
WebKit export from bug: [<!---->white-<!---->space-<!---->trim]<!----> Add to white-<!---->space shorthand syntax
<pre>
[white-space-trim] Add to white-space shorthand syntax(This is based on Tim Nguyen initial PR)
The syntax for the white-space shorthand is:
normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'>
See: <a href="https://drafts.csswg.org/css-text-4/#white-space-property">https://drafts.csswg.org/css-text-4/#white-space-property</a>
Add 'white-space-trim' as the third longhand of the 'white-space' shorthand. The
legacy single-keyword forms (normal / pre / pre-wrap / pre-line) map to
'white-space-trim: none' per the normative table in the spec, so they never combine
with a discard-* keyword. Serialization -- both of a declaration block
(ShorthandSerializer) and of the computed value (Style::Extractor) -- only collapses
to those legacy keywords when 'white-space-trim' is 'none'; otherwise it appends the
trim value and omits the other two longhands when they hold their initial value.'white-space-trim' is gated on the CSSWhiteSpaceTrimEnabled setting while
'white-space' is not, so the shorthand parser gates only the consumption of the
discard-* keywords and always sets the 'white-space-trim' longhand. That keeps the
shorthand round-tripping when the setting is off, and matches how 'font' and
'font-variant' handle the settings-gated 'font-variant-emoji' longhand.Editing copies 'white-space-trim' alongside the other two longhands. All three have
to travel together: a partial longhand set makes the 'white-space' shorthand
unserializable, so editing would start emitting 'white-space-collapse' /
'text-wrap-mode' where it used to emit 'white-space'. It is therefore listed with the
inheritable editing properties even though it is not an inherited property -- if only
the context style carries it, the white-space longhands never compare equal to the
context and editing wraps content in redundant spans. The context comparison in
removeStyleInContextNotOverridenByMatchedRules also compares values rather than
CSSValue identity, since 'white-space-trim' serializes to a list for any value other
than 'none'.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=319831">https://bugs.webkit.org/show_bug.cgi?id=319831</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318486@main">https://commits.webkit.org/318486@main</a>
</pre>
| Assignee | ||
Updated•18 days ago
|
| Assignee | ||
Updated•18 days ago
|
| Assignee | ||
Updated•17 days ago
|
| Assignee | ||
Comment 1•17 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=119860
| Assignee | ||
Comment 2•17 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 96 subtests
Status Summary
Firefox
OK : 1
PASS: 52
FAIL: 44
Chrome
OK : 1
PASS: 52
FAIL: 44
Safari
OK : 1
PASS: 96
Links
Details
New Tests That Don't Pass
- /css/css-text/parsing/white-space-shorthand.html [wpt.fyi]
- e.style['white-space'] = "discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-after" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-after':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-inner" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-inner':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "collapse wrap discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'collapse wrap discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "wrap collapse discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'wrap collapse discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-before collapse wrap" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-before collapse wrap':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "preserve discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'preserve discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-before preserve" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-before preserve':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "nowrap discard-after" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'nowrap discard-after':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-after nowrap" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-after nowrap':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "preserve nowrap discard-inner" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'preserve nowrap discard-inner':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-inner nowrap preserve" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-inner nowrap preserve':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-inner preserve nowrap" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-inner preserve nowrap':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-after discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-after discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "collapse wrap discard-after discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'collapse wrap discard-after discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-before discard-after discard-inner" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-before discard-after discard-inner':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-inner discard-after discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-inner discard-after discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-after discard-inner discard-before" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-after discard-inner discard-before':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "collapse wrap discard-before discard-after discard-inner" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'collapse wrap discard-before discard-after discard-inner':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-inner discard-before discard-after collapse wrap" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-inner discard-before discard-after collapse wrap':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "preserve nowrap discard-inner discard-before discard-after" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'preserve nowrap discard-inner discard-before discard-after':
FAIL(Chrome:FAIL, Safari:PASS) - e.style['white-space'] = "discard-after discard-inner discard-before preserve nowrap" should set the property value:
FAIL(Chrome:FAIL, Safari:PASS) - Property white-space value 'discard-after discard-inner discard-before preserve nowrap':
FAIL(Chrome:FAIL, Safari:PASS)
- e.style['white-space'] = "discard-before" should set the property value:
Comment 4•13 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/959340aa599d
https://hg.mozilla.org/mozilla-central/rev/1240b95d2fb9
Description
•