Closed Bug 1879545 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 44498 - New implementation for finding ::first-letter text

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rune Lillesveen <futhark@chromium.org> wrote:

New implementation for finding ::first-letter text

The old implementation was not able to fully traverse an inline box
tree to find the first text node. One of the cases it gave up and
returned nullptr caused the crash issue 41492455.

Drilling down the block-level descendants is now separated from
traversing the inline boxes for the first line, which should be
simpler to understand.

The inline box traversal is now able to move back up through inline
box ancestry where the previous implementation just gave up.

The implementation now supports punctuation and the actual first
letter character being spread across multiple text nodes. The
implementation keeps track of consecutive punctuation that is not
separated by spaces where the old implementation would just ignore
punctuation in one text node and allow a first letter character from
another to be rendered as the ::first-letter even if there was a space
in between.

Block level grid, flex, and table are no longer allowing a rendered
::first-letter in a succeeding sibling block.

Bug: 41492455, 41095963, 40646708
Change-Id: I0de207d5ae6e0bfc2c4d7cf4b72ebfbfdd919fde

Reviewed-on: https://chromium-review.googlesource.com/5263419
WPT-Export-Revision: a043ef580b669e5c3844a5c445618bdb12173602

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core
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 3 tests

Status Summary

Firefox

OK : 1
PASS : 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 14[Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows11-32-2009-qr-debug, Gecko-windows11-32-2009-qr-opt, Gecko-windows11-64-2009-qr-debug, Gecko-windows11-64-2009-qr-opt, GitHub]

Chrome

OK : 1
PASS : 9
CRASH: 1
FAIL : 4

Safari

OK : 1
PASS : 10
FAIL : 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5b41d8a9b1d2 [wpt PR 44498] - New implementation for finding ::first-letter text, a=testonly https://hg.mozilla.org/integration/autoland/rev/ceeeb7fa5579 [wpt PR 44498] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.