Changeset 141514 in webkit


Ignore:
Timestamp:
Jan 31, 2013 5:32:10 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Fix rubber-band effect on non-scrollable pages
https://bugs.webkit.org/show_bug.cgi?id=107611

Source/WebCore:

Patch by Christopher Cameron <ccameron@chromium.org> on 2013-01-31
Reviewed by Antonio Gomes.

Handle a FrameView's wheel event even if it is not scrollable
because Chrome relies on handling these wheel events for the
over-scroll rubber-band effect.

This had been removed in r138378
[EFL][WK2] Never create WebCore scrollbars for EFL/WK2
by kenneth@chromium.org

Tests: platform/chromium/rubberbanding/wheelevent-overhang-e.html

platform/chromium/rubberbanding/wheelevent-overhang-n.html
platform/chromium/rubberbanding/wheelevent-overhang-s.html
platform/chromium/rubberbanding/wheelevent-overhang-w.html

  • page/FrameView.cpp:

(WebCore::FrameView::wheelEvent):

Tools:

Add mouseWheelBegin function to EventSender to allow
event-based rubber-banding tests.

Patch by Christopher Cameron <ccameron@chromium.org> on 2013-01-31
Reviewed by Antonio Gomes.

  • DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:

(WebTestRunner):
(WebTestRunner::EventSender::EventSender):
(WebTestRunner::EventSender::mouseDragBegin):

  • DumpRenderTree/chromium/TestRunner/src/EventSender.h:

(EventSender):

LayoutTests:

Patch by Christopher Cameron <ccameron@chromium.org> on 2013-01-31
Reviewed by Antonio Gomes.

  • platform/chromium/rubberbanding/event-overhang-e-expected.png: Added.
  • platform/chromium/rubberbanding/event-overhang-e-expected.txt: Added.
  • platform/chromium/rubberbanding/event-overhang-e.html: Added.
  • platform/chromium/rubberbanding/event-overhang-n-expected.png: Added.
  • platform/chromium/rubberbanding/event-overhang-n-expected.txt: Added.
  • platform/chromium/rubberbanding/event-overhang-n.html: Added.
  • platform/chromium/rubberbanding/event-overhang-s-expected.png: Added.
  • platform/chromium/rubberbanding/event-overhang-s-expected.txt: Added.
  • platform/chromium/rubberbanding/event-overhang-s.html: Added.
  • platform/chromium/rubberbanding/event-overhang-w-expected.png: Added.
  • platform/chromium/rubberbanding/event-overhang-w-expected.txt: Added.
  • platform/chromium/rubberbanding/event-overhang-w.html: Added.
Location:
trunk
Files:
12 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141508 r141514  
     12013-01-31  Christopher Cameron  <ccameron@chromium.org>
     2
     3        Fix rubber-band effect on non-scrollable pages
     4        https://bugs.webkit.org/show_bug.cgi?id=107611
     5
     6        Reviewed by Antonio Gomes.
     7
     8        * platform/chromium/rubberbanding/event-overhang-e-expected.png: Added.
     9        * platform/chromium/rubberbanding/event-overhang-e-expected.txt: Added.
     10        * platform/chromium/rubberbanding/event-overhang-e.html: Added.
     11        * platform/chromium/rubberbanding/event-overhang-n-expected.png: Added.
     12        * platform/chromium/rubberbanding/event-overhang-n-expected.txt: Added.
     13        * platform/chromium/rubberbanding/event-overhang-n.html: Added.
     14        * platform/chromium/rubberbanding/event-overhang-s-expected.png: Added.
     15        * platform/chromium/rubberbanding/event-overhang-s-expected.txt: Added.
     16        * platform/chromium/rubberbanding/event-overhang-s.html: Added.
     17        * platform/chromium/rubberbanding/event-overhang-w-expected.png: Added.
     18        * platform/chromium/rubberbanding/event-overhang-w-expected.txt: Added.
     19        * platform/chromium/rubberbanding/event-overhang-w.html: Added.
     20
    1212013-01-31  Jessie Berlin  <jberlin@apple.com>
    222
  • trunk/Source/WebCore/ChangeLog

    r141513 r141514  
     12013-01-31  Christopher Cameron  <ccameron@chromium.org>
     2
     3        Fix rubber-band effect on non-scrollable pages
     4        https://bugs.webkit.org/show_bug.cgi?id=107611
     5
     6        Reviewed by Antonio Gomes.
     7
     8        Handle a FrameView's wheel event even if it is not scrollable
     9        because Chrome relies on handling these wheel events for the
     10        over-scroll rubber-band effect.
     11 
     12        This had been removed in r138378
     13        [EFL][WK2] Never create WebCore scrollbars for EFL/WK2
     14        by kenneth@chromium.org
     15
     16        Tests: platform/chromium/rubberbanding/wheelevent-overhang-e.html
     17               platform/chromium/rubberbanding/wheelevent-overhang-n.html
     18               platform/chromium/rubberbanding/wheelevent-overhang-s.html
     19               platform/chromium/rubberbanding/wheelevent-overhang-w.html
     20
     21        * page/FrameView.cpp:
     22        (WebCore::FrameView::wheelEvent):
     23
    1242013-01-31  Enrica Casucci  <enrica@apple.com>
    225
  • trunk/Source/WebCore/page/FrameView.cpp

    r141450 r141514  
    38163816bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
    38173817{
     3818    // Note that to allow for rubber-band over-scroll behavior, even non-scrollable views
     3819    // should handle wheel events.
     3820#if !ENABLE(RUBBER_BANDING)
    38183821    if (!isScrollable())
    38193822        return false;
     3823#endif
    38203824
    38213825    if (delegatesScrolling()) {
  • trunk/Tools/ChangeLog

    r141512 r141514  
     12013-01-31  Christopher Cameron  <ccameron@chromium.org>
     2
     3        Fix rubber-band effect on non-scrollable pages
     4        https://bugs.webkit.org/show_bug.cgi?id=107611
     5
     6        Add mouseWheelBegin function to EventSender to allow
     7        event-based rubber-banding tests.
     8
     9        Reviewed by Antonio Gomes.
     10
     11        * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
     12        (WebTestRunner):
     13        (WebTestRunner::EventSender::EventSender):
     14        (WebTestRunner::EventSender::mouseDragBegin):
     15        * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
     16        (EventSender):
     17
    1182013-01-31  James Robinson  <jamesr@chromium.org>
    219
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp

    r140565 r141514  
    277277    bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
    278278    bindMethod("mouseUp", &EventSender::mouseUp);
     279    bindMethod("mouseDragBegin", &EventSender::mouseDragBegin);
    279280    bindMethod("releaseTouchPoint", &EventSender::releaseTouchPoint);
    280281    bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousClick);
     
    10451046}
    10461047
     1048void EventSender::mouseDragBegin(const CppArgumentList& arguments, CppVariant* result)
     1049{
     1050    WebMouseWheelEvent event;
     1051    initMouseEvent(WebInputEvent::MouseWheel, WebMouseEvent::ButtonNone, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
     1052    event.phase = WebMouseWheelEvent::PhaseBegan;
     1053    event.hasPreciseScrollingDeltas = true;
     1054    webview()->handleInputEvent(event);
     1055}
     1056
    10471057void EventSender::handleMouseWheel(const CppArgumentList& arguments, CppVariant* result, bool continuous)
    10481058{
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h

    r140565 r141514  
    8484    void scalePageBy(const CppArgumentList&, CppVariant*);
    8585
     86    void mouseDragBegin(const CppArgumentList&, CppVariant*);
    8687    void mouseScrollBy(const CppArgumentList&, CppVariant*);
    8788    void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
Note: See TracChangeset for help on using the changeset viewer.