aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbuttonelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-09-18 22:57:59 -0500
committerGitHub <noreply@github.com>2016-09-18 22:57:59 -0500
commit5457b80233f9ce6773711c7189230d9a0a63d93a (patch)
tree035cee7e21bb31b434d6353241960c12b465e366 /components/script/dom/htmlbuttonelement.rs
parent157e3cc4e95e89e8c73a601028c09edaefe0f074 (diff)
parent5f961f9fd9aeb13ff6c5746a8d143a30a90b06c2 (diff)
downloadservo-5457b80233f9ce6773711c7189230d9a0a63d93a.tar.gz
servo-5457b80233f9ce6773711c7189230d9a0a63d93a.zip
Auto merge of #13307 - bubbles231:code_refactor, r=Manishearth
Code refactoring <!-- Please describe your changes on the following line: --> The code was refactored to follow Rust naming conventions better. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes help fix #12379. <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because logic was not changed. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13307) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r--components/script/dom/htmlbuttonelement.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index af95ec404b9..ebb41e01deb 100644
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -43,22 +43,22 @@ pub struct HTMLButtonElement {
}
impl HTMLButtonElement {
- fn new_inherited(localName: Atom,
+ fn new_inherited(local_name: Atom,
prefix: Option<DOMString>,
document: &Document) -> HTMLButtonElement {
HTMLButtonElement {
htmlelement:
HTMLElement::new_inherited_with_state(IN_ENABLED_STATE,
- localName, prefix, document),
+ local_name, prefix, document),
button_type: Cell::new(ButtonType::Submit)
}
}
#[allow(unrooted_must_root)]
- pub fn new(localName: Atom,
+ pub fn new(local_name: Atom,
prefix: Option<DOMString>,
document: &Document) -> Root<HTMLButtonElement> {
- Node::reflect_node(box HTMLButtonElement::new_inherited(localName, prefix, document),
+ Node::reflect_node(box HTMLButtonElement::new_inherited(local_name, prefix, document),
document,
HTMLButtonElementBinding::Wrap)
}
@@ -283,7 +283,7 @@ impl Activatable for HTMLButtonElement {
// https://html.spec.whatwg.org/multipage/#implicit-submission
#[allow(unsafe_code)]
- fn implicit_submission(&self, ctrlKey: bool, shiftKey: bool, altKey: bool, metaKey: bool) {
+ fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, meta_key: bool) {
let doc = document_from_node(self);
let node = doc.upcast::<Node>();
let owner = self.form_owner();
@@ -294,10 +294,10 @@ impl Activatable for HTMLButtonElement {
.filter_map(Root::downcast::<HTMLButtonElement>)
.find(|r| r.form_owner() == owner)
.map(|s| synthetic_click_activation(s.r().as_element(),
- ctrlKey,
- shiftKey,
- altKey,
- metaKey,
+ ctrl_key,
+ shift_key,
+ alt_key,
+ meta_key,
ActivationSource::NotFromClick));
}
}