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

Issue 12817006: Merge 144519 "EventHandler::handleGestureScrollUpdate() should i..." (Closed)

Created:
7 years, 9 months ago by tdanderson
Modified:
7 years, 9 months ago
Reviewers:
tdanderson
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Visibility:
Public.

Description

Merge 144519 "EventHandler::handleGestureScrollUpdate() should i..." > EventHandler::handleGestureScrollUpdate() should invoke the user-generated scroll routines > so its behavior matches other user-initiated scrolls > https://bugs.webkit.org/show_bug.cgi?id=109769 > > Reviewed by James Robinson. > > Source/WebCore: > > To ensure that the scrolling behavior of GestureScrollUpdate events are consistent with > the scrolling behavior of mousewheel events, use the existing user-generated scroll logic > instead of calling into RenderLayer::scrollByRecursively(). This patch fixes the bug > reported in https://bugs.webkit.org/show_bug.cgi?id=109316, where the example page can > be scrolled using touch but cannot be scrolled using mousewheels. > > Note that this patch does not use any of the mousewheel event-handling code. > > Tests: fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html > fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html > fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html > fast/events/touch/gesture/touch-gesture-noscroll-body.html > > * page/EventHandler.cpp: > (WebCore::EventHandler::clear): > (WebCore::EventHandler::handleGestureEvent): > (WebCore::EventHandler::handleGestureScrollBegin): > (WebCore::EventHandler::handleGestureScrollUpdate): > (WebCore::EventHandler::sendScrollEventToView): > By calling this function at the start of handleGestureScrollUpdate() in the case > where |m_scrollGestureHandlingNode| is null, we ensure that the scroll updates > can still scroll the page itself, if possible. > (WebCore): > (WebCore::EventHandler::clearGestureScrollNodes): > * page/EventHandler.h: > (EventHandler): > * platform/PlatformWheelEvent.h: > (WebCore::PlatformWheelEvent::setHasPreciseScrollingDeltas): > > Source/WebKit/chromium: > > Clear the nodes corresponding to a fling scroll event when the event ends. > > * src/WebViewImpl.cpp: > (WebKit::WebViewImpl::updateAnimations): > > LayoutTests: > > Four new layout tests have been added and touch-gesture-scroll-page.html has been > modified to demonstrate that this patch fixes two existing bugs. See the inline > comments below for details. > > Because I am now using the existing user-generated scroll logic, the delta for a single > GestureScrollUpdate event will not be propagated to the parent of the targeted node > unless the targeted node has no remaining scrollable area. So the changes to the > existing layout tests have been made to ensure that the targeted node has been fully > scrolled before subsequent GestureScrollUpdate events will scroll the parent(s) of > the targeted node. > > I have also removed the function recordScroll() from the existing layout tests > because this function already exists in the included file resources/gesture-helpers.js. > > * fast/events/touch/gesture/touch-gesture-noscroll-body-expected.txt: Added. > * fast/events/touch/gesture/touch-gesture-noscroll-body-propagated-expected.txt: Added. > * fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html: Copied from LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html. > * fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden-expected.txt: Added. > * fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html: Copied from LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html. > * fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden-expected.txt: Added. > * fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html: Copied from LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html. > * fast/events/touch/gesture/touch-gesture-noscroll-body.html: Copied from LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html. > * fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html: > * fast/events/touch/gesture/touch-gesture-scroll-page.html: > I modified this layout test in order to add test coverage for another bug > which is fixed by this patch: if the hit test performed on a GestureScrollBegin > does not target a specific node, the subsequent GestureScrollUpdate events should > still attempt to scroll the page itself. This is consistent with how mousewheel > events behave. > * platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-expected.txt: Added. > * platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-propagated-expected.txt: Added. > * platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden-expected.txt: Added. > * platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden-expected.txt: Added. > These four new layout tests verify that a non-scrollable body will not scroll, > as reported in https://bugs.webkit.org/show_bug.cgi?id=109316. > TBR=tdanderson@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=145821

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -165 lines) Patch
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-propagated.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-propagated-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-div-not-propagated.html View 2 chunks +2 lines, -20 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-div-propagated.html View 2 chunks +2 lines, -20 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-div-twice-propagated.html View 2 chunks +4 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-not-propagated.html View 2 chunks +2 lines, -20 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-iframe-propagated.html View 2 chunks +2 lines, -20 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page.html View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-not-propagated.html View 2 chunks +2 lines, -18 lines 0 comments Download
M LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-page-propagated.html View 2 chunks +2 lines, -18 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-propagated-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-xhidden-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/platform/chromium/fast/events/touch/gesture/touch-gesture-noscroll-body-yhidden-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/page/EventHandler.h View 3 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/page/EventHandler.cpp View 6 chunks +61 lines, -38 lines 0 comments Download
M Source/WebCore/platform/PlatformWheelEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebKit/chromium/src/WebViewImpl.cpp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
tdanderson
7 years, 9 months ago (2013-03-14 16:52:06 UTC) #1
tdanderson
7 years, 9 months ago (2013-03-14 16:53:41 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 manually as r145821.

Powered by Google App Engine
This is Rietveld 408576698