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

Unified Diff: third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove initialization of the view Created 4 years, 6 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
Index: third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp b/third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp
index 4b0363af07f99393d11f4b988bccc18980b78529..b789bae5957bf7e065255e2de2ee4d87e2f738bd 100644
--- a/third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp
+++ b/third_party/WebKit/Source/core/html/forms/KeyboardClickableInputTypeView.cpp
@@ -40,8 +40,8 @@ using namespace HTMLNames;
void KeyboardClickableInputTypeView::handleKeydownEvent(KeyboardEvent* event)
{
- const String& key = event->keyIdentifier();
- if (key == "U+0020") {
+ const String& key = event->key();
+ if (key == " ") {
element().setActive(true);
// No setDefaultHandled(), because IE dispatches a keypress in this case
// and the caller will only dispatch a keypress if we don't call setDefaultHandled().
@@ -64,8 +64,8 @@ void KeyboardClickableInputTypeView::handleKeypressEvent(KeyboardEvent* event)
void KeyboardClickableInputTypeView::handleKeyupEvent(KeyboardEvent* event)
{
- const String& key = event->keyIdentifier();
- if (key != "U+0020")
+ const String& key = event->key();
+ if (key != " ")
return;
// Simulate mouse click for spacebar for button types.
dispatchSimulatedClickIfActive(event);

Powered by Google App Engine
This is Rietveld 408576698