Closed Bug 2092479 Opened 22 days ago Closed 16 days ago

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

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 64598 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64598
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>

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

CI Results

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

Total 93 tests and 3 subtests

Status Summary

Firefox

OK : 1[GitHub] 92[Gecko-linux2404-64-debug] 93[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-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 606
FAIL: 19[GitHub] 197[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]

Chrome

OK : 1
FAIL: 19

Safari

OK : 1
PASS: 19

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-text/parsing/hanging-punctuation-valid.html [wpt.fyi]
    • e.style['hanging-punctuation'] = "none" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "force-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "allow-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "last" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first force-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first last" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "allow-end first" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "force-end last" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "last first" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "last allow-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first allow-end last" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first last force-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "force-end first last" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "allow-end last first" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "last first force-end" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "last allow-end first" should set the property value: FAIL
    • e.style['hanging-punctuation'] = "first allow-end" should set the property value: FAIL
  • /css/css-text/parsing/hyphenate-limit-lines-computed.html [wpt.fyi]
    • Property hyphenate-limit-lines value 'no-limit': FAIL
    • Property hyphenate-limit-lines value '0': FAIL
    • Property hyphenate-limit-lines value '4': FAIL
    • Property hyphenate-limit-lines value 'calc(2 + 2)': FAIL
    • Property hyphenate-limit-lines value 'calc(4.1)': FAIL
  • /css/css-text/parsing/hyphenate-limit-lines-valid.html [wpt.fyi]
    • e.style['hyphenate-limit-lines'] = "no-limit" should set the property value: FAIL
    • e.style['hyphenate-limit-lines'] = "0" should set the property value: FAIL
    • e.style['hyphenate-limit-lines'] = "4" should set the property value: FAIL
  • /css/css-text/parsing/text-align-all-valid.html [wpt.fyi]
    • e.style['text-align-all'] = "start" should set the property value: FAIL
    • e.style['text-align-all'] = "end" should set the property value: FAIL
    • e.style['text-align-all'] = "left" should set the property value: FAIL
    • e.style['text-align-all'] = "right" should set the property value: FAIL
    • e.style['text-align-all'] = "center" should set the property value: FAIL
    • e.style['text-align-all'] = "justify" should set the property value: FAIL
    • e.style['text-align-all'] = "match-parent" should set the property value: FAIL
  • /css/css-text/parsing/text-align-last-computed.html [wpt.fyi]
    • Property text-align-last value 'match-parent': FAIL
  • /css/css-text/parsing/text-align-last-valid.html [wpt.fyi]
    • e.style['text-align-last'] = "match-parent" should set the property value: FAIL
  • /css/css-text/parsing/text-align-valid.html [wpt.fyi]
    • e.style['text-align'] = "justify-all" should set the property value: FAIL
  • /css/css-text/parsing/text-autospace-computed.html [wpt.fyi]
    • Property text-autospace value 'initial': FAIL
    • Property text-autospace value 'punctuation': FAIL
    • Property text-autospace value 'punctuation ideograph-alpha': FAIL
    • Property text-autospace value 'punctuation ideograph-alpha ideograph-numeric': FAIL
    • Property text-autospace value 'punctuation insert': FAIL
    • Property text-autospace value 'punctuation ideograph-alpha insert': FAIL
    • Property text-autospace value 'insert punctuation': FAIL
    • Property text-autospace value 'insert punctuation ideograph-alpha': FAIL
    • Property text-autospace value 'insert punctuation ideograph-alpha ideograph-numeric': FAIL
    • Property text-autospace value 'ideograph-alpha replace': FAIL
    • Property text-autospace value 'ideograph-numeric replace': FAIL
    • Property text-autospace value 'ideograph-alpha ideograph-numeric replace': FAIL
    • Property text-autospace value 'punctuation replace': FAIL
    • Property text-autospace value 'punctuation ideograph-alpha replace': FAIL
    • Property text-autospace value 'replace ideograph-alpha': FAIL
    • Property text-autospace value 'replace ideograph-numeric': FAIL
    • Property text-autospace value 'replace ideograph-alpha ideograph-numeric': FAIL
    • Property text-autospace value 'replace punctuation': FAIL
    • Property text-autospace value 'replace punctuation ideograph-alpha': FAIL
    • Property text-autospace value 'replace punctuation ideograph-alpha ideograph-numeric': FAIL
  • /css/css-text/parsing/text-autospace-valid.html [wpt.fyi]
    • e.style['text-autospace'] = "punctuation" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation ideograph-alpha" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation ideograph-alpha ideograph-numeric" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation insert" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation ideograph-alpha insert" should set the property value: FAIL
    • e.style['text-autospace'] = "insert punctuation" should set the property value: FAIL
    • e.style['text-autospace'] = "insert punctuation ideograph-alpha" should set the property value: FAIL
    • e.style['text-autospace'] = "insert punctuation ideograph-alpha ideograph-numeric" should set the property value: FAIL
    • e.style['text-autospace'] = "ideograph-alpha replace" should set the property value: FAIL
    • e.style['text-autospace'] = "ideograph-numeric replace" should set the property value: FAIL
    • e.style['text-autospace'] = "ideograph-alpha ideograph-numeric replace" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation replace" should set the property value: FAIL
    • e.style['text-autospace'] = "punctuation ideograph-alpha replace" should set the property value: FAIL
    • e.style['text-autospace'] = "replace ideograph-alpha" should set the property value: FAIL
    • e.style['text-autospace'] = "replace ideograph-numeric" should set the property value: FAIL
    • e.style['text-autospace'] = "replace ideograph-alpha ideograph-numeric" should set the property value: FAIL
    • e.style['text-autospace'] = "replace punctuation" should set the property value: FAIL
    • e.style['text-autospace'] = "replace punctuation ideograph-alpha" should set the property value: FAIL
    • e.style['text-autospace'] = "replace punctuation ideograph-alpha ideograph-numeric" should set the property value: FAIL
  • /css/css-text/parsing/text-fit-computed.html [wpt.fyi]
    • Property text-fit value 'none': FAIL
    • Property text-fit value 'grow': FAIL
    • Property text-fit value 'shrink': FAIL
    • Property text-fit value 'grow consistent': FAIL
    • Property text-fit value 'grow per-line': FAIL
    • Property text-fit value 'grow per-line-all': FAIL
    • Property text-fit value 'grow per-line 200%': FAIL
    • Property text-fit value 'grow consistent 300%': FAIL
    • Property text-fit value 'shrink per-line 40%': FAIL
    • Property text-fit value 'shrink consistent 20%': FAIL
  • /css/css-text/parsing/text-fit-valid.html [wpt.fyi]
    • e.style['text-fit'] = "none" should set the property value: FAIL
    • e.style['text-fit'] = "grow" should set the property value: FAIL
    • e.style['text-fit'] = "shrink" should set the property value: FAIL
    • e.style['text-fit'] = "grow consistent" should set the property value: FAIL
    • e.style['text-fit'] = "grow per-line" should set the property value: FAIL
    • e.style['text-fit'] = "grow per-line-all" should set the property value: FAIL
    • e.style['text-fit'] = "grow per-line 132%" should set the property value: FAIL
    • e.style['text-fit'] = "grow consistent 300%" should set the property value: FAIL
    • e.style['text-fit'] = "shrink per-line 4%" should set the property value: FAIL
    • e.style['text-fit'] = "shrink consistent 50%" should set the property value: FAIL
  • /css/css-text/parsing/text-group-align-valid.html [wpt.fyi]
    • e.style['text-group-align'] = "none" should set the property value: FAIL
    • e.style['text-group-align'] = "start" should set the property value: FAIL
    • e.style['text-group-align'] = "end" should set the property value: FAIL
    • e.style['text-group-align'] = "left" should set the property value: FAIL
    • e.style['text-group-align'] = "right" should set the property value: FAIL
    • e.style['text-group-align'] = "center" should set the property value: FAIL
    • e.style['text-group-align'] = "initial" should set the property value: FAIL
    • e.style['text-group-align'] = "inherit" should set the property value: FAIL
    • e.style['text-group-align'] = "unset" should set the property value: FAIL
    • e.style['text-group-align'] = "revert" should set the property value: FAIL
    • e.style['text-group-align'] = "revert-layer" should set the property value: FAIL
  • /css/css-text/parsing/text-spacing-computed.html [wpt.fyi]
    • Property text-spacing value 'initial': FAIL
    • Property text-spacing value 'normal': FAIL
    • Property text-spacing value 'none': FAIL
    • Property text-spacing value 'auto': FAIL
    • Property text-spacing value 'no-autospace': FAIL
    • Property text-spacing value 'trim-start': FAIL
    • Property text-spacing value 'space-all': FAIL
    • Property text-spacing value 'normal normal': FAIL
    • Property text-spacing value 'normal trim-start': FAIL
    • Property text-spacing value 'no-autospace normal': FAIL
    • Property text-spacing value 'no-autospace space-all': FAIL
    • Property text-spacing value 'no-autospace trim-start': FAIL
    • Property text-spacing value 'trim-start normal ': FAIL
    • Property text-spacing value 'normal no-autospace': FAIL
    • Property text-spacing value 'space-all no-autospace': FAIL
    • Property text-spacing value 'trim-start no-autospace': FAIL
  • /css/css-text/parsing/text-spacing-trim-computed.html [wpt.fyi]: OK [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-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-linux2404-64-debug]
    • Property text-spacing-trim value 'auto': FAIL
    • Property text-spacing-trim value 'normal': FAIL
    • Property text-spacing-trim value 'space-all': FAIL
    • Property text-spacing-trim value 'trim-both': FAIL
    • Property text-spacing-trim value 'trim-all': FAIL
    • Property text-spacing-trim value 'trim-start': FAIL
    • Property text-spacing-trim value 'space-first': FAIL
  • /css/css-text/parsing/text-spacing-trim-valid.html [wpt.fyi]
    • e.style['text-spacing-trim'] = "normal" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "auto" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "space-all" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "trim-both" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "trim-all" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "trim-start" should set the property value: FAIL
    • e.style['text-spacing-trim'] = "space-first" should set the property value: FAIL
  • /css/css-text/parsing/text-spacing-valid.html [wpt.fyi]
    • e.style['text-spacing'] = "normal" should set the property value: FAIL
    • e.style['text-spacing'] = "none" should set the property value: FAIL
    • e.style['text-spacing'] = "auto" should set the property value: FAIL
    • e.style['text-spacing'] = "no-autospace" should set the property value: FAIL
    • e.style['text-spacing'] = "trim-start" should set the property value: FAIL
    • e.style['text-spacing'] = "space-all" should set the property value: FAIL
    • e.style['text-spacing'] = "normal normal" should set the property value: FAIL
    • e.style['text-spacing'] = "normal trim-start" should set the property value: FAIL
    • e.style['text-spacing'] = "no-autospace normal" should set the property value: FAIL
    • e.style['text-spacing'] = "no-autospace space-all" should set the property value: FAIL
    • e.style['text-spacing'] = "no-autospace trim-start" should set the property value: FAIL
    • e.style['text-spacing'] = "trim-start normal " should set the property value: FAIL
    • e.style['text-spacing'] = "normal no-autospace" should set the property value: FAIL
    • e.style['text-spacing'] = "space-all no-autospace" should set the property value: FAIL
    • e.style['text-spacing'] = "trim-start no-autospace" should set the property value: FAIL
  • /css/css-text/parsing/text-wrap-pretty.html [wpt.fyi]
    • e.style['text-wrap'] = "pretty" should set the property value: FAIL
    • e.style['text-wrap'] = "wrap pretty" should set the property value: FAIL
    • e.style['text-wrap'] = "pretty wrap" should set the property value: FAIL
    • e.style['text-wrap'] = "nowrap pretty" should set the property value: FAIL
    • e.style['text-wrap'] = "pretty nowrap" should set the property value: FAIL
    • e.style['text-wrap-style'] = "pretty" should set the property value: FAIL
    • Property text-wrap value 'pretty': FAIL
    • Property text-wrap value 'wrap pretty': FAIL
    • Property text-wrap value 'pretty wrap': FAIL
    • Property text-wrap value 'nowrap pretty': FAIL
    • Property text-wrap value 'pretty nowrap': FAIL
    • Property text-wrap-style value 'pretty': FAIL
  • /css/css-text/parsing/white-space-shorthand-longhands.html [wpt.fyi]
    • white-space: normal: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: pre: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: pre-wrap: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: pre-line: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: nowrap: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: break-spaces: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: collapse: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: preserve: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: preserve-breaks: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: wrap: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: discard-before: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: discard-after: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: discard-inner: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: preserve nowrap discard-inner: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: discard-before discard-after: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: discard-inner discard-after discard-before: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space: collapse wrap discard-before discard-after discard-inner: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space should overwrite a previously set white-space-trim: FAIL (Chrome: FAIL, Safari: PASS)
    • white-space-trim set after white-space should not be overwritten: FAIL (Chrome: FAIL, Safari: PASS)
  • /css/css-text/parsing/word-break-computed.html [wpt.fyi]
    • Property word-break value 'auto-phrase': FAIL
  • /css/css-text/parsing/word-break-valid.html [wpt.fyi]
    • e.style['word-break'] = "manual" should set the property value: FAIL
    • e.style['word-break'] = "auto-phrase" should set the property value: FAIL
  • /css/css-text/parsing/word-space-transform-computed.html [wpt.fyi]
    • Property word-space-transform value 'none': FAIL
    • Property word-space-transform value 'space': FAIL
    • Property word-space-transform value 'ideographic-space': FAIL
    • Property word-space-transform value 'space auto-phrase': FAIL
    • Property word-space-transform value 'ideographic-space auto-phrase': FAIL
  • /css/css-text/parsing/word-space-transform-valid.html [wpt.fyi]
    • e.style['word-space-transform'] = "none" should set the property value: FAIL
    • e.style['word-space-transform'] = "space" should set the property value: FAIL
    • e.style['word-space-transform'] = "ideographic-space" should set the property value: FAIL
    • e.style['word-space-transform'] = "space auto-phrase" should set the property value: FAIL
    • e.style['word-space-transform'] = "ideographic-space auto-phrase" should set the property value: FAIL
    • e.style['word-space-transform'] = "auto-phrase space" should set the property value: FAIL
    • e.style['word-space-transform'] = "auto-phrase ideographic-space" should set the property value: FAIL

Tests Disabled in Gecko Infrastructure

  • /css/css-text/parsing/text-spacing-trim-computed.html [wpt.fyi]: OK [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-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt], SKIP [Gecko-linux2404-64-debug]
Status: NEW → RESOLVED
Closed: 16 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.