mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
653f4b3694
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 |
||
---|---|---|
.. | ||
moz.build | ||
TestBreak.cpp | ||
TestSegmenter.cpp |