aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/keyboardevent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/keyboardevent.rs')
-rw-r--r--components/script/dom/keyboardevent.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs
index 1120ac4f734..1aed28da355 100644
--- a/components/script/dom/keyboardevent.rs
+++ b/components/script/dom/keyboardevent.rs
@@ -757,9 +757,9 @@ impl KeyEventProperties {
}
}
-impl<'a> KeyboardEventMethods for &'a KeyboardEvent {
+impl KeyboardEventMethods for KeyboardEvent {
// https://w3c.github.io/uievents/#widl-KeyboardEvent-initKeyboardEvent
- fn InitKeyboardEvent(self,
+ fn InitKeyboardEvent(&self,
typeArg: DOMString,
canBubbleArg: bool,
cancelableArg: bool,
@@ -782,52 +782,52 @@ impl<'a> KeyboardEventMethods for &'a KeyboardEvent {
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-key
- fn Key(self) -> DOMString {
+ fn Key(&self) -> DOMString {
self.key_string.borrow().clone()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-code
- fn Code(self) -> DOMString {
+ fn Code(&self) -> DOMString {
self.code.borrow().clone()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-location
- fn Location(self) -> u32 {
+ fn Location(&self) -> u32 {
self.location.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-ctrlKey
- fn CtrlKey(self) -> bool {
+ fn CtrlKey(&self) -> bool {
self.ctrl.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-shiftKey
- fn ShiftKey(self) -> bool {
+ fn ShiftKey(&self) -> bool {
self.shift.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-altKey
- fn AltKey(self) -> bool {
+ fn AltKey(&self) -> bool {
self.alt.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-metaKey
- fn MetaKey(self) -> bool {
+ fn MetaKey(&self) -> bool {
self.meta.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-repeat
- fn Repeat(self) -> bool {
+ fn Repeat(&self) -> bool {
self.repeat.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-isComposing
- fn IsComposing(self) -> bool {
+ fn IsComposing(&self) -> bool {
self.is_composing.get()
}
// https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#widl-KeyboardEvent-getModifierState
- fn GetModifierState(self, keyArg: DOMString) -> bool {
+ fn GetModifierState(&self, keyArg: DOMString) -> bool {
match &*keyArg {
"Ctrl" => self.CtrlKey(),
"Alt" => self.AltKey(),
@@ -840,17 +840,17 @@ impl<'a> KeyboardEventMethods for &'a KeyboardEvent {
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-charCode
- fn CharCode(self) -> u32 {
+ fn CharCode(&self) -> u32 {
self.char_code.get().unwrap_or(0)
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-keyCode
- fn KeyCode(self) -> u32 {
+ fn KeyCode(&self) -> u32 {
self.key_code.get()
}
// https://w3c.github.io/uievents/#widl-KeyboardEvent-which
- fn Which(self) -> u32 {
+ fn Which(&self) -> u32 {
self.char_code.get().unwrap_or(self.KeyCode())
}
}