| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) | 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) |
| 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 return true; | 200 return true; |
| 201 } | 201 } |
| 202 | 202 |
| 203 int KeyboardEvent::which() const | 203 int KeyboardEvent::which() const |
| 204 { | 204 { |
| 205 // Netscape's "which" returns a virtual key code for keydown and keyup, and
a character code for keypress. | 205 // Netscape's "which" returns a virtual key code for keydown and keyup, and
a character code for keypress. |
| 206 // That's exactly what IE's "keyCode" returns. So they are the same for keyb
oard events. | 206 // That's exactly what IE's "keyCode" returns. So they are the same for keyb
oard events. |
| 207 return keyCode(); | 207 return keyCode(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void KeyboardEvent::trace(Visitor* visitor) | |
| 211 { | |
| 212 UIEventWithKeyState::trace(visitor); | |
| 213 } | |
| 214 | |
| 215 PassRefPtr<KeyboardEventDispatchMediator> KeyboardEventDispatchMediator::create(
PassRefPtr<KeyboardEvent> event) | 210 PassRefPtr<KeyboardEventDispatchMediator> KeyboardEventDispatchMediator::create(
PassRefPtr<KeyboardEvent> event) |
| 216 { | 211 { |
| 217 return adoptRef(new KeyboardEventDispatchMediator(event)); | 212 return adoptRef(new KeyboardEventDispatchMediator(event)); |
| 218 } | 213 } |
| 219 | 214 |
| 220 KeyboardEventDispatchMediator::KeyboardEventDispatchMediator(PassRefPtr<Keyboard
Event> event) | 215 KeyboardEventDispatchMediator::KeyboardEventDispatchMediator(PassRefPtr<Keyboard
Event> event) |
| 221 : EventDispatchMediator(event) | 216 : EventDispatchMediator(event) |
| 222 { | 217 { |
| 223 } | 218 } |
| 224 | 219 |
| 225 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c
onst | 220 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) c
onst |
| 226 { | 221 { |
| 227 // Make sure not to return true if we already took default action while hand
ling the event. | 222 // Make sure not to return true if we already took default action while hand
ling the event. |
| 228 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default
Handled(); | 223 return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->default
Handled(); |
| 229 } | 224 } |
| 230 | 225 |
| 231 } // namespace blink | 226 } // namespace blink |
| OLD | NEW |