| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 break; | 186 break; |
| 187 case KeyboardEvent::DOM_KEY_LOCATION_LEFT: | 187 case KeyboardEvent::DOM_KEY_LOCATION_LEFT: |
| 188 m_modifiers |= PlatformEvent::IsLeft; | 188 m_modifiers |= PlatformEvent::IsLeft; |
| 189 break; | 189 break; |
| 190 case KeyboardEvent::DOM_KEY_LOCATION_RIGHT: | 190 case KeyboardEvent::DOM_KEY_LOCATION_RIGHT: |
| 191 m_modifiers |= PlatformEvent::IsRight; | 191 m_modifiers |= PlatformEvent::IsRight; |
| 192 break; | 192 break; |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 PassRefPtrWillBeRawPtr<EventDispatchMediator> KeyboardEvent::createMediator() | |
| 197 { | |
| 198 return KeyboardEventDispatchMediator::create(this); | |
| 199 } | |
| 200 | |
| 201 DEFINE_TRACE(KeyboardEvent) | 196 DEFINE_TRACE(KeyboardEvent) |
| 202 { | 197 { |
| 203 UIEventWithKeyState::trace(visitor); | 198 UIEventWithKeyState::trace(visitor); |
| 204 } | 199 } |
| 205 | 200 |
| 206 PassRefPtrWillBeRawPtr<KeyboardEventDispatchMediator> KeyboardEventDispatchMedia
tor::create(PassRefPtrWillBeRawPtr<KeyboardEvent> event) | |
| 207 { | |
| 208 return adoptRefWillBeNoop(new KeyboardEventDispatchMediator(event)); | |
| 209 } | |
| 210 | |
| 211 KeyboardEventDispatchMediator::KeyboardEventDispatchMediator(PassRefPtrWillBeRaw
Ptr<KeyboardEvent> event) | |
| 212 : EventDispatchMediator(event) | |
| 213 { | |
| 214 } | |
| 215 | |
| 216 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c
onst | |
| 217 { | |
| 218 // Make sure not to return true if we already took default action while hand
ling the event. | |
| 219 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH
andled(); | |
| 220 } | |
| 221 | |
| 222 } // namespace blink | 201 } // namespace blink |
| OLD | NEW |