Bug 1876792 - Report invisible input fields only when invalid. r=jjaschke,dom-core,edgar

Differential Revision: https://phabricator.services.mozilla.com/D199962
This commit is contained in:
Vincent Hilla
2024-03-05 11:51:09 +00:00
parent 6bb6c3f7d7
commit b77cb74b4c
2 changed files with 14 additions and 19 deletions

View File

@@ -212,11 +212,11 @@ class HTMLFormElement final : public nsGenericHTMLElement {
*
* @return Whether the form is valid.
*
* @note Do not call this method if novalidate/formnovalidate is used.
* @note This method might disappear with bug 592124, hopefuly.
* @see
* https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#interactively-validate-the-constraints
*/
MOZ_CAN_RUN_SCRIPT
bool CheckValidFormSubmission();
/**
@@ -330,6 +330,7 @@ class HTMLFormElement final : public nsGenericHTMLElement {
bool CheckValidity() { return CheckFormValidity(nullptr); }
MOZ_CAN_RUN_SCRIPT
bool ReportValidity() { return CheckValidFormSubmission(); }
Element* IndexedGetter(uint32_t aIndex, bool& aFound);
@@ -584,7 +585,8 @@ class HTMLFormElement final : public nsGenericHTMLElement {
void MaybeFireFormRemoved();
MOZ_CAN_RUN_SCRIPT
void ReportInvalidUnfocusableElements();
void ReportInvalidUnfocusableElements(
const nsTArray<RefPtr<Element>>&& aInvalidElements);
~HTMLFormElement();
};