Bug 1850295 - Update :user-{valid,invalid} to follow the spec. r=smaug

(Modulo open spec issues linked in comments)

Differential Revision: https://phabricator.services.mozilla.com/D196986
This commit is contained in:
Emilio Cobos Álvarez
2024-01-16 11:09:01 +00:00
parent 97909653e7
commit b9aedffc24
69 changed files with 203 additions and 1109 deletions

View File

@@ -1795,7 +1795,6 @@ void nsGenericHTMLFormElement::ClearForm(bool aRemoveFromForm,
UnsetFlags(ADDED_TO_FORM);
SetFormInternal(nullptr, false);
AfterClearForm(aUnbindOrDelete);
UpdateValidityElementStates(true);
}
nsresult nsGenericHTMLFormElement::BindToTree(BindContext& aContext,
@@ -2148,11 +2147,6 @@ void nsGenericHTMLFormElement::UpdateFormOwner(bool aBindToTree,
form->AddElementToTable(this, idVal);
}
}
if (form != oldForm) {
// ui-valid / invalid depends on the form for some elements
UpdateValidityElementStates(true);
}
}
void nsGenericHTMLFormElement::UpdateFieldSet(bool aNotify) {