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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key, AbstractView* view) | 76 KeyboardEvent::KeyboardEvent(const WebKeyboardEvent& key, AbstractView* view) |
77 : UIEventWithKeyState( | 77 : UIEventWithKeyState( |
78 eventTypeForKeyboardEventType(key.type), | 78 eventTypeForKeyboardEventType(key.type), |
79 true, | 79 true, |
80 true, | 80 true, |
81 view, | 81 view, |
82 0, | 82 0, |
83 static_cast<PlatformEvent::Modifiers>(key.modifiers), | 83 static_cast<PlatformEvent::Modifiers>(key.modifiers), |
84 key.timeStampSeconds, | 84 key.timeStampSeconds, |
85 InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()), | 85 InputDeviceCapabilities::doesntFireTouchEventsSourceCapabilities()), |
86 m_keyEvent(wrapUnique(new WebKeyboardEvent(key))) | 86 m_keyEvent(wrapUnique(new WebKeyboardEvent(key))), |
87 // TODO: BUG482880 Fix this initialization to lazy initialization. | 87 // TODO(crbug.com/482880): Fix this initialization to lazy initialization. |
88 , | |
89 m_code(Platform::current()->domCodeStringFromEnum(key.domCode)), | 88 m_code(Platform::current()->domCodeStringFromEnum(key.domCode)), |
90 m_key(Platform::current()->domKeyStringFromEnum(key.domKey)), | 89 m_key(Platform::current()->domKeyStringFromEnum(key.domKey)), |
91 m_location(keyLocationCode(key)) { | 90 m_location(keyLocationCode(key)) { |
92 initLocationModifiers(m_location); | 91 initLocationModifiers(m_location); |
93 } | 92 } |
94 | 93 |
95 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, | 94 KeyboardEvent::KeyboardEvent(const AtomicString& eventType, |
96 const KeyboardEventInit& initializer) | 95 const KeyboardEventInit& initializer) |
97 : UIEventWithKeyState(eventType, initializer), | 96 : UIEventWithKeyState(eventType, initializer), |
98 m_code(initializer.code()), | 97 m_code(initializer.code()), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 m_modifiers |= PlatformEvent::IsRight; | 209 m_modifiers |= PlatformEvent::IsRight; |
211 break; | 210 break; |
212 } | 211 } |
213 } | 212 } |
214 | 213 |
215 DEFINE_TRACE(KeyboardEvent) { | 214 DEFINE_TRACE(KeyboardEvent) { |
216 UIEventWithKeyState::trace(visitor); | 215 UIEventWithKeyState::trace(visitor); |
217 } | 216 } |
218 | 217 |
219 } // namespace blink | 218 } // namespace blink |
OLD | NEW |