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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 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
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('k') | Source/core/page/FocusDirection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 1ae5a1ebcfd86396700172d427e4b05145cf82e2..579e348fd897ec984e501273bddee70c725094cd 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -2080,7 +2080,7 @@ bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targe
// if the page already set it (e.g., by canceling default behavior).
if (Page* page = m_frame->page()) {
if (node && node->isMouseFocusable()) {
- if (!page->focusController()->setFocusedNode(node, m_frame))
+ if (!page->focusController()->setFocusedNode(node, m_frame, FocusDirectionMouse))
swallowEvent = true;
} else if (!node || !node->focused()) {
if (!page->focusController()->setFocusedNode(0, m_frame))
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('k') | Source/core/page/FocusDirection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698