Summary: | WebKit2 should exit auto scrolling mode when losing focus | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brian Weinstein <bweinstein> | ||||||
Component: | WebKit2 | Assignee: | Brian Weinstein <bweinstein> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, aroben, eric, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | Windows 7 | ||||||||
Attachments: |
|
Description
Brian Weinstein
2010-11-08 14:18:03 PST
Created attachment 73285 [details]
[PATCH] Fix
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? (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. Created attachment 76725 [details]
[PATCH] Fix in WebCore
http://trac.webkit.org/changeset/74170 might have broken Leopard Intel Debug (Tests) Looks like this was landed but not closed. |