RESOLVED FIXED 49209
WebKit2 should exit auto scrolling mode when losing focus
https://bugs.webkit.org/show_bug.cgi?id=49209
Summary WebKit2 should exit auto scrolling mode when losing focus
Brian Weinstein
Reported 2010-11-08 14:18:03 PST
We do not exit pan scrolling mode when switching tabs in WebKit2. In WebKit1, this was fixed by http://trac.webkit.org/changeset/50007, but the bug still exists in WebKit2. Steps to reproduce: 1) Open two tabs, one that can scroll 2) Start panscrolling in the tab that can scroll 3) Switch focus to the other tab. The pan scrolling icon stays active, even though it shouldn't.
Attachments
[PATCH] Fix (1.55 KB, patch)
2010-11-08 14:25 PST, Brian Weinstein
no flags
[PATCH] Fix in WebCore (2.13 KB, patch)
2010-12-15 18:20 PST, Brian Weinstein
jhoneycutt: review+
Brian Weinstein
Comment 1 2010-11-08 14:25:05 PST
Created attachment 73285 [details] [PATCH] Fix
Adam Roben (:aroben)
Comment 2 2010-11-08 14:27:57 PST
Comment on attachment 73285 [details] [PATCH] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=73285&action=review Is it possible to make a test for this using TestWebKitAPI? You'd have to add code that can simulate a middle-click, and a way to make the WebView lose focus, and a way to detect whether the autoscroll timer was stopped. > WebKit2/WebProcess/WebPage/WebPage.cpp:671 > + FocusController* focusController = m_page->focusController(); > + if (!isFocused) > + focusController->focusedOrMainFrame()->eventHandler()->stopAutoscrollTimer(); > + focusController->setFocused(isFocused); Should this code be in FocusController::setFocused instead?
Brian Weinstein
Comment 3 2010-11-08 14:44:59 PST
(In reply to comment #2) > (From update of attachment 73285 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=73285&action=review > > Is it possible to make a test for this using TestWebKitAPI? You'd have to add code that can simulate a middle-click, and a way to make the WebView lose focus, and a way to detect whether the autoscroll timer was stopped. If it was a windows specific test, I could make sure the autoscroll timer was stopped by checking the scroll position before and after the timer was supposed to be killed, but I don't know if it's possible to test the gaining and losing focus of the web view. > > > WebKit2/WebProcess/WebPage/WebPage.cpp:671 > > + FocusController* focusController = m_page->focusController(); > > + if (!isFocused) > > + focusController->focusedOrMainFrame()->eventHandler()->stopAutoscrollTimer(); > > + focusController->setFocused(isFocused); > > Should this code be in FocusController::setFocused instead? No reason it shouldn't be, then it wouldn't be something that would need to be duplicated across WebKit platforms.
Brian Weinstein
Comment 4 2010-12-15 18:20:53 PST
Created attachment 76725 [details] [PATCH] Fix in WebCore
WebKit Review Bot
Comment 5 2010-12-16 15:37:48 PST
http://trac.webkit.org/changeset/74170 might have broken Leopard Intel Debug (Tests)
Eric Seidel (no email)
Comment 6 2010-12-17 16:34:10 PST
Looks like this was landed but not closed.
Note You need to log in before you can comment on or make changes to this bug.