Clean up the cast calls

This commit is contained in:
Anthony Ramine 2015-10-07 14:55:02 +02:00
parent 13ea3ac413
commit 68014af78e
66 changed files with 412 additions and 718 deletions

View file

@ -762,13 +762,12 @@ impl KeyboardEventMethods for KeyboardEvent {
_modifiersListArg: DOMString,
repeat: bool,
_locale: DOMString) {
let event = self.upcast::<Event>();
if event.dispatching() {
if self.upcast::<Event>().dispatching() {
return;
}
let uievent = self.upcast::<UIEvent>();
uievent.InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0);
self.upcast::<UIEvent>()
.InitUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, 0);
*self.key_string.borrow_mut() = keyArg;
self.location.set(locationArg);
self.repeat.set(repeat);