This commit is contained in:
Cameron Kaiser
2017-10-16 21:35:53 -07:00
parent b8ebae8398
commit 84bfb83b16
14 changed files with 198 additions and 87 deletions
+13 -2
View File
@@ -1142,6 +1142,13 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
if (aName == nsGkAtoms::required || aName == nsGkAtoms::disabled ||
aName == nsGkAtoms::readonly) {
if (aName == nsGkAtoms::disabled) {
// This *has* to be called *before* validity state check because
// UpdateBarredFromConstraintValidation and
// UpdateValueMissingValidityState depend on our disabled state.
UpdateDisabledState(aNotify);
}
UpdateValueMissingValidityState();
// This *has* to be called *after* validity has changed.
@@ -7192,10 +7199,14 @@ HTMLInputElement::HasCachedSelection()
void
HTMLInputElement::FieldSetDisabledChanged(bool aNotify)
{
// This *has* to be called *before* UpdateBarredFromConstraintValidation and
// UpdateValueMissingValidityState because these two functions depend on our
// disabled state.
nsGenericHTMLFormElementWithState::FieldSetDisabledChanged(aNotify);
UpdateValueMissingValidityState();
UpdateBarredFromConstraintValidation();
nsGenericHTMLFormElementWithState::FieldSetDisabledChanged(aNotify);
UpdateState(aNotify);
}
void