Chromium Code Reviews| 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 |