mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Support form submission of multipart/form-data
This commit is contained in:
parent
8db0367301
commit
cfde40e225
8 changed files with 135 additions and 17 deletions
|
@ -22,7 +22,7 @@ use dom::event::{Event, EventBubbles, EventCancelable};
|
|||
use dom::eventtarget::EventTarget;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::htmlfieldsetelement::HTMLFieldSetElement;
|
||||
use dom::htmlformelement::{FormControl, FormDatum, FormSubmitter, HTMLFormElement};
|
||||
use dom::htmlformelement::{FormDatumValue, FormControl, FormDatum, FormSubmitter, HTMLFormElement};
|
||||
use dom::htmlformelement::{ResetFrom, SubmittedFrom};
|
||||
use dom::keyboardevent::KeyboardEvent;
|
||||
use dom::node::{Node, NodeDamage, UnbindContext};
|
||||
|
@ -625,6 +625,7 @@ impl HTMLInputElement {
|
|||
atom!("radio") | atom!("checkbox") => if !self.Checked() || name.is_empty() {
|
||||
return None;
|
||||
},
|
||||
|
||||
atom!("image") | atom!("file") => return None, // Unimplemented
|
||||
// Step 3.1: it's not the "Image Button" and doesn't have a name attribute.
|
||||
_ => if name.is_empty() {
|
||||
|
@ -637,7 +638,7 @@ impl HTMLInputElement {
|
|||
Some(FormDatum {
|
||||
ty: DOMString::from(&*ty), // FIXME(ajeffrey): Convert directly from Atoms to DOMStrings
|
||||
name: name,
|
||||
value: self.Value()
|
||||
value: FormDatumValue::String(self.Value())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue