Refactored metaKey to meta_key where possible

This commit is contained in:
Arthur Marble 2016-09-17 02:11:19 -05:00
parent bdbc04409d
commit 5ce3510a50
6 changed files with 10 additions and 10 deletions

View file

@ -65,7 +65,7 @@ pub fn synthetic_click_activation(element: &Element,
ctrl_key: bool, ctrl_key: bool,
shift_key: bool, shift_key: bool,
alt_key: bool, alt_key: bool,
metaKey: bool, meta_key: bool,
source: ActivationSource) { source: ActivationSource) {
// Step 1 // Step 1
if element.click_in_progress() { if element.click_in_progress() {
@ -96,7 +96,7 @@ pub fn synthetic_click_activation(element: &Element,
ctrl_key, ctrl_key,
shift_key, shift_key,
alt_key, alt_key,
metaKey, meta_key,
0, 0,
None); None);
let event = mouse.upcast::<Event>(); let event = mouse.upcast::<Event>();

View file

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

View file

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

View file

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

View file

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

View file

@ -65,7 +65,7 @@ impl TouchEvent {
ctrl_key: bool, ctrl_key: bool,
alt_key: bool, alt_key: bool,
shift_key: bool, shift_key: bool,
metaKey: bool) -> Root<TouchEvent> { meta_key: bool) -> Root<TouchEvent> {
let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches); let ev = TouchEvent::new_uninitialized(window, touches, changed_touches, target_touches);
ev.upcast::<UIEvent>().InitUIEvent(type_, ev.upcast::<UIEvent>().InitUIEvent(type_,
bool::from(canBubble), bool::from(canBubble),
@ -74,7 +74,7 @@ impl TouchEvent {
ev.ctrl_key.set(ctrl_key); ev.ctrl_key.set(ctrl_key);
ev.alt_key.set(alt_key); ev.alt_key.set(alt_key);
ev.shift_key.set(shift_key); ev.shift_key.set(shift_key);
ev.meta_key.set(metaKey); ev.meta_key.set(meta_key);
ev ev
} }
} }