Bug 1746104 - part 3-1: Get rid of `WritingMode` argument of `IMContextWrapper::CollapseTo` r=m_kato

It's always overwritten with same value so that it is not necessary at least for
now and on Windows, we just do not update it in same situation.  Therefore,
we should drop it until we become need to use it.

Differential Revision: https://phabricator.services.mozilla.com/D137414
This commit is contained in:
Masayuki Nakano 2022-02-07 22:33:34 +00:00
Родитель a07994ed54
Коммит 69489e5812
2 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -2372,8 +2372,7 @@ bool IMContextWrapper::DispatchCompositionCommitEvent(
// shouldn't reset IME because the trigger of causing this commit may be an
// input for next composition and we shouldn't cancel it.
if (mSelection.IsValid()) {
mSelection.CollapseTo(mSelection.mOffset + aCommitString->Length(),
mSelection.mWritingMode);
mSelection.CollapseTo(mSelection.mOffset + aCommitString->Length());
MOZ_LOG(gIMELog, LogLevel::Info,
("0x%p DispatchCompositionCommitEvent(), "
"mSelection={ mOffset=%u, mString=\"%s\", mWritingMode=%s }",
@ -2423,11 +2422,10 @@ bool IMContextWrapper::DispatchCompositionCommitEvent(
}
// Emulate selection until receiving actual selection range.
mSelection.CollapseTo(
mCompositionStart + (aCommitString
? aCommitString->Length()
: mDispatchedCompositionString.Length()),
mSelection.mWritingMode);
mSelection.CollapseTo(mCompositionStart +
(aCommitString
? aCommitString->Length()
: mDispatchedCompositionString.Length()));
}
mCompositionState = eCompositionState_NotComposing;

Просмотреть файл

@ -393,8 +393,7 @@ class IMContextWrapper final : public TextEventDispatcherListener {
mOffset = UINT32_MAX;
mWritingMode = WritingMode();
}
void CollapseTo(uint32_t aOffset, const WritingMode& aWritingMode) {
mWritingMode = aWritingMode;
void CollapseTo(uint32_t aOffset) {
mOffset = aOffset;
mString.Truncate();
}