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

Unified Diff: content/browser/devtools/protocol/input_handler.cc

Issue 2656903005: ChromeDriver: Handle key events properly on Mac (Closed)
Patch Set: fixes Created 3 years, 5 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 | « content/browser/BUILD.gn ('k') | content/browser/devtools/protocol/native_input_event_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/input_handler.cc
diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc
index cc419a3523f453021293befbc3807a5f073f1e75..1eaff27973f7755a24a03ac0484c6d87a329b731 100644
--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -12,6 +12,7 @@
#include "base/trace_event/trace_event.h"
#include "cc/output/compositor_frame_metadata.h"
#include "content/browser/devtools/devtools_session.h"
+#include "content/browser/devtools/protocol/native_input_event_builder.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/common/input/synthetic_pinch_gesture_params.h"
@@ -298,7 +299,7 @@ void InputHandler::DispatchKeyEvent(
auto_repeat.fromMaybe(false),
is_keypad.fromMaybe(false)),
GetEventTimeTicks(std::move(timestamp)));
- event.skip_in_browser = true;
+
if (!SetKeyboardEventText(event.text, std::move(text))) {
callback->sendFailure(Response::InvalidParams("Invalid 'text' parameter"));
return;
@@ -331,7 +332,7 @@ void InputHandler::DispatchKeyEvent(
callback->sendFailure(Response::InternalError());
return;
}
-
+ event.os_event = NativeInputEventBuilder::CreateEvent(event);
host_->GetRenderWidgetHost()->Focus();
input_queued_ = false;
pending_key_callbacks_.push_back(std::move(callback));
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/devtools/protocol/native_input_event_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698