RESOLVED FIXED 110006
Allow UI clients to handle vertical wheel events
https://bugs.webkit.org/show_bug.cgi?id=110006
Summary Allow UI clients to handle vertical wheel events
Conrad Shultz
Reported 2013-02-16 00:38:54 PST
Consistent with existing behavior in the horizontal direction, UI clients should be able to opt-in to handle vertical scroll wheel events that would otherwise trigger rubber banding. Three pieces are seemingly needed: 1) Selective control over rubber banding in the vertical direction. 2) Extension (to the vertical direction) of the concept of page "pinning." 3) Coupling of #1 and #2 in ScrollingTree::willWheelEventStartSwipeGesture(), allowing the swipe gesture pathway to be activated selectively in the vertical direction, culminating in a didNotHandleWheelEvent() message being sent to the UI client.
Attachments
Patch (20.58 KB, patch)
2013-02-18 21:13 PST, Conrad Shultz
webkit-ews: commit-queue-
Patch (21.01 KB, patch)
2013-02-19 02:05 PST, Conrad Shultz
no flags
Patch (21.13 KB, patch)
2013-02-19 11:02 PST, Conrad Shultz
no flags
Patch (21.14 KB, patch)
2013-02-19 11:09 PST, Conrad Shultz
no flags
Patch (24.79 KB, patch)
2013-02-19 14:36 PST, Conrad Shultz
no flags
Patch (25.72 KB, patch)
2013-02-19 16:44 PST, Conrad Shultz
no flags
Patch (25.73 KB, patch)
2013-02-19 16:54 PST, Conrad Shultz
no flags
Conrad Shultz
Comment 1 2013-02-18 21:13:50 PST
Early Warning System Bot
Comment 2 2013-02-18 21:28:06 PST
EFL EWS Bot
Comment 3 2013-02-18 21:52:36 PST
Build Bot
Comment 4 2013-02-18 22:08:52 PST
Comment on attachment 188981 [details] Patch Attachment 188981 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16616469
Conrad Shultz
Comment 5 2013-02-19 00:12:53 PST
Comment on attachment 188981 [details] Patch Missing a guard, will resubmit.
Conrad Shultz
Comment 6 2013-02-19 02:05:06 PST
Early Warning System Bot
Comment 7 2013-02-19 02:16:46 PST
Build Bot
Comment 8 2013-02-19 04:19:21 PST
Comment on attachment 189029 [details] Patch Attachment 189029 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://queues.webkit.org/results/16615678
Conrad Shultz
Comment 9 2013-02-19 11:02:27 PST
Conrad Shultz
Comment 10 2013-02-19 11:09:24 PST
Tim Horton
Comment 11 2013-02-19 13:18:43 PST
Comment on attachment 189118 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189118&action=review > Source/WebCore/page/Page.h:279 > +#if ENABLE(THREADED_SCROLLING) > + bool rubberBandsAtBottom() const; > + void setRubberBandsAtBottom(bool); > + bool rubberBandsAtTop() const; > + void setRubberBandsAtTop(bool); > +#endif Vaguely interesting that you're adding these for the vertical case but parallels don't exist for the horizontal case. > Source/WebKit2/UIProcess/API/C/WKPage.cpp:410 > + return toImpl(pageRef)->setRubberBandsAtBottom(rubberBandsAtBottom); return with a value in a void function? > Source/WebKit2/UIProcess/API/C/WKPage.cpp:426 > + return toImpl(pageRef)->setRubberBandsAtTop(rubberBandsAtTop); ditto.
Conrad Shultz
Comment 12 2013-02-19 13:25:06 PST
(In reply to comment #11) > (From update of attachment 189118 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=189118&action=review > > > Source/WebCore/page/Page.h:279 > > +#if ENABLE(THREADED_SCROLLING) > > + bool rubberBandsAtBottom() const; > > + void setRubberBandsAtBottom(bool); > > + bool rubberBandsAtTop() const; > > + void setRubberBandsAtTop(bool); > > +#endif > > Vaguely interesting that you're adding these for the vertical case but parallels don't exist for the horizontal case. The horizontal case isn't as important since WebKit will already send back didNotHandleWheelEvent() messages in that case when appropriate. > > > Source/WebKit2/UIProcess/API/C/WKPage.cpp:410 > > + return toImpl(pageRef)->setRubberBandsAtBottom(rubberBandsAtBottom); > > return with a value in a void function? > > > Source/WebKit2/UIProcess/API/C/WKPage.cpp:426 > > + return toImpl(pageRef)->setRubberBandsAtTop(rubberBandsAtTop); > > ditto. I am surprised that these compiled without complaint; fixed. Thanks!
Beth Dakin
Comment 13 2013-02-19 13:31:59 PST
Comment on attachment 189118 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189118&action=review > Source/WebCore/page/Page.cpp:70 > +#include "ScrollingTree.h" I think we should avoid including ScrollingTree from within Page. See comments below. > Source/WebCore/page/Page.cpp:822 > + return m_scrollingCoordinator->scrollingTree()->rubberBandsAtBottom(); Even though it's more overheard, you should add a function to ScrollingCoordinator to do this. Right now ScrollingCoordinator is the only thing that interfaces with the ScrollingTree and the scrolling thread, and I think we want to keep it that way. For example, see ScrollingCoordinatorMac::isRubberBandInProgress()… ScrollingCoordinator interfaces with ScrollingTree and then the rest of the code in WebCore just interfaces with ScrollingCoordinator. Then you won't need to put this inside and ifdef either since you can put a dummy implementation in the cross-platform ScrollingCoordinator.h and then override it in ScrollingCoordinatorMac. > Source/WebCore/page/Page.cpp:827 > + m_scrollingCoordinator->scrollingTree()->setRubberBandsAtBottom(rubberBandsAtBottom); Same here. > Source/WebCore/page/Page.cpp:832 > + return m_scrollingCoordinator->scrollingTree()->rubberBandsAtTop(); Same here. > Source/WebCore/page/Page.cpp:837 > + m_scrollingCoordinator->scrollingTree()->setRubberBandsAtTop(rubberBandsAtTop); Same here.
Conrad Shultz
Comment 14 2013-02-19 13:37:57 PST
> > Source/WebCore/page/Page.cpp:70 > > +#include "ScrollingTree.h" > > I think we should avoid including ScrollingTree from within Page. See comments below. > > > Source/WebCore/page/Page.cpp:822 > > + return m_scrollingCoordinator->scrollingTree()->rubberBandsAtBottom(); > > Even though it's more overheard, you should add a function to ScrollingCoordinator to do this. Right now ScrollingCoordinator is the only thing that interfaces with the ScrollingTree and the scrolling thread, and I think we want to keep it that way. For example, see ScrollingCoordinatorMac::isRubberBandInProgress()… ScrollingCoordinator interfaces with ScrollingTree and then the rest of the code in WebCore just interfaces with ScrollingCoordinator. Then you won't need to put this inside and ifdef either since you can put a dummy implementation in the cross-platform ScrollingCoordinator.h and then override it in ScrollingCoordinatorMac. That sounds much better, will change.
Conrad Shultz
Comment 15 2013-02-19 14:36:24 PST
Beth Dakin
Comment 16 2013-02-19 14:44:49 PST
Comment on attachment 189166 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189166&action=review This is very close! My only comment this time is that you don't need to use the threaded-scrolling ifdef so much now that you have done the nice ScrollingCoordinator/ScrollingCoordinatorMac implementations of the rubberbanding functions. Eventually I stopped commenting on individual spots, because I think you don't need the ifdefs anywhere, actually. > Source/WebCore/page/Page.cpp:818 > +#if ENABLE(THREADED_SCROLLING) Don't need this ifdef. > Source/WebCore/page/Page.h:274 > +#if ENABLE(THREADED_SCROLLING) Nor this one. > Source/WebKit2/UIProcess/API/C/WKPage.cpp:400 > +#if ENABLE(THREADED_SCROLLING) I don't think you need these ones in WKPage either. The API is a no-op non-threaded-scrolling mode, but that doesn't mean it has to be ifdef'ed out. > Source/WebKit2/UIProcess/WebPageProxy.cpp:229 > +#if ENABLE(THREADED_SCROLLING) And same here.
Conrad Shultz
Comment 17 2013-02-19 16:44:11 PST
Conrad Shultz
Comment 18 2013-02-19 16:45:49 PST
(In reply to comment #16) > (From update of attachment 189166 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=189166&action=review > > This is very close! My only comment this time is that you don't need to use the threaded-scrolling ifdef so much now that you have done the nice ScrollingCoordinator/ScrollingCoordinatorMac implementations of the rubberbanding functions. Eventually I stopped commenting on individual spots, because I think you don't need the ifdefs anywhere, actually. Thanks, I posted a revised patch.
Tim Horton
Comment 19 2013-02-19 16:47:43 PST
Comment on attachment 189203 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=189203&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.messages.in:145 > + SetRubberBandsAtBottom(bool rubberBandsAtTop) Typo in argument name.
Conrad Shultz
Comment 20 2013-02-19 16:54:52 PST
Conrad Shultz
Comment 21 2013-02-19 16:56:03 PST
(In reply to comment #19) > (From update of attachment 189203 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=189203&action=review > > > Source/WebKit2/WebProcess/WebPage/WebPage.messages.in:145 > > + SetRubberBandsAtBottom(bool rubberBandsAtTop) > > Typo in argument name. Oops, fixed.
WebKit Review Bot
Comment 22 2013-02-19 17:44:29 PST
Comment on attachment 189205 [details] Patch Clearing flags on attachment: 189205 Committed r143418: <http://trac.webkit.org/changeset/143418>
WebKit Review Bot
Comment 23 2013-02-19 17:44:34 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.