Closed Bug 2083717 Opened 1 month ago Closed 24 days ago

[wpt-sync] Sync PR 63862 - [initial-letter] Fix block position for non-integer size above sink

Categories

(Core :: Layout: Block and Inline, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

ChangSeok Oh <changseok@chromium.org> wrote:

[initial-letter] Fix block position for non-integer size above sink

When an initial letter's size is greater than or equal to its sink,
css-inline-3 under-aligns it: its baseline sits on the sink-th line's
baseline. Blink placed the baseline size lines below the first line
but shifted the surrounding text by ceil(size) - sink whole lines, so a
non-integer size left the letter too high, e.g. 0.49 line above the
second line's baseline for initial-letter: 2.51 2.

Shift the text by the specified size minus the sink instead. This keeps
the letter's top in place and puts its baseline on the sink-th line. In
vertical writing modes, center the letter across the specified size
rather than its ceiling, which also applies when the size is less than
the sink. Integer sizes do not change. Both are guarded by the
InitialLetterBlockPositioning flag.

Tests:

  • external/wpt/css/css-inline/initial-letter/initial-letter-block-position-fractional-size.html (new)
  • external/wpt/css/css-inline/initial-letter/initial-letter-block-position-fractional-size-vrl.html (new)
  • external/wpt/css/css-inline/initial-letter/initial-letter-block-position-fractional-size-vlr.html (new)

Bug: 573256240
Change-Id: Ica6e89890ed024f3a64a663faec42a1443a01f78
Reviewed-on: https://chromium-review.googlesource.com/8602966
WPT-Export-Revision: 94f8bea4c218e2e40b1eb63f712381bcc9ce1dc7

Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core

CI Results

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

Total 71 tests

Status Summary

Firefox

OK : 4
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 26[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 27[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-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 3[GitHub] 8[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 73[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-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

FAIL: 3

Safari

FAIL: 3

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

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