Bug 1702670 - Fix some orange by keeping the UpdateState() call from SetValueChanged unconditionally.
Because the ui-validity bits depend on it. MANUAL PUSH: Mochitest failures on a CLOSED TREE
This commit is contained in:
@@ -320,28 +320,28 @@ nsresult HTMLTextAreaElement::SetValueChanged(bool aValueChanged) {
|
||||
}
|
||||
|
||||
if (mValueChanged != previousValue) {
|
||||
ValueChangedOrLastValueChangeWasInteractiveChanged();
|
||||
UpdateTooLongValidityState();
|
||||
UpdateTooShortValidityState();
|
||||
// We need to do this unconditionally because the validity ui bits depend on
|
||||
// this.
|
||||
UpdateState(true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::ValueChangedOrLastValueChangeWasInteractiveChanged() {
|
||||
const bool wasValid = IsValid();
|
||||
UpdateTooLongValidityState();
|
||||
UpdateTooShortValidityState();
|
||||
if (wasValid != IsValid()) {
|
||||
UpdateState(true);
|
||||
}
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::SetLastValueChangeWasInteractive(
|
||||
bool aWasInteractive) {
|
||||
if (aWasInteractive == mLastValueChangeWasInteractive) {
|
||||
return;
|
||||
}
|
||||
mLastValueChangeWasInteractive = aWasInteractive;
|
||||
ValueChangedOrLastValueChangeWasInteractiveChanged();
|
||||
const bool wasValid = IsValid();
|
||||
UpdateTooLongValidityState();
|
||||
UpdateTooShortValidityState();
|
||||
if (wasValid != IsValid()) {
|
||||
UpdateState(true);
|
||||
}
|
||||
}
|
||||
|
||||
void HTMLTextAreaElement::GetDefaultValue(nsAString& aDefaultValue,
|
||||
|
||||
Reference in New Issue
Block a user