Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #27100 - muodov:master, r=gterzian
Implement HTMLFormElement.requestSubmit() <!-- Please describe your changes on the following line: --> This PR contains an implementation of [HTMLFormElement.requestSubmit()](https://html.spec.whatwg.org/multipage/forms.html#dom-form-requestsubmit) This is literally my first hundred lines of Rust code, so if I crossed a few sacred lines here and there, please go easy on me :) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23417 <!-- Either: --> - [x] [WPT tests](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/forms/the-form-element/form-requestsubmit.html) for these changes There are two tests that still fail because we don't support `:invalid` CSS selector (see #10781). I verified that they pass if you change them to not use `:invalid`. Should be unlocked by #26729. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
- Loading branch information
Showing
8 changed files
with
143 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
[form-submission-algorithm.html] | ||
[If form's firing submission events is true, then return; 'invalid' event] | ||
expected: FAIL | ||
[firing an event named submit; form.requestSubmit(submitter)] | ||
expected: FAIL | ||
[firing an event named submit; form.requestSubmit(null)] | ||
expected: FAIL | ||
[firing an event named submit; form.requestSubmit()] | ||
expected: FAIL | ||
[Submission URL should always have a non-null query part] | ||
expected: FAIL | ||
[If firing submission events flag of form is true, then return] | ||
expected: FAIL | ||
16 changes: 0 additions & 16 deletions
16
tests/wpt/metadata/html/semantics/forms/the-form-element/form-requestsubmit.html.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
[form-requestsubmit.html] | ||
[requestSubmit() doesn't run interactive validation reentrantly] | ||
expected: FAIL | ||
[The value of the submitter should be appended, and form* attributes of the submitter should be handled.] | ||
expected: FAIL | ||
|
||
[Passing a submit button not owned by the context object should throw] | ||
expected: FAIL | ||
[requestSubmit() for a disconnected form should not submit the form] | ||
expected: FAIL | ||
[requestSubmit() should trigger interactive form validation] | ||
expected: FAIL | ||
[requestSubmit() doesn't run form submission reentrantly] | ||
expected: FAIL | ||
|
||
[requestSubmit() should accept button[type=submit\], input[type=submit\], and input[type=image\]] | ||
expected: FAIL | ||
|