Bug 1528644 - Internal value changes shouldn't change validity state. r=masayuki

Even less so on reframe, where it's just unsound to do so. I had to give a value
to eSetValue_Internal, since otherwise I cannot check for its presence. I can
further special-case the reframe case if you prefer.

Differential Revision: https://phabricator.services.mozilla.com/D20133
This commit is contained in:
Emilio Cobos Álvarez
2019-02-19 09:25:55 +00:00
parent b05ad17c18
commit 9506ad92d3
11 changed files with 70 additions and 33 deletions

View File

@@ -1111,9 +1111,10 @@ HTMLTextAreaElement::InitializeKeyboardEventListeners() {
}
NS_IMETHODIMP_(void)
HTMLTextAreaElement::OnValueChanged(bool aNotify,
bool aWasInteractiveUserChange) {
mLastValueChangeWasInteractive = aWasInteractiveUserChange;
HTMLTextAreaElement::OnValueChanged(bool aNotify, ValueChangeKind aKind) {
if (aKind != ValueChangeKind::Internal) {
mLastValueChangeWasInteractive = aKind == ValueChangeKind::UserInteraction;
}
// Update the validity state
bool validBefore = IsValid();