diff options
author | Keith Yeung <kungfukeith11@gmail.com> | 2016-04-11 08:54:50 -0400 |
---|---|---|
committer | Keith Yeung <kungfukeith11@gmail.com> | 2016-04-11 08:54:50 -0400 |
commit | 916c035b57c7787e569186cd52406b73ea605ad6 (patch) | |
tree | 0cf0ffbb81fe5ca5cbee859b09a571fbef2a4b08 /components/script/dom/htmlinputelement.rs | |
parent | f54a8fc8456afe8a8d8c2edc0890694506e175f3 (diff) | |
download | servo-916c035b57c7787e569186cd52406b73ea605ad6.tar.gz servo-916c035b57c7787e569186cd52406b73ea605ad6.zip |
Rename fn mutable to is_mutable
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rw-r--r-- | components/script/dom/htmlinputelement.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 845010ce627..77316f4b6f8 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -656,7 +656,7 @@ impl HTMLInputElement { } // https://html.spec.whatwg.org/multipage/#concept-fe-mutable - fn mutable(&self) -> bool { + fn is_mutable(&self) -> bool { // https://html.spec.whatwg.org/multipage/#the-input-element:concept-fe-mutable // https://html.spec.whatwg.org/multipage/#the-readonly-attribute:concept-fe-mutable !(self.upcast::<Element>().disabled_state() || self.ReadOnly()) @@ -912,7 +912,7 @@ impl Activatable for HTMLInputElement { // https://html.spec.whatwg.org/multipage/#checkbox-state-%28type=checkbox%29:activation-behaviour-2 // https://html.spec.whatwg.org/multipage/#radio-button-state-%28type=radio%29:activation-behaviour-2 InputType::InputSubmit | InputType::InputReset - | InputType::InputCheckbox | InputType::InputRadio => self.mutable(), + | InputType::InputCheckbox | InputType::InputRadio => self.is_mutable(), _ => false } } @@ -923,7 +923,7 @@ impl Activatable for HTMLInputElement { let mut cache = self.activation_state.borrow_mut(); let ty = self.input_type.get(); cache.old_type = ty; - cache.was_mutable = self.mutable(); + cache.was_mutable = self.is_mutable(); if cache.was_mutable { match ty { // https://html.spec.whatwg.org/multipage/#submit-button-state-(type=submit):activation-behavior @@ -1025,7 +1025,7 @@ impl Activatable for HTMLInputElement { InputType::InputSubmit => { // https://html.spec.whatwg.org/multipage/#submit-button-state-(type=submit):activation-behavior // FIXME (Manishearth): support document owners (needs ability to get parent browsing context) - if self.mutable() /* and document owner is fully active */ { + if self.is_mutable() /* and document owner is fully active */ { self.form_owner().map(|o| { o.submit(SubmittedFrom::NotFromFormSubmitMethod, FormSubmitter::InputElement(self.clone())) @@ -1035,7 +1035,7 @@ impl Activatable for HTMLInputElement { InputType::InputReset => { // https://html.spec.whatwg.org/multipage/#reset-button-state-(type=reset):activation-behavior // FIXME (Manishearth): support document owners (needs ability to get parent browsing context) - if self.mutable() /* and document owner is fully active */ { + if self.is_mutable() /* and document owner is fully active */ { self.form_owner().map(|o| { o.reset(ResetFrom::NotFromFormResetMethod) }); @@ -1044,7 +1044,7 @@ impl Activatable for HTMLInputElement { InputType::InputCheckbox | InputType::InputRadio => { // https://html.spec.whatwg.org/multipage/#checkbox-state-(type=checkbox):activation-behavior // https://html.spec.whatwg.org/multipage/#radio-button-state-(type=radio):activation-behavior - if self.mutable() { + if self.is_mutable() { let target = self.upcast::<EventTarget>(); target.fire_event("input", EventBubbles::Bubbles, |