mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #11333 - Manishearth:submit-submit-button, r=nox
Include <button type=submit> data whilst constructing the form dataset This makes it possible to close things in github (see https://github.com/Manishearth/mitochondria/issues/1) - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors Either: - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11333) <!-- Reviewable:end -->
This commit is contained in:
commit
de79f96775
4 changed files with 61 additions and 5 deletions
|
@ -623,8 +623,10 @@ impl HTMLInputElement {
|
|||
}
|
||||
|
||||
/// https://html.spec.whatwg.org/multipage/#constructing-the-form-data-set
|
||||
/// Steps range from 3.1 to 3.7 which related to the HTMLInputElement
|
||||
/// Steps range from 3.1 to 3.7 (specific to HTMLInputElement)
|
||||
pub fn form_datum(&self, submitter: Option<FormSubmitter>) -> Option<FormDatum> {
|
||||
// 3.1: disabled state check is in get_unclean_dataset
|
||||
|
||||
// Step 3.2
|
||||
let ty = self.type_();
|
||||
// Step 3.4
|
||||
|
@ -652,7 +654,7 @@ impl HTMLInputElement {
|
|||
|
||||
}
|
||||
|
||||
// Step 3.6
|
||||
// Step 3.9
|
||||
Some(FormDatum {
|
||||
ty: DOMString::from(&*ty), // FIXME(ajeffrey): Convert directly from Atoms to DOMStrings
|
||||
name: name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue