gecko-dev/intl/unicharutil/util
Ting-Yu Lin 653f4b3694 Bug 1745113 Part 5 - Make grapheme cluster break iterators implement SegmentIteratorUtf16, and adapt the callers. r=necko-reviewers,jfkthame,kershaw
This is the main patch for the bug. It aims to change the grapheme cluster
break's `Next()` API by implementing SegmentIteratorUtf16 interface, and adapt
the callers. It shouldn't change the behavior.

While rewriting the caller, one caveat worth mentioning is the loop termination
condition. If the old code relies on `!AtEnd()` as the loop termination
condition, and it advances the iterator at the end of the loop, it meant
to *skip* its logic when the break position is at the end of the string. For
example, see the `mozTXTToHTMLConv::NumberOfMatches`.

This patch also hooks grapheme cluster break iterator into
Segmenter::TryCreate() interface.

Existing test coverage for the file changed:
- netwerk/test/unit/test_mozTXTToHTMLConv.js
- layout/reftests/forms/input/file/dynamic-max-width.html

Differential Revision: https://phabricator.services.mozilla.com/D135643
2022-01-13 18:36:04 +00:00
..
GreekCasing.cpp
GreekCasing.h
ICUUtils.cpp Bug 1734932 - Use NumberParser for ParseNumber; r=platform-i18n-reviewers,gregtatum 2021-12-09 15:26:20 +00:00
ICUUtils.h Bug 1719548 - Part 2: Unify nsIDNService with IDNA. r=necko-reviewers,platform-i18n-reviewers,dragana,gregtatum 2021-12-08 11:07:41 +00:00
IrishCasing.cpp
IrishCasing.h
base_chars.py
is_combining_diacritic.py Bug 1726570 - Fix lint failures. a-lint-fix. CLOSED TREE 2021-08-23 17:51:07 +03:00
moz.build Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum 2021-12-06 18:15:50 +00:00
nsBidiUtils.cpp
nsBidiUtils.h Bug 1719554 - Unify nsCharType as intl::BidiClass; r=platform-i18n-reviewers,jfkthame,gregtatum 2021-12-06 18:15:49 +00:00
nsSpecialCasingData.cpp Bug 1738422 - Part 4: Update Gecko to Unicode 14. r=platform-i18n-reviewers,dminor 2021-11-16 17:02:54 +00:00
nsSpecialCasingData.h
nsUnicharUtils.cpp Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi 2021-12-13 21:47:56 +00:00
nsUnicharUtils.h Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi 2021-12-13 21:47:56 +00:00
nsUnicodeProperties.cpp Bug 1745113 Part 5 - Make grapheme cluster break iterators implement SegmentIteratorUtf16, and adapt the callers. r=necko-reviewers,jfkthame,kershaw 2022-01-13 18:36:04 +00:00
nsUnicodeProperties.h Bug 1745113 Part 3 - Change CountGraphemeClusters() to take a Span parameter. r=jfkthame 2022-01-13 18:36:04 +00:00
nsUnicodePropertyData.cpp Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum 2021-12-06 18:15:50 +00:00