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

@@ -71,8 +71,6 @@ class HTMLTextAreaElement final : public TextControlElement,
void FieldSetDisabledChanged(bool aNotify) override;
ElementState IntrinsicState() const override;
void SetLastValueChangeWasInteractive(bool);
// TextControlElement
@@ -393,6 +391,8 @@ class HTMLTextAreaElement final : public TextControlElement,
void GetSelectionRange(uint32_t* aSelectionStart, uint32_t* aSelectionEnd,
ErrorResult& aRv);
void UpdateValidityElementStates(bool aNotify) final;
private:
static void MapAttributesIntoRule(MappedDeclarationsBuilder&);
};