Descriptionmac: Only let two-finger-scrolling trigger history if web doesn't swallow gesture
Use the intended APIs for swipe tracking. Remove the old, wrong, and now unneeded two-finger swipe detection code. Make target 'browser' depend on the block support target, since this is the first CL that uses ObjC blocks (only on 10.7).
No UI yet.
Approach:
* Scroll events are always first sent to the renderer
* RWH informs its view if a wheel event came back unhandled
* If a scroll event came back, and the viewport is pinned to
the left or there is no horizontal scrollbar, a back navigation
is triggered
* If a scroll event came back, and the viewport is pinned to
the right or there is no horizontal scrollbar, a forward navigation
is triggered
Depends on https://bugs.webkit.org/show_bug.cgi?id=66206
BUG=91513, 90652, 92786, 90228, 91144
TEST=
1.) Open http://en.wikipedia.org/wiki/Main_Page , then click a link and go back (so that back and forward buttons are active). Swiping left should go back, swiping right should go forward. Make browser window narrow so that horizontal scroller appears. Now sliding should scroll first if not at the edge, and trigger history if the viewport is on an edge at gesture start.
2.) Open http://pastie.org/2371939 . Scrolling over the div shouldn't trigger history, scrolling everywhere else should (or if there's no history, bounce instead)
3.) Open http://maps.google.com/ . Scrolling over the map area shouldn't trigger history, scrolling over the search box should.
4.) Open http://itunes.apple.com/us/app/cut-the-rope/id380293530?mt=8 Scrollling over the screenshot area should move screenshots (slowly), should tigger history (or bounce) everywhere else.
5.) With the back button active but the forward button inactive, going left/right/left/right in a single gesture should toggle between history on the left and bouncing on the right seamlessly.
Test this with an MBP, a magic trackpad, a magic mouse, and with scroll directions set to "natural" on and off in sysprefs. Also set "Swipe between pages" to three fingers and check if that works, and disable it and check that it's disabled.
Also check that the behavior on 10.5/10.6 and the behavior of mouses with conventional scroll wheels didn't change.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96865
Patch Set 1 #Patch Set 2 : functional, no ui #Patch Set 3 : . #Patch Set 4 : . #Patch Set 5 : . #
Total comments: 36
Patch Set 6 : comments #
Total comments: 8
Patch Set 7 : mark2 #
Total comments: 2
Patch Set 8 : pure virtual #Patch Set 9 : TestRenderViewHost #Messages
Total messages: 20 (0 generated)
|