Bug 1733009 - Remove LineBreaker::Prev(). r=jfkthame,m_kato

Differential Revision: https://phabricator.services.mozilla.com/D128559
This commit is contained in:
Ting-Yu Lin 2021-10-15 18:10:09 +00:00
parent 392266a8fd
commit 717c05c00c
2 changed files with 0 additions and 13 deletions

View File

@ -964,15 +964,6 @@ int32_t LineBreaker::Next(const char16_t* aText, uint32_t aLen, uint32_t aPos) {
return WordMove(aText, aLen, aPos, 1);
}
int32_t LineBreaker::Prev(const char16_t* aText, uint32_t aLen, uint32_t aPos) {
NS_ASSERTION(aText, "aText shouldn't be null");
NS_ASSERTION(aLen >= aPos && aPos > 0,
"Bad position passed to nsJISx4051LineBreaker::Prev");
int32_t prevPos = WordMove(aText, aLen, aPos, -1);
return prevPos > 0 ? prevPos : NS_LINEBREAKER_NEED_MORE_TEXT;
}
static bool SuppressBreakForKeepAll(uint32_t aPrev, uint32_t aCh) {
auto affectedByKeepAll = [](uint8_t aLBClass) {
switch (aLBClass) {

View File

@ -40,10 +40,6 @@ class LineBreaker {
// NS_LINEBREAKER_NEED_MORE_TEXT.
int32_t Next(const char16_t* aText, uint32_t aLen, uint32_t aPos);
// Bug 1733009: Please do not add new callers to Prev(). This method will be
// removed.
int32_t Prev(const char16_t* aText, uint32_t aLen, uint32_t aPos);
// Call this on a word with whitespace at either end. We will apply JISx4051
// rules to find breaks inside the word. aBreakBefore is set to the break-
// before status of each character; aBreakBefore[0] will always be false