Bug 1357206 part 3. Rename eSetValue_MoveCursorToEnd to eSetValue_MoveCursorToEndIfValueChanged, because those are the semantics we want for it. r=ehsan

No actual behavior change here.
This commit is contained in:
Boris Zbarsky
2017-05-01 13:26:21 -04:00
parent 1166c9ddf3
commit 19916a9aeb
4 changed files with 24 additions and 19 deletions

View File

@@ -404,9 +404,10 @@ HTMLTextAreaElement::SetValue(const nsAString& aValue)
GetValueInternal(currentValue, true);
nsresult rv =
SetValueInternal(aValue, nsTextEditorState::eSetValue_ByContent |
nsTextEditorState::eSetValue_Notify |
nsTextEditorState::eSetValue_MoveCursorToEnd);
SetValueInternal(aValue,
nsTextEditorState::eSetValue_ByContent |
nsTextEditorState::eSetValue_Notify |
nsTextEditorState::eSetValue_MoveCursorToEndIfValueChanged);
NS_ENSURE_SUCCESS(rv, rv);
if (mFocusedValue.Equals(currentValue)) {
@@ -420,9 +421,9 @@ NS_IMETHODIMP
HTMLTextAreaElement::SetUserInput(const nsAString& aValue)
{
return SetValueInternal(aValue,
nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify|
nsTextEditorState::eSetValue_MoveCursorToEnd);
nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify|
nsTextEditorState::eSetValue_MoveCursorToEndIfValueChanged);
}
NS_IMETHODIMP