Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Side by Side Diff: Source/core/dom/KeyboardEvent.h

Issue 20986003: Define DOM_KEY_LOCATION_* constants on KeyboardEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nits Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 // FIXME: The following values are not supported yet (crbug.com/265446)
55 DOM_KEY_LOCATION_MOBILE = 0x04,
ojan 2013/07/29 22:09:07 I think we should pushback on the spec here. What
56 DOM_KEY_LOCATION_JOYSTICK = 0x05
ojan 2013/07/29 22:09:07 Same here. They gamepad API is for joysticks. Not
54 }; 57 };
55 58
56 static PassRefPtr<KeyboardEvent> create() 59 static PassRefPtr<KeyboardEvent> create()
57 { 60 {
58 return adoptRef(new KeyboardEvent); 61 return adoptRef(new KeyboardEvent);
59 } 62 }
60 63
61 static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platfor mEvent, AbstractView* view) 64 static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platfor mEvent, AbstractView* view)
62 { 65 {
63 return adoptRef(new KeyboardEvent(platformEvent, view)); 66 return adoptRef(new KeyboardEvent(platformEvent, view));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 127
125 inline KeyboardEvent* toKeyboardEvent(Event* event) 128 inline KeyboardEvent* toKeyboardEvent(Event* event)
126 { 129 {
127 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isKeyboardEvent()); 130 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isKeyboardEvent());
128 return static_cast<KeyboardEvent*>(event); 131 return static_cast<KeyboardEvent*>(event);
129 } 132 }
130 133
131 } // namespace WebCore 134 } // namespace WebCore
132 135
133 #endif // KeyboardEvent_h 136 #endif // KeyboardEvent_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/script-tests/keydown-numpad-keys.js ('k') | Source/core/dom/KeyboardEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698