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