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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 79843002: Update accept_return_character_ for synthetic events too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 0fdd811907127ce5e2e23d10735b617a7831edfe..47d886085c4da0e8aa0f187474920bab0a3e69db 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2618,6 +2618,10 @@ void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
host_->Shutdown();
}
} else {
+ // Accept return key character events between its press and release events.
+ if (event->key_code() == ui::VKEY_RETURN)
+ accept_return_character_ = event->type() == ui::ET_KEY_PRESSED;
+
// We don't have to communicate with an input method here.
if (!event->HasNativeEvent()) {
NativeWebKeyboardEvent webkit_event(
@@ -2628,8 +2632,6 @@ void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
ui::EventTimeForNow().InSecondsF());
host_->ForwardKeyboardEvent(webkit_event);
} else {
- if (event->key_code() == ui::VKEY_RETURN)
- accept_return_character_ = event->type() == ui::ET_KEY_PRESSED;
NativeWebKeyboardEvent webkit_event(event);
host_->ForwardKeyboardEvent(webkit_event);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698