diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-10-03 11:12:33 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-11-13 11:24:14 -0500 |
commit | bb7074698afbe02776ea02861d795d885ace923e (patch) | |
tree | 9952d33ab95e515843ea1057c2c815340f9690bd /components/script/dom/mouseevent.rs | |
parent | 1c64dabb150da4152957b2c6e16f30d5201328e1 (diff) | |
download | servo-bb7074698afbe02776ea02861d795d885ace923e.tar.gz servo-bb7074698afbe02776ea02861d795d885ace923e.zip |
Add KeyboardEvent stub.
Diffstat (limited to 'components/script/dom/mouseevent.rs')
-rw-r--r-- | components/script/dom/mouseevent.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index a4d3a0a9e09..c65a53217b7 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -21,7 +21,7 @@ use std::default::Default; #[dom_struct] pub struct MouseEvent { - mouseevent: UIEvent, + uievent: UIEvent, screen_x: Cell<i32>, screen_y: Cell<i32>, client_x: Cell<i32>, @@ -43,7 +43,7 @@ impl MouseEventDerived for Event { impl MouseEvent { fn new_inherited() -> MouseEvent { MouseEvent { - mouseevent: UIEvent::new_inherited(MouseEventTypeId), + uievent: UIEvent::new_inherited(MouseEventTypeId), screen_x: Cell::new(0), screen_y: Cell::new(0), client_x: Cell::new(0), @@ -91,13 +91,13 @@ impl MouseEvent { type_: DOMString, init: &MouseEventBinding::MouseEventInit) -> Fallible<Temporary<MouseEvent>> { let event = MouseEvent::new(global.as_window(), type_, - init.parent.parent.bubbles, - init.parent.parent.cancelable, - init.parent.view.root_ref(), - init.parent.detail, + init.parent.parent.parent.bubbles, + init.parent.parent.parent.cancelable, + init.parent.parent.view.root_ref(), + init.parent.parent.detail, init.screenX, init.screenY, - init.clientX, init.clientY, init.ctrlKey, - init.altKey, init.shiftKey, init.metaKey, + init.clientX, init.clientY, init.parent.ctrlKey, + init.parent.altKey, init.parent.shiftKey, init.parent.metaKey, init.button, init.relatedTarget.root_ref()); Ok(event) } @@ -178,6 +178,6 @@ impl<'a> MouseEventMethods for JSRef<'a, MouseEvent> { impl Reflectable for MouseEvent { fn reflector<'a>(&'a self) -> &'a Reflector { - self.mouseevent.reflector() + self.uievent.reflector() } } |