Auto merge of #9134 - iszak:issue-9132, r=nox

Fixes https://github.com/servo/servo/issues/9132

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9134)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-01-03 07:32:09 +05:30
commit 06d84e6e4b

View file

@ -570,14 +570,14 @@ impl VirtualMethods for HTMLInputElement {
&atom!("type") => {
match mutation {
AttributeMutation::Set(_) => {
let value = match &**attr.value() {
"button" => InputType::InputButton,
"submit" => InputType::InputSubmit,
"reset" => InputType::InputReset,
"file" => InputType::InputFile,
"radio" => InputType::InputRadio,
"checkbox" => InputType::InputCheckbox,
"password" => InputType::InputPassword,
let value = match attr.value().as_atom() {
&atom!("button") => InputType::InputButton,
&atom!("submit") => InputType::InputSubmit,
&atom!("reset") => InputType::InputReset,
&atom!("file") => InputType::InputFile,
&atom!("radio") => InputType::InputRadio,
&atom!("checkbox") => InputType::InputCheckbox,
&atom!("password") => InputType::InputPassword,
_ => InputType::InputText,
};
self.input_type.set(value);