This commit refactors altKey to alt_key when possible.

This commit is contained in:
Arthur Marble 2016-09-17 01:26:55 -05:00
parent fd0622a741
commit bdbc04409d
6 changed files with 10 additions and 10 deletions

View file

@ -64,7 +64,7 @@ pub enum ActivationSource {
pub fn synthetic_click_activation(element: &Element,
ctrl_key: bool,
shift_key: bool,
altKey: bool,
alt_key: bool,
metaKey: bool,
source: ActivationSource) {
// Step 1
@ -95,7 +95,7 @@ pub fn synthetic_click_activation(element: &Element,
0,
ctrl_key,
shift_key,
altKey,
alt_key,
metaKey,
0,
None);

View file

@ -540,7 +540,7 @@ impl Activatable for HTMLAnchorElement {
}
//TODO:https://html.spec.whatwg.org/multipage/#the-a-element
fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _altKey: bool, _metaKey: bool) {
fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _alt_key: bool, _metaKey: bool) {
}
}

View file

@ -283,7 +283,7 @@ impl Activatable for HTMLButtonElement {
// https://html.spec.whatwg.org/multipage/#implicit-submission
#[allow(unsafe_code)]
fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, altKey: bool, metaKey: bool) {
fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, metaKey: bool) {
let doc = document_from_node(self);
let node = doc.upcast::<Node>();
let owner = self.form_owner();
@ -296,7 +296,7 @@ impl Activatable for HTMLButtonElement {
.map(|s| synthetic_click_activation(s.r().as_element(),
ctrl_key,
shift_key,
altKey,
alt_key,
metaKey,
ActivationSource::NotFromClick));
}

View file

@ -1275,7 +1275,7 @@ impl Activatable for HTMLInputElement {
// https://html.spec.whatwg.org/multipage/#implicit-submission
#[allow(unsafe_code)]
fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, altKey: bool, metaKey: bool) {
fn implicit_submission(&self, ctrl_key: bool, shift_key: bool, alt_key: bool, metaKey: bool) {
let doc = document_from_node(self);
let node = doc.upcast::<Node>();
let owner = self.form_owner();
@ -1297,7 +1297,7 @@ impl Activatable for HTMLInputElement {
synthetic_click_activation(button.as_element(),
ctrl_key,
shift_key,
altKey,
alt_key,
metaKey,
ActivationSource::NotFromClick)
}

View file

@ -76,7 +76,7 @@ impl Activatable for HTMLLabelElement {
}
// https://html.spec.whatwg.org/multipage/#implicit-submission
fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _altKey: bool, _metaKey: bool) {
fn implicit_submission(&self, _ctrl_key: bool, _shift_key: bool, _alt_key: bool, _metaKey: bool) {
//FIXME: Investigate and implement implicit submission for label elements
// Issue filed at https://github.com/servo/servo/issues/8263
}

View file

@ -63,7 +63,7 @@ impl TouchEvent {
changed_touches: &TouchList,
target_touches: &TouchList,
ctrl_key: bool,
altKey: bool,
alt_key: bool,
shift_key: bool,
metaKey: bool) -> Root<TouchEvent> {
let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
@ -72,7 +72,7 @@ impl TouchEvent {
bool::from(cancelable),
view, detail);
ev.ctrl_key.set(ctrl_key);
ev.alt_key.set(altKey);
ev.alt_key.set(alt_key);
ev.shift_key.set(shift_key);
ev.meta_key.set(metaKey);
ev