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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 308813003: Merge 174628 "DevTools: Focus/blur events that are triggered by ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1985/
Patch Set: Created 6 years, 7 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 | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsAgentImpl.cpp
===================================================================
--- Source/web/WebDevToolsAgentImpl.cpp (revision 175115)
+++ Source/web/WebDevToolsAgentImpl.cpp (working copy)
@@ -44,6 +44,7 @@
#include "core/frame/Settings.h"
#include "core/inspector/InjectedScriptHost.h"
#include "core/inspector/InspectorController.h"
+#include "core/page/FocusController.h"
#include "core/page/Page.h"
#include "core/rendering/RenderView.h"
#include "platform/JSONValues.h"
@@ -559,6 +560,9 @@
void WebDevToolsAgentImpl::dispatchKeyEvent(const PlatformKeyboardEvent& event)
{
+ if (!m_webViewImpl->page()->focusController().isFocused())
+ m_webViewImpl->setFocus(true);
+
m_generatingEvent = true;
WebKeyboardEvent webEvent = WebKeyboardEventBuilder(event);
if (!webEvent.keyIdentifier[0] && webEvent.type != WebInputEvent::Char)
@@ -569,6 +573,9 @@
void WebDevToolsAgentImpl::dispatchMouseEvent(const PlatformMouseEvent& event)
{
+ if (!m_webViewImpl->page()->focusController().isFocused())
+ m_webViewImpl->setFocus(true);
+
m_generatingEvent = true;
WebMouseEvent webEvent = WebMouseEventBuilder(m_webViewImpl->mainFrameImpl()->frameView(), event);
m_webViewImpl->handleInputEvent(webEvent);
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698