Skip to content

Commit

Permalink
Bug 1834334 - Include input reset and input button types to button ty…
Browse files Browse the repository at this point in the history
…pe for target element. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D178670
  • Loading branch information
ziransun committed May 23, 2023
1 parent 75bab3b commit f9edef8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 337 deletions.
4 changes: 3 additions & 1 deletion dom/html/nsIFormControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ bool nsIFormControl::IsSubmittableControl() const {
}

bool nsIFormControl::IsConceptButton() const {
return IsSubmitControl() || IsButtonElement(ControlType());
auto type = ControlType();
return IsSubmitControl() || type == FormControlType::InputReset ||
type == FormControlType::InputButton || IsButtonElement(type);
}

bool nsIFormControl::IsButtonControl() const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,341 +1,5 @@
[popover-invoking-attribute.html]
max-asserts: 1
[Test <input type="button">, action=garbage, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=garbage, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=undefined, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=hide, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=ShOw, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=undefined, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=hide, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=hide, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=ShOw, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=undefined, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=toggle, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=garbage, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=hide, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=toggle, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=show, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=ShOw, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=undefined, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=undefined, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=show, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=null, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=undefined, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=ShOw, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=garbage, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=show, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=toggle, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=show, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=hide, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=garbage, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=hide, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=toggle, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=show, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=show, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=show, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=garbage, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=null, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=hide, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=ShOw, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=hide, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=toggle, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=show, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=show, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=show, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=hide, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=undefined, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=show, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=ShOw, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=hide, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=hide, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=ShOw, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=null, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=hide, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=show, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=toggle, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=hide, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=ShOw, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=show, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=hide, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=toggle, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=garbage, popovertarget attr, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=garbage, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=ShOw, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=toggle, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popovertarget attr, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=undefined, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=hide, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=toggle, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=garbage, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=null, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=toggle, popoverTarget IDL, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=toggle, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="button">, action=undefined, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="button">, action=show, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=show, popoverTarget IDL, popovertargetaction attr, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=show, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=hide, popovertarget attr, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="button">, action=undefined, popovertarget attr, popovertargetaction attr, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=undefined, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=null, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=ShOw, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="reset">, action=ShOw, popoverTarget IDL, popoverTargetAction IDL, with popover=auto]
expected: FAIL

[Test <input type="button">, action=garbage, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="reset">, action=garbage, popoverTarget IDL, popoverTargetAction IDL, with popover=manual]
expected: FAIL

[Test <input type="number">, action=undefined, popovertarget attr, popovertargetaction attr, with popover=auto]
expected:
if not debug and (os == "android"): [PASS, FAIL]
Expand Down

0 comments on commit f9edef8

Please sign in to comment.