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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 , m_key(key.key()) | 80 , m_key(key.key()) |
81 , m_location(keyLocationCode(key)) | 81 , m_location(keyLocationCode(key)) |
82 { | 82 { |
83 setPlatformTimeStamp(key.timestamp()); | 83 setPlatformTimeStamp(key.timestamp()); |
84 initLocationModifiers(m_location); | 84 initLocationModifiers(m_location); |
85 } | 85 } |
86 | 86 |
87 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI
nit& initializer) | 87 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI
nit& initializer) |
88 : UIEventWithKeyState(eventType, initializer) | 88 : UIEventWithKeyState(eventType, initializer) |
89 , m_keyIdentifier(initializer.keyIdentifier()) | 89 , m_keyIdentifier(initializer.keyIdentifier()) |
| 90 , m_code(initializer.code()) |
| 91 , m_key(initializer.key()) |
90 , m_location(initializer.location()) | 92 , m_location(initializer.location()) |
91 { | 93 { |
92 if (initializer.repeat()) | 94 if (initializer.repeat()) |
93 m_modifiers |= PlatformEvent::IsAutoRepeat; | 95 m_modifiers |= PlatformEvent::IsAutoRepeat; |
94 initLocationModifiers(initializer.location()); | 96 initLocationModifiers(initializer.location()); |
95 } | 97 } |
96 | 98 |
97 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool
cancelable, AbstractView* view, | 99 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, bool canBubble, bool
cancelable, AbstractView* view, |
98 const String& keyIdentifier, const String& code, const String& key, unsigned
location, PlatformEvent::Modifiers modifiers) | 100 const String& keyIdentifier, const String& code, const String& key, unsigned
location, PlatformEvent::Modifiers modifiers) |
99 : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, modifiers,
InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()) | 101 : UIEventWithKeyState(eventType, canBubble, cancelable, view, 0, modifiers,
InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()) |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 { | 213 { |
212 } | 214 } |
213 | 215 |
214 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c
onst | 216 bool KeyboardEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) c
onst |
215 { | 217 { |
216 // Make sure not to return true if we already took default action while hand
ling the event. | 218 // Make sure not to return true if we already took default action while hand
ling the event. |
217 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH
andled(); | 219 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH
andled(); |
218 } | 220 } |
219 | 221 |
220 } // namespace blink | 222 } // namespace blink |
OLD | NEW |