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

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 8895026: Revert 96912 - Always call setActive() in WebViewImpl::setFocus(), (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 9 years 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/WebKit/chromium/WebKit.gypi ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 102682)
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy)
@@ -1423,8 +1423,10 @@
void WebViewImpl::setFocus(bool enable)
{
m_page->focusController()->setFocused(enable);
- m_page->focusController()->setActive(enable);
if (enable) {
+ // Note that we don't call setActive() when disabled as this cause extra
+ // focus/blur events to be dispatched.
+ m_page->focusController()->setActive(true);
RefPtr<Frame> focusedFrame = m_page->focusController()->focusedFrame();
if (focusedFrame) {
Node* focusedNode = focusedFrame->document()->focusedNode();
« no previous file with comments | « Source/WebKit/chromium/WebKit.gypi ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698