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:
bors-servo 2016-05-23 04:18:09 -07:00
commit de79f96775
4 changed files with 61 additions and 5 deletions

View file

@ -548,7 +548,12 @@ impl HTMLFormElement {
data_set.push(datum);
}
}
HTMLElementTypeId::HTMLButtonElement |
HTMLElementTypeId::HTMLButtonElement => {
let button = child.downcast::<HTMLButtonElement>().unwrap();
if let Some(datum) = button.form_datum(submitter) {
data_set.push(datum);
}
}
HTMLElementTypeId::HTMLObjectElement => {
// Unimplemented
()