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

Unified Diff: ui/aura/window_tree_host.cc

Issue 1209913002: InputMethod should stop TextInputClient::InsertChar/InsertText calls when the event is stopped prop… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures. Created 5 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: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 2beb0ea19d8992f57ef1ce44e43caa6b64a3cee7..c76f551872929f78f500283cf73bd144e03f3744 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -202,7 +202,7 @@ bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) {
ui::EventDispatchDetails details =
event_processor()->OnEventFromSource(&copied_event);
DCHECK(!details.dispatcher_destroyed);
- return copied_event.handled();
+ return copied_event.stopped_propagation();
}
void WindowTreeHost::Show() {
@@ -313,13 +313,11 @@ ui::EventProcessor* WindowTreeHost::GetEventProcessor() {
ui::EventDispatchDetails WindowTreeHost::DeliverEventToProcessor(
ui::Event* event) {
if (event->IsKeyEvent()) {
- if (GetInputMethod()->DispatchKeyEvent(
- *static_cast<ui::KeyEvent*>(event))) {
- event->StopPropagation();
- // TODO(shuchen): pass around the EventDispatchDetails from
- // DispatchKeyEventPostIME instead of creating new from here.
- return ui::EventDispatchDetails();
- }
+ GetInputMethod()->DispatchKeyEvent(*static_cast<ui::KeyEvent*>(event));
+ event->StopPropagation();
+ // TODO(shuchen): pass around the EventDispatchDetails from
+ // DispatchKeyEventPostIME instead of creating new from here.
+ return ui::EventDispatchDetails();
}
return ui::EventSource::DeliverEventToProcessor(event);
}

Powered by Google App Engine
This is Rietveld 408576698