Index: third_party/WebKit/Source/core/html/HTMLButtonElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp b/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp |
index dafd505859ca30632298034b5b5eab6c0c43f13d..5c1ac88ad44e74fe4a22e6b386e65454fc20d055 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp |
@@ -126,7 +126,7 @@ void HTMLButtonElement::defaultEventHandler(Event* event) |
} |
if (event->isKeyboardEvent()) { |
- if (event->type() == EventTypeNames::keydown && toKeyboardEvent(event)->keyIdentifier() == "U+0020") { |
+ if (event->type() == EventTypeNames::keydown && toKeyboardEvent(event)->key() == " ") { |
setActive(true); |
// No setDefaultHandled() - IE dispatches a keypress in this case. |
return; |
@@ -143,7 +143,7 @@ void HTMLButtonElement::defaultEventHandler(Event* event) |
return; |
} |
} |
- if (event->type() == EventTypeNames::keyup && toKeyboardEvent(event)->keyIdentifier() == "U+0020") { |
+ if (event->type() == EventTypeNames::keyup && toKeyboardEvent(event)->key() == " ") { |
if (active()) |
dispatchSimulatedClick(event); |
event->setDefaultHandled(); |