diff --git a/widget/gtk/IMContextWrapper.cpp b/widget/gtk/IMContextWrapper.cpp index b2854f96f37..f67deddef72 100644 --- a/widget/gtk/IMContextWrapper.cpp +++ b/widget/gtk/IMContextWrapper.cpp @@ -1471,13 +1471,13 @@ IMContextWrapper::DispatchCompositionCommitEvent( already_AddRefed IMContextWrapper::CreateTextRangeArray(GtkIMContext* aContext, - const nsAString& aLastDispatchedData) + const nsAString& aCompositionString) { MOZ_LOG(gGtkIMLog, LogLevel::Info, ("GTKIM: %p CreateTextRangeArray(aContext=%p, " - "aLastDispatchedData=\"%s\" (Length()=%u))", - this, aContext, NS_ConvertUTF16toUTF8(aLastDispatchedData).get(), - aLastDispatchedData.Length())); + "aCompositionString=\"%s\" (Length()=%u))", + this, aContext, NS_ConvertUTF16toUTF8(aCompositionString).get(), + aCompositionString.Length())); nsRefPtr textRangeArray = new TextRangeArray(); @@ -1499,7 +1499,7 @@ IMContextWrapper::CreateTextRangeArray(GtkIMContext* aContext, // Convert caret offset from offset in characters to offset in UTF-16 // string. If we couldn't proper offset in UTF-16 string, we should // assume that the caret is at the end of the composition string. - uint32_t caretOffsetInUTF16 = aLastDispatchedData.Length(); + uint32_t caretOffsetInUTF16 = aCompositionString.Length(); if (NS_WARN_IF(cursor_pos_in_chars < 0)) { // Note that this case is undocumented. We should assume that the // caret is at the end of the composition string. @@ -1527,7 +1527,7 @@ IMContextWrapper::CreateTextRangeArray(GtkIMContext* aContext, this, cursor_pos_in_chars, caretOffset)); } else { caretOffsetInUTF16 = static_cast(caretOffset); - uint32_t compositionStringLength = aLastDispatchedData.Length(); + uint32_t compositionStringLength = aCompositionString.Length(); if (NS_WARN_IF(caretOffsetInUTF16 > compositionStringLength)) { MOZ_LOG(gGtkIMLog, LogLevel::Warning, ("GTKIM: %p CreateTextRangeArray(), WARNING, " diff --git a/widget/gtk/IMContextWrapper.h b/widget/gtk/IMContextWrapper.h index 3690b1b8c8b..f1933b39d8c 100644 --- a/widget/gtk/IMContextWrapper.h +++ b/widget/gtk/IMContextWrapper.h @@ -345,13 +345,12 @@ protected: * Generates our text range array from current composition string. * * @param aContext A GtkIMContext which is being handled. - * @param aLastDispatchedData The data of the last compositionchange event - * of current composition. This should be - * mDispatchedCompositionString. + * @param aCompositionString The data to be dispatched with + * compositionchange event. */ already_AddRefed CreateTextRangeArray(GtkIMContext* aContext, - const nsAString& aLastDispatchedData); + const nsAString& aCompositionString); /** * SetTextRange() initializes aTextRange with aPangoAttrIter.