Bug 1833181 - Make SetValueChanged return void. r=smaug

Just a drive-by clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D178077
This commit is contained in:
Emilio Cobos Álvarez
2023-05-15 16:07:30 +00:00
parent 2f4a365cf9
commit c18930d41f
7 changed files with 16 additions and 22 deletions

View File

@@ -308,25 +308,22 @@ void HTMLTextAreaElement::SetUserInput(const nsAString& aValue,
ValueSetterOption::MoveCursorToEndIfValueChanged});
}
nsresult HTMLTextAreaElement::SetValueChanged(bool aValueChanged) {
void HTMLTextAreaElement::SetValueChanged(bool aValueChanged) {
MOZ_ASSERT(mState);
bool previousValue = mValueChanged;
mValueChanged = aValueChanged;
if (!aValueChanged && !mState->IsEmpty()) {
mState->EmptyValue();
}
if (mValueChanged != previousValue) {
UpdateTooLongValidityState();
UpdateTooShortValidityState();
// We need to do this unconditionally because the validity ui bits depend on
// this.
UpdateState(true);
if (mValueChanged == previousValue) {
return;
}
return NS_OK;
UpdateTooLongValidityState();
UpdateTooShortValidityState();
// We need to do this unconditionally because the validity ui bits depend on
// this.
UpdateState(true);
}
void HTMLTextAreaElement::SetLastValueChangeWasInteractive(