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

Unified Diff: third_party/WebKit/Source/core/page/FocusController.cpp

Issue 2474323002: Implement WebContentsViewChildFrame::TakeFocus. (Closed)
Patch Set: Remove logging code. Created 3 years, 11 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
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FocusController.cpp
diff --git a/third_party/WebKit/Source/core/page/FocusController.cpp b/third_party/WebKit/Source/core/page/FocusController.cpp
index de9da91658722ce16c2e4d1f9ba55da8cf1a3666..28897fcea19a17f418c11d41059ae6d187670d50 100644
--- a/third_party/WebKit/Source/core/page/FocusController.cpp
+++ b/third_party/WebKit/Source/core/page/FocusController.cpp
@@ -855,7 +855,9 @@ void FocusController::setFocused(bool focused) {
if (!m_isFocused && focusedOrMainFrame()->isLocalFrame())
toLocalFrame(focusedOrMainFrame())->eventHandler().stopAutoscroll();
- if (!m_focusedFrame)
+ // Do not set a focused frame when being unfocused. This might reset
+ // m_isFocused to true.
+ if (!m_focusedFrame && m_isFocused)
dcheng 2017/01/12 10:19:21 This seems like a reasonable change to me, but I'm
avallee 2017/01/12 20:00:23 See the conversation here: https://codereview.chro
dcheng 2017/01/20 07:02:38 Would it be better to just pass false for notifyEm
avallee 2017/01/20 14:19:11 Oh, i thought I had previously linked to the spot
setFocusedFrame(m_page->mainFrame());
// setFocusedFrame above might reject to update m_focusedFrame, or
« content/common/view_messages.h ('K') | « content/common/view_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698