mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #6839 - dzbarsky:atoms, r=jdm
Use static atoms in HTMLFormElement Need to update to new string-cache first, which I think requires a rustup? <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6839) <!-- Reviewable:end -->
This commit is contained in:
commit
9a2f28ae33
1 changed files with 8 additions and 12 deletions
|
@ -448,13 +448,12 @@ impl<'a> FormSubmitter<'a> {
|
||||||
match *self {
|
match *self {
|
||||||
FormSubmitter::FormElement(form) => form.Action(),
|
FormSubmitter::FormElement(form) => form.Action(),
|
||||||
FormSubmitter::InputElement(input_element) => {
|
FormSubmitter::InputElement(input_element) => {
|
||||||
// FIXME(pcwalton): Make this a static atom.
|
input_element.get_form_attribute(&atom!("formaction"),
|
||||||
input_element.get_form_attribute(&Atom::from_slice("formaction"),
|
|
||||||
|i| i.FormAction(),
|
|i| i.FormAction(),
|
||||||
|f| f.Action())
|
|f| f.Action())
|
||||||
},
|
},
|
||||||
FormSubmitter::ButtonElement(button_element) => {
|
FormSubmitter::ButtonElement(button_element) => {
|
||||||
button_element.get_form_attribute(&Atom::from_slice("formaction"),
|
button_element.get_form_attribute(&atom!("formaction"),
|
||||||
|i| i.FormAction(),
|
|i| i.FormAction(),
|
||||||
|f| f.Action())
|
|f| f.Action())
|
||||||
}
|
}
|
||||||
|
@ -465,13 +464,12 @@ impl<'a> FormSubmitter<'a> {
|
||||||
let attr = match *self {
|
let attr = match *self {
|
||||||
FormSubmitter::FormElement(form) => form.Enctype(),
|
FormSubmitter::FormElement(form) => form.Enctype(),
|
||||||
FormSubmitter::InputElement(input_element) => {
|
FormSubmitter::InputElement(input_element) => {
|
||||||
// FIXME(pcwalton): Make this a static atom.
|
input_element.get_form_attribute(&atom!("formenctype"),
|
||||||
input_element.get_form_attribute(&Atom::from_slice("formenctype"),
|
|
||||||
|i| i.FormEnctype(),
|
|i| i.FormEnctype(),
|
||||||
|f| f.Enctype())
|
|f| f.Enctype())
|
||||||
},
|
},
|
||||||
FormSubmitter::ButtonElement(button_element) => {
|
FormSubmitter::ButtonElement(button_element) => {
|
||||||
button_element.get_form_attribute(&Atom::from_slice("formenctype"),
|
button_element.get_form_attribute(&atom!("formenctype"),
|
||||||
|i| i.FormAction(),
|
|i| i.FormAction(),
|
||||||
|f| f.Action())
|
|f| f.Action())
|
||||||
}
|
}
|
||||||
|
@ -489,13 +487,12 @@ impl<'a> FormSubmitter<'a> {
|
||||||
let attr = match *self {
|
let attr = match *self {
|
||||||
FormSubmitter::FormElement(form) => form.Method(),
|
FormSubmitter::FormElement(form) => form.Method(),
|
||||||
FormSubmitter::InputElement(input_element) => {
|
FormSubmitter::InputElement(input_element) => {
|
||||||
// FIXME(pcwalton): Make this a static atom.
|
input_element.get_form_attribute(&atom!("formmethod"),
|
||||||
input_element.get_form_attribute(&Atom::from_slice("formmethod"),
|
|
||||||
|i| i.FormMethod(),
|
|i| i.FormMethod(),
|
||||||
|f| f.Method())
|
|f| f.Method())
|
||||||
},
|
},
|
||||||
FormSubmitter::ButtonElement(button_element) => {
|
FormSubmitter::ButtonElement(button_element) => {
|
||||||
button_element.get_form_attribute(&Atom::from_slice("formmethod"),
|
button_element.get_form_attribute(&atom!("formmethod"),
|
||||||
|i| i.FormAction(),
|
|i| i.FormAction(),
|
||||||
|f| f.Action())
|
|f| f.Action())
|
||||||
}
|
}
|
||||||
|
@ -511,13 +508,12 @@ impl<'a> FormSubmitter<'a> {
|
||||||
match *self {
|
match *self {
|
||||||
FormSubmitter::FormElement(form) => form.Target(),
|
FormSubmitter::FormElement(form) => form.Target(),
|
||||||
FormSubmitter::InputElement(input_element) => {
|
FormSubmitter::InputElement(input_element) => {
|
||||||
// FIXME(pcwalton): Make this a static atom.
|
input_element.get_form_attribute(&atom!("formtarget"),
|
||||||
input_element.get_form_attribute(&Atom::from_slice("formtarget"),
|
|
||||||
|i| i.FormTarget(),
|
|i| i.FormTarget(),
|
||||||
|f| f.Target())
|
|f| f.Target())
|
||||||
},
|
},
|
||||||
FormSubmitter::ButtonElement(button_element) => {
|
FormSubmitter::ButtonElement(button_element) => {
|
||||||
button_element.get_form_attribute(&Atom::from_slice("formtarget"),
|
button_element.get_form_attribute(&atom!("formtarget"),
|
||||||
|i| i.FormAction(),
|
|i| i.FormAction(),
|
||||||
|f| f.Action())
|
|f| f.Action())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue