Bug 1649569 - Don't assert in GetValidationMessage that we got a good number. r=edgar

This can happen because we don't have a nice mechanism to update the
validity bits in all cases where the computed "language" changes.

That's not really a regression, and I'm on PTO, so for now we just deal
with it. The "bad input" message seems appropriate for this case rather
than returning garbage numbers.

Differential Revision: https://phabricator.services.mozilla.com/D82402
This commit is contained in:
Emilio Cobos Álvarez
2020-07-07 13:32:48 +00:00
parent c0c1bc6ec7
commit edeba1def3
3 changed files with 21 additions and 2 deletions

View File

@@ -1280,7 +1280,7 @@ nsresult HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
aValue->Equals(nsGkAtoms::_auto, eIgnoreCase)) {
SetDirectionFromValue(aNotify);
} else if (aName == nsGkAtoms::lang) {
// FIXME(emilio, bug 1605158): This doesn't account for lang changes on
// FIXME(emilio, bug 1651070): This doesn't account for lang changes on
// ancestors.
if (mType == NS_FORM_INPUT_NUMBER) {
// The validity of our value may have changed based on the locale.