Closed Bug 2092942 Opened 16 days ago Closed 12 days ago

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

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: [<!---->css-<!---->text-<!---->decor-<!---->4]<!----> Add support for text-<!---->decoration-<!---->inset

<pre>
[css-text-decor-4] Implement the text-decoration-inset property

Add the CSS Text Decoration Level 4 'text-decoration-inset' property
(auto | <length>{1,2}), gated behind the cssTextDecorationInsetEnabled setting.

The property adjusts the start and end endpoints of the line decorations drawn by
a decorating box (underline, overline, line-through). A positive <length> moves
an endpoint inward, trimming the decoration; a negative <length> moves it outward,
extending it. A single value applies to both endpoints; two values are the start
and the end. 'auto' lets the UA choose an inset so that two adjacent identical
underlined elements do not appear to share a single continuous underline (e.g.
for Chinese, where underlining is a form of punctuation); it is distinct from 0.

  1. It is stored as a new Style::TextDecorationInset value type (a keyword-or-length-
    pair) in NonInheritedRareData, parsed grammar-driven, and animated by computed
    value.
  2. The inset is applied at paint time in TextBoxPainter, which shifts the
    decoration's inline origin and shrinks/grows its length (because text-decoration-
    inset and box-decoration-break are not inherited, a decoration that propagates
    from an ancestor box down to the (root inline) box that paints it)
  3. box-decoration-break is then honored via the inline box's closed edges: with 'slice' the start
    inset only affects the first fragment's start edge and the end inset the last
    fragment's end edge; with 'clone' both edges of every fragment are inset.
  4. Endpoints are also gated on the marked-text piece that actually reaches the box's
    logical start/end, so a decoration split into several marked texts (selection,
    document markers, highlights) stays continuous instead of being trimmed at the
    interior boundaries.
  5. Because a negative inset extends the decoration past the text
    box, decoration ink overflow is expanded by the outward amount, and StyleDifference
    treats an inset change as affecting repaint and visual overflow so dynamic/animated
    changes invalidate correctly.

Horizontal and vertical writing modes (including sideways-rl/lr and orthogonal
blocks), in both inline directions, are supported, as is the text-decoration-skip-
ink interaction (its skip gaps are measured against the underline's bounding box,
which already tracks the inset-shifted origin, so they stay aligned to the glyphs).
Across a bidi direction boundary the decoration is painted one segment per run; the
component of the inset that shifts the decoration as a whole is applied to every
segment (so the seam between runs moves with it rather than being pinned), while the
extend/trim overhang is applied only at the segment reaching the decoration's visual
start/end.

This includes the references and spec links from <a href="https://commits.webkit.org/325582@main.">https://commits.webkit.org/325582@main.</a>

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

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 384 tests

Status Summary

Firefox

OK : 48
PASS: 9[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 10[GitHub] 1374[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1680[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] 1681[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 1682[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 11[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 30[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 31[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]

Chrome

PASS: 9
FAIL: 1

Safari

PASS: 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

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