Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3e27303e85c71c62f0685dceecafea5c657a126e
https://github.com/WebKit/WebKit/commit/3e27303e85c71c62f0685dceecafea5c657a126e
Author: Sergey Rubanov <[email protected]>
Date: 2026-09-29 (Tue, 29 Sep 2026)
Changed paths:
A JSTests/stress/intl-segmenter-containing-surrogate.js
M Source/JavaScriptCore/runtime/IntlSegments.cpp
Log Message:
-----------
[JSC] Intl.Segmenter containing() should stay on a supplementary boundary
https://bugs.webkit.org/show_bug.cgi?id=324036
Reviewed by Yusuke Suzuki.
containing(n) asked ICU for the boundary before n + 1. When n is the lead
surrogate of a segment, n + 1 is the trail, and ubrk_preceding steps back
to the previous segment.
ubrk_following snaps a trail surrogate to its lead and then moves to the
next boundary. ubrk_previous is the start of that segment. The iterator
steps forward again so isWordLike still reads the end boundary's rule status.
* JSTests/stress/intl-segmenter-containing-surrogate.js: Added.
* Source/JavaScriptCore/runtime/IntlSegments.cpp:
(JSC::IntlSegments::containing):
Canonical link: https://commits.webkit.org/322218@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications