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

Unified Diff: Source/core/events/KeyboardEvent.h

Issue 23444080: Implement KeyboardEvent.repeat attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/events/keyboardevent-repeat-expected.txt ('k') | Source/core/events/KeyboardEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/KeyboardEvent.h
diff --git a/Source/core/events/KeyboardEvent.h b/Source/core/events/KeyboardEvent.h
index 7ee78e58bc17d43c8932a76d062840b41b2f0f7b..f11901e06322eb94e1efecd9eeb77e168711702d 100644
--- a/Source/core/events/KeyboardEvent.h
+++ b/Source/core/events/KeyboardEvent.h
@@ -42,6 +42,7 @@ struct KeyboardEventInit : public UIEventInit {
bool altKey;
bool shiftKey;
bool metaKey;
+ bool repeat;
};
class KeyboardEvent : public UIEventWithKeyState {
@@ -93,6 +94,7 @@ public:
int keyCode() const; // key code for keydown and keyup, character for keypress
int charCode() const; // character code for keypress, 0 for keydown and keyup
+ bool repeat() const { return m_isAutoRepeat; }
virtual const AtomicString& interfaceName() const;
virtual bool isKeyboardEvent() const;
@@ -110,6 +112,7 @@ private:
String m_keyIdentifier;
unsigned m_location;
bool m_altGraphKey : 1;
+ bool m_isAutoRepeat : 1;
};
KeyboardEvent* findKeyboardEvent(Event*);
« no previous file with comments | « LayoutTests/fast/events/keyboardevent-repeat-expected.txt ('k') | Source/core/events/KeyboardEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698