Bug 1850293 - Make validity states non-intrinsic. r=smaug

Add a RAII helper to notify of multiple state changes together for
these.

The UpdateState CustomElementInternals calls that are getting removed
are unnecessary (the state should be up-to-date by then, there's nothing
changing there particularly).

Same for the call in nsGenericHTMLFormElement::UnbindFromTree. ClearForm
already does an state update.

Differential Revision: https://phabricator.services.mozilla.com/D187033
This commit is contained in:
Emilio Cobos Álvarez
2023-08-30 09:18:32 +00:00
parent 18854ff8b5
commit 72f00fc947
25 changed files with 249 additions and 299 deletions

View File

@@ -80,8 +80,6 @@ class HTMLFormElement final : public nsGenericHTMLElement,
bool GetValueMissingState(const nsAString& aName) const override;
void SetValueMissingState(const nsAString& aName, bool aValue) override;
ElementState IntrinsicState() const override;
// EventTarget
void AsyncEventRunning(AsyncEventDispatcher* aEvent) override;