Closed Bug 2084484 Opened 1 month ago Closed 27 days ago

[wpt-sync] Sync PR 63922 - [initial-letter] Use the computed sink for drop and an omitted 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 63922 into mozilla-central (this bug is closed when the sync is complete).

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

ChangSeok Oh <changseok@chromium.org> wrote:

[initial-letter] Use the computed sink for drop and an omitted sink

Per css-inline-3, drop computes to a sink equal to the initial letter
size floored, and an omitted sink means drop[1]. So 2.51 and
2.51 drop mean 2.51 2: as 2.51 >= 2, the letter is under-aligned
with its baseline on line 2, and the text moves down 0.51 line.
StyleInitialLetter already stores floor(size), but layout ignored it
for these sink types and used ceil(size) instead, so 2.51 rendered
like 2.51 3: top-aligned with no text shift.

Use Sink() for every sink type. Such letters now take the size >= sink
path and are under-aligned on the floored line. A size below 2, e.g.
1.5, floors to 1 and becomes a raised initial. Integer sizes do not
change. The change is guarded by the InitialLetterBlockPositioning
flag.

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-drop

Tests:

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

Bug: 573256240
Change-Id: Ie5a62c70e9187adfa0b0d24faeff36b15f3bab71
Reviewed-on: https://chromium-review.googlesource.com/8615437
WPT-Export-Revision: d9516406c1f5d7101f099681d9563c4f8d4d6106

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 and 8 subtests

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: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.