Closed Bug 1803554 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 37277 - [initial-letter] Use baseline alignment for drop, raise, sunken initail

Categories

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

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Yoshifuim Inoue <yosin@chromium.org> wrote:

[initial-letter] Use baseline alignment for drop, raise, sunken initail

This patch changes ComputeInitialLetterBoxBlockOffset() to use
baseline alignment instead of line-under alignment when initial-letter
size >= sink, e.g. initial-letter: 3 drop, initial-letter: 3 raise,
initial-letter: 3 2 to match the spec[1][2].

This patch also introduces new test:
initial-letter-text-decoration-underline.html
for verifying baseline alignment and underline for the open issue
887[5].

Detals

The spec says[2]:

If its size is greater than or equal to its sink, the initial letter is
positioned to satisfy its under alignment, and then shifted by
--------------------------^^^^^^^^^^^^^^^
(sink - 1) × line-height of containing block towards the containing block’s
block end.

The spec says[3]:

This property specifies the alignment points used to size and position an
initial letter. Two sets of alignment points are necessary:
the over and under alignment points of the initial letter are matched to
-------------^^^^^^^^^^^^^^^
corresponding over and under points of the root inline box.

Before this patch, Blink uses "line-under"[4], the link is pointed to.
After this patch, Blink uses "baseline" as
initial-letter-align: alphabetic[1].

[1] https://drafts.csswg.org/css-inline-3/#valdef-initial-letter-align-alphabetic
[2] https://drafts.csswg.org/css-inline-3/#initial-letter-block-position
[3] https://drafts.csswg.org/css-inline-3/#aligning-initial-letter
[4] https://drafts.csswg.org/css-writing-modes-4/#under
[5] https://github.com/w3c/csswg-drafts/issues/887

Bug: 1276900
Change-Id: I99e0b535f13350856187a5d2af8136c7eef78f80

Reviewed-on: https://chromium-review.googlesource.com/4067085
WPT-Export-Revision: 7950ca2f4b7ff9508e87ff94865c504de7fd1b38

PR 37277 applied with additional changes from upstream: 8df27593f31ab6ec762f7359ede2f8f4f836ea04, f02c2f1a673ef64d1eda5c8c0acbc473c9fdce66, 365f5170cecadc56c6b5ed8cb38e2da09e9afcaf
Component: web-platform-tests → Layout: Block and Inline
Product: Testing → Core

CI Results

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

Total 36 tests

Status Summary

Firefox

FAIL: 36

Chrome

FAIL: 36

Safari

FAIL: 36

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fa33e0c2d269 [wpt PR 37277] - [initial-letter] Use baseline alignment for drop, raise, sunken initial, a=testonly https://hg.mozilla.org/integration/autoland/rev/079bf65fa18c [wpt PR 37277] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.