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, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. |
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 29 matching lines...) Expand all Loading... | |
40 unsigned keyLocation; | 40 unsigned keyLocation; |
41 bool ctrlKey; | 41 bool ctrlKey; |
42 bool altKey; | 42 bool altKey; |
43 bool shiftKey; | 43 bool shiftKey; |
44 bool metaKey; | 44 bool metaKey; |
45 }; | 45 }; |
46 | 46 |
47 class KeyboardEvent : public UIEventWithKeyState { | 47 class KeyboardEvent : public UIEventWithKeyState { |
48 public: | 48 public: |
49 enum KeyLocationCode { | 49 enum KeyLocationCode { |
50 DOMKeyLocationStandard = 0x00, | 50 DOM_KEY_LOCATION_STANDARD = 0x00, |
51 DOMKeyLocationLeft = 0x01, | 51 DOM_KEY_LOCATION_LEFT = 0x01, |
52 DOMKeyLocationRight = 0x02, | 52 DOM_KEY_LOCATION_RIGHT = 0x02, |
53 DOMKeyLocationNumpad = 0x03 | 53 DOM_KEY_LOCATION_NUMPAD = 0x03, |
54 DOM_KEY_LOCATION_MOBILE = 0x04, | |
Mike West
2013/07/29 12:40:24
Nit: It might be worth adding the FIXME comment he
do-not-use
2013/07/29 12:49:11
Will do
| |
55 DOM_KEY_LOCATION_JOYSTICK = 0x05 | |
54 }; | 56 }; |
55 | 57 |
56 static PassRefPtr<KeyboardEvent> create() | 58 static PassRefPtr<KeyboardEvent> create() |
57 { | 59 { |
58 return adoptRef(new KeyboardEvent); | 60 return adoptRef(new KeyboardEvent); |
59 } | 61 } |
60 | 62 |
61 static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platfor mEvent, AbstractView* view) | 63 static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platfor mEvent, AbstractView* view) |
62 { | 64 { |
63 return adoptRef(new KeyboardEvent(platformEvent, view)); | 65 return adoptRef(new KeyboardEvent(platformEvent, view)); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 | 126 |
125 inline KeyboardEvent* toKeyboardEvent(Event* event) | 127 inline KeyboardEvent* toKeyboardEvent(Event* event) |
126 { | 128 { |
127 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isKeyboardEvent()); | 129 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isKeyboardEvent()); |
128 return static_cast<KeyboardEvent*>(event); | 130 return static_cast<KeyboardEvent*>(event); |
129 } | 131 } |
130 | 132 |
131 } // namespace WebCore | 133 } // namespace WebCore |
132 | 134 |
133 #endif // KeyboardEvent_h | 135 #endif // KeyboardEvent_h |
OLD | NEW |