DescriptionMerge 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 #Messages
Total messages: 2 (0 generated)
|