| Differences between
and this patch
- WebCore/ChangeLog +26 lines
Lines 1-3 WebCore/ChangeLog_sec1
1
2009-06-26  Brian Weinstein  <bweinstein@apple.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        https://bugs.webkit.org/show_bug.cgi?id=26695
6
        
7
        Added the ability to do scrollbar hit testing in EventHandler, changed the
8
        signature of a PlatformWheelEvent constructor, and changed scrollbarUnderMouse
9
        to scrollbarUnderPoint, and updated all calls to that function.        
10
11
        * page/EventHandler.cpp:
12
        (WebCore::EventHandler::hitTestResultAtPoint):
13
        (WebCore::EventHandler::handleMousePressEvent):
14
        (WebCore::EventHandler::handleMouseMoveEvent):
15
        * page/EventHandler.h:
16
        (WebCore::):
17
        * platform/PlatformWheelEvent.h:
18
        * platform/ScrollView.cpp:
19
        (WebCore::ScrollView::scrollbarUnderPoint):
20
        * platform/ScrollView.h:
21
        * platform/chromium/PopupMenuChromium.cpp:
22
        (WebCore::PopupListBox::handleMouseDownEvent):
23
        (WebCore::PopupListBox::handleMouseMoveEvent):
24
        * platform/win/WheelEventWin.cpp:
25
        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
26
1
2009-06-26  Jessie Berlin  <jberlin@apple.com>
27
2009-06-26  Jessie Berlin  <jberlin@apple.com>
2
28
3
        Reviewed by Mark Rowe.
29
        Reviewed by Mark Rowe.
- WebCore/page/EventHandler.cpp -3 / +9 lines
Lines 735-741 void EventHandler::allowDHTMLDrag(bool& WebCore/page/EventHandler.cpp_sec1
735
    flagUA = ((mask & DragSourceActionImage) || (mask & DragSourceActionLink) || (mask & DragSourceActionSelection));
735
    flagUA = ((mask & DragSourceActionImage) || (mask & DragSourceActionLink) || (mask & DragSourceActionSelection));
736
}
736
}
737
    
737
    
738
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping)
738
HitTestResult EventHandler::hitTestResultAtPoint(const IntPoint& point, bool allowShadowContent, bool ignoreClipping, HitTestScrollbars testScrollbars)
739
{
739
{
740
    HitTestResult result(point);
740
    HitTestResult result(point);
741
    if (!m_frame->contentRenderer())
741
    if (!m_frame->contentRenderer())
Lines 762-767 HitTestResult EventHandler::hitTestResul WebCore/page/EventHandler.cpp_sec2
762
        HitTestResult widgetHitTestResult(widgetPoint);
762
        HitTestResult widgetHitTestResult(widgetPoint);
763
        frame->contentRenderer()->layer()->hitTest(HitTestRequest(hitType), widgetHitTestResult);
763
        frame->contentRenderer()->layer()->hitTest(HitTestRequest(hitType), widgetHitTestResult);
764
        result = widgetHitTestResult;
764
        result = widgetHitTestResult;
765
766
        if (testScrollbars == ShouldHitTestScrollbars) {
767
            Scrollbar* eventScrollbar = view->scrollbarUnderPoint(point);
768
            if (eventScrollbar)
769
                result.setScrollbar(eventScrollbar);
770
        }
765
    }
771
    }
766
    
772
    
767
    // If our HitTestResult is not visible, then we started hit testing too far down the frame chain. 
773
    // If our HitTestResult is not visible, then we started hit testing too far down the frame chain. 
Lines 1182-1188 bool EventHandler::handleMousePressEvent WebCore/page/EventHandler.cpp_sec3
1182
        }
1188
        }
1183
1189
1184
        FrameView* view = m_frame->view();
1190
        FrameView* view = m_frame->view();
1185
        Scrollbar* scrollbar = view ? view->scrollbarUnderMouse(mouseEvent) : 0;
1191
        Scrollbar* scrollbar = view ? view->scrollbarUnderPoint(mouseEvent.pos()) : 0;
1186
        if (!scrollbar)
1192
        if (!scrollbar)
1187
            scrollbar = mev.scrollbar();
1193
            scrollbar = mev.scrollbar();
1188
        if (scrollbar && passMousePressEventToScrollbar(mev, scrollbar))
1194
        if (scrollbar && passMousePressEventToScrollbar(mev, scrollbar))
Lines 1296-1302 bool EventHandler::handleMouseMoveEvent( WebCore/page/EventHandler.cpp_sec4
1296
        m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner);
1302
        m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner);
1297
    else {
1303
    else {
1298
        if (FrameView* view = m_frame->view())
1304
        if (FrameView* view = m_frame->view())
1299
            scrollbar = view->scrollbarUnderMouse(mouseEvent);
1305
            scrollbar = view->scrollbarUnderPoint(mouseEvent.pos());
1300
1306
1301
        if (!scrollbar)
1307
        if (!scrollbar)
1302
            scrollbar = mev.scrollbar();
1308
            scrollbar = mev.scrollbar();
- WebCore/page/EventHandler.h -1 / +3 lines
Lines 67-72 extern const int ImageDragHysteresis; WebCore/page/EventHandler.h_sec1
67
extern const int TextDragHysteresis;
67
extern const int TextDragHysteresis;
68
extern const int GeneralDragHysteresis;
68
extern const int GeneralDragHysteresis;
69
69
70
enum HitTestScrollbars { ShouldHitTestScrollbars, DontHitTestScrollbars };
71
70
class EventHandler : Noncopyable {
72
class EventHandler : Noncopyable {
71
public:
73
public:
72
    EventHandler(Frame*);
74
    EventHandler(Frame*);
Lines 86-92 public: WebCore/page/EventHandler.h_sec2
86
    RenderObject* autoscrollRenderer() const;
88
    RenderObject* autoscrollRenderer() const;
87
    void updateAutoscrollRenderer();
89
    void updateAutoscrollRenderer();
88
90
89
    HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false);
91
    HitTestResult hitTestResultAtPoint(const IntPoint&, bool allowShadowContent, bool ignoreClipping = false, HitTestScrollbars scrollbars = DontHitTestScrollbars);
90
92
91
    bool mousePressed() const { return m_mousePressed; }
93
    bool mousePressed() const { return m_mousePressed; }
92
    void setMousePressed(bool pressed) { m_mousePressed = pressed; }
94
    void setMousePressed(bool pressed) { m_mousePressed = pressed; }
- WebCore/platform/PlatformWheelEvent.h -1 / +4 lines
Lines 51-56 class wxPoint; WebCore/platform/PlatformWheelEvent.h_sec1
51
51
52
namespace WebCore {
52
namespace WebCore {
53
53
54
    class FloatPoint;
55
    class FloatSize;
56
54
    // Wheel events come in two flavors:
57
    // Wheel events come in two flavors:
55
    // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precise number of pixels to scroll.  It is sent directly by MacBook touchpads on OS X,
58
    // The ScrollByPixelWheelEvent is a fine-grained event that specifies the precise number of pixels to scroll.  It is sent directly by MacBook touchpads on OS X,
56
    // and synthesized in other cases where platforms generate line-by-line scrolling events.
59
    // and synthesized in other cases where platforms generate line-by-line scrolling events.
Lines 99-105 namespace WebCore { WebCore/platform/PlatformWheelEvent.h_sec2
99
102
100
#if PLATFORM(WIN)
103
#if PLATFORM(WIN)
101
        PlatformWheelEvent(HWND, WPARAM, LPARAM, bool isMouseHWheel);
104
        PlatformWheelEvent(HWND, WPARAM, LPARAM, bool isMouseHWheel);
102
        PlatformWheelEvent(HWND, float deltaX, float deltaY, float xLoc, float yLoc);
105
        PlatformWheelEvent(HWND, const FloatSize& delta, const FloatPoint& location);
103
#endif
106
#endif
104
107
105
#if PLATFORM(WX)
108
#if PLATFORM(WX)
- WebCore/platform/ScrollView.cpp -2 / +2 lines
Lines 633-644 void ScrollView::setScrollbarsSuppressed WebCore/platform/ScrollView.cpp_sec1
633
    }
633
    }
634
}
634
}
635
635
636
Scrollbar* ScrollView::scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent)
636
Scrollbar* ScrollView::scrollbarUnderPoint(const IntPoint& point)
637
{
637
{
638
    if (platformWidget())
638
    if (platformWidget())
639
        return 0;
639
        return 0;
640
640
641
    IntPoint viewPoint = convertFromContainingWindow(mouseEvent.pos());
641
    IntPoint viewPoint = convertFromContainingWindow(point);
642
    if (m_horizontalScrollbar && m_horizontalScrollbar->frameRect().contains(viewPoint))
642
    if (m_horizontalScrollbar && m_horizontalScrollbar->frameRect().contains(viewPoint))
643
        return m_horizontalScrollbar.get();
643
        return m_horizontalScrollbar.get();
644
    if (m_verticalScrollbar && m_verticalScrollbar->frameRect().contains(viewPoint))
644
    if (m_verticalScrollbar && m_verticalScrollbar->frameRect().contains(viewPoint))
- WebCore/platform/ScrollView.h -1 / +1 lines
Lines 181-187 public: WebCore/platform/ScrollView.h_sec1
181
    virtual void setFrameRect(const IntRect&);
181
    virtual void setFrameRect(const IntRect&);
182
182
183
    // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
183
    // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32).
184
    Scrollbar* scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent);
184
    Scrollbar* scrollbarUnderPoint(const IntPoint& point);
185
185
186
    // This method exists for scrollviews that need to handle wheel events manually.
186
    // This method exists for scrollviews that need to handle wheel events manually.
187
    // On Mac the underlying NSScrollView just does the scrolling, but on other platforms
187
    // On Mac the underlying NSScrollView just does the scrolling, but on other platforms
- WebCore/platform/chromium/PopupMenuChromium.cpp -2 / +2 lines
Lines 512-518 const WTF::Vector<PopupItem*>& PopupCont WebCore/platform/chromium/PopupMenuChromium.cpp_sec1
512
512
513
bool PopupListBox::handleMouseDownEvent(const PlatformMouseEvent& event)
513
bool PopupListBox::handleMouseDownEvent(const PlatformMouseEvent& event)
514
{
514
{
515
    Scrollbar* scrollbar = scrollbarUnderMouse(event);
515
    Scrollbar* scrollbar = scrollbarUnderPoint(event.pos());
516
    if (scrollbar) {
516
    if (scrollbar) {
517
        m_capturingScrollbar = scrollbar;
517
        m_capturingScrollbar = scrollbar;
518
        m_capturingScrollbar->mouseDown(event);
518
        m_capturingScrollbar->mouseDown(event);
Lines 532-538 bool PopupListBox::handleMouseMoveEvent( WebCore/platform/chromium/PopupMenuChromium.cpp_sec2
532
        return true;
532
        return true;
533
    }
533
    }
534
534
535
    Scrollbar* scrollbar = scrollbarUnderMouse(event);
535
    Scrollbar* scrollbar = scrollbarUnderPoint(event.pos());
536
    if (m_lastScrollbarUnderMouse != scrollbar) {
536
    if (m_lastScrollbarUnderMouse != scrollbar) {
537
        // Send mouse exited to the old scrollbar.
537
        // Send mouse exited to the old scrollbar.
538
        if (m_lastScrollbarUnderMouse)
538
        if (m_lastScrollbarUnderMouse)
- WebCore/platform/win/WheelEventWin.cpp -4 / +7 lines
Lines 23-30 WebCore/platform/win/WheelEventWin.cpp_sec1
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
24
 */
25
25
26
#include "config.h"
26
#include "PlatformWheelEvent.h"
27
#include "PlatformWheelEvent.h"
27
28
29
#include "FloatPoint.h"
30
#include "FloatSize.h"
28
#include <windows.h>
31
#include <windows.h>
29
#include <windowsx.h>
32
#include <windowsx.h>
30
33
Lines 62-82 static int verticalScrollLines() WebCore/platform/win/WheelEventWin.cpp_sec2
62
    return scrollLines;
65
    return scrollLines;
63
}
66
}
64
67
65
PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, float deltaX, float deltaY, float xLoc, float yLoc)
68
PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const FloatPoint& location)
66
    : m_isAccepted(false)
69
    : m_isAccepted(false)
67
    , m_shiftKey(false)
70
    , m_shiftKey(false)
68
    , m_ctrlKey(false)
71
    , m_ctrlKey(false)
69
    , m_altKey(false)
72
    , m_altKey(false)
70
    , m_metaKey(false)
73
    , m_metaKey(false)
71
{
74
{
72
    m_deltaX = deltaX;
75
    m_deltaX = delta.width();
73
    m_deltaY = deltaY;
76
    m_deltaY = delta.height();
74
77
75
    m_wheelTicksX = m_deltaX;
78
    m_wheelTicksX = m_deltaX;
76
    m_wheelTicksY = m_deltaY;
79
    m_wheelTicksY = m_deltaY;
77
80
78
    // Global Position is just x, y location of event
81
    // Global Position is just x, y location of event
79
    POINT point = {xLoc, yLoc};
82
    POINT point = {location.x(), location.y()};
80
    m_globalPosition = point;
83
    m_globalPosition = point;
81
84
82
    // Position needs to be translated to our client
85
    // Position needs to be translated to our client
- WebKit/qt/ChangeLog +9 lines
Lines 1-3 WebKit/qt/ChangeLog_sec1
1
2009-06-26  Brian Weinstein  <bweinstein@apple.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
        
5
        Changed call of scrollbarUnderMouse to scrollbarUnderPoint to match new API.
6
7
        * Api/qwebpage.cpp:
8
        (QWebPage::swallowContextMenuEvent):
9
1
2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
10
2009-06-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2
11
3
        Reviewed by Simon Hausmann.
12
        Reviewed by Simon Hausmann.
- WebKit/qt/Api/qwebpage.cpp -1 / +1 lines
Lines 2197-2203 bool QWebPage::swallowContextMenuEvent(Q WebKit/qt/Api/qwebpage.cpp_sec1
2197
2197
2198
    if (QWebFrame* webFrame = d->frameAt(event->pos())) {
2198
    if (QWebFrame* webFrame = d->frameAt(event->pos())) {
2199
        Frame* frame = QWebFramePrivate::core(webFrame);
2199
        Frame* frame = QWebFramePrivate::core(webFrame);
2200
        if (Scrollbar* scrollbar = frame->view()->scrollbarUnderMouse(PlatformMouseEvent(event, 1))) {
2200
        if (Scrollbar* scrollbar = frame->view()->scrollbarUnderMouse(PlatformMouseEvent(event, 1).pos())) {
2201
            return scrollbar->contextMenu(PlatformMouseEvent(event, 1));
2201
            return scrollbar->contextMenu(PlatformMouseEvent(event, 1));
2202
        }
2202
        }
2203
    }
2203
    }
- WebKit/win/ChangeLog +14 lines
Lines 1-3 WebKit/win/ChangeLog_sec1
1
2009-06-26  Brian Weinstein  <bweinstein@apple.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        https://bugs.webkit.org/show_bug.cgi?id=26695
6
7
        Added hit testing on scrollbars, so if you start a gesture over a scrollbar,
8
        it isn't counted, and lets the user drag the scrollbar itself instead of a
9
        panning gesture. Also cleaned up code in gesture.
10
11
        * WebView.cpp:
12
        (WebView::gestureNotify):
13
        (WebView::gesture):
14
1
2009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
15
2009-06-26  Yongjun Zhang  <yongjun.zhang@nokia.com>
2
16
3
        Reviewed by Eric Seidel.
17
        Reviewed by Eric Seidel.
- WebKit/win/WebView.cpp -29 / +31 lines
Lines 79-84 WebKit/win/WebView.cpp_sec1
79
#include <WebCore/GDIObjectCounter.h>
79
#include <WebCore/GDIObjectCounter.h>
80
#include <WebCore/GraphicsContext.h>
80
#include <WebCore/GraphicsContext.h>
81
#include <WebCore/HistoryItem.h>
81
#include <WebCore/HistoryItem.h>
82
#include <WebCore/HitTestRequest.h>
82
#include <WebCore/HitTestResult.h>
83
#include <WebCore/HitTestResult.h>
83
#include <WebCore/IntRect.h>
84
#include <WebCore/IntRect.h>
84
#include <WebCore/KeyboardEvent.h>
85
#include <WebCore/KeyboardEvent.h>
Lines 95-100 WebKit/win/WebView.cpp_sec2
95
#include <WebCore/PluginView.h>
96
#include <WebCore/PluginView.h>
96
#include <WebCore/ProgressTracker.h>
97
#include <WebCore/ProgressTracker.h>
97
#include <WebCore/RenderTheme.h>
98
#include <WebCore/RenderTheme.h>
99
#include <WebCore/RenderView.h>
98
#include <WebCore/ResourceHandle.h>
100
#include <WebCore/ResourceHandle.h>
99
#include <WebCore/ResourceHandleClient.h>
101
#include <WebCore/ResourceHandleClient.h>
100
#include <WebCore/ScriptValue.h>
102
#include <WebCore/ScriptValue.h>
Lines 1348-1360 bool WebView::gestureNotify(WPARAM wPara WebKit/win/WebView.cpp_sec3
1348
    ASSERT(SetGestureConfigPtr());
1350
    ASSERT(SetGestureConfigPtr());
1349
1351
1350
    DWORD dwPanWant;
1352
    DWORD dwPanWant;
1351
    DWORD dwPanBlock; 
1353
    DWORD dwPanBlock;
1352
1354
1353
    // Translate gesture location to client to hit test on scrollbars
1355
    // Translate gesture location to client to hit test on scrollbars
1354
    POINT gestureBeginPoint = {gn->ptsLocation.x, gn->ptsLocation.y};
1356
    POINT gestureBeginPoint = {gn->ptsLocation.x, gn->ptsLocation.y};
1355
    ScreenToClient(m_viewWindow, &gestureBeginPoint);
1357
    IntPoint eventHandlerPoint = m_page->mainFrame()->view()->screenToContents(gestureBeginPoint);
1356
1358
1357
    if (gestureBeginPoint.x > view->visibleWidth()) {
1359
    HitTestResult scrollbarTest = m_page->mainFrame()->eventHandler()->hitTestResultAtPoint(eventHandlerPoint, true, false, ShouldHitTestScrollbars);
1360
1361
    if (eventHandlerPoint.x() > view->visibleWidth() || scrollbarTest.scrollbar()) {
1358
        // We are in the scrollbar, turn off panning, need to be able to drag the scrollbar
1362
        // We are in the scrollbar, turn off panning, need to be able to drag the scrollbar
1359
        dwPanWant = GC_PAN  | GC_PAN_WITH_INERTIA | GC_PAN_WITH_GUTTER;
1363
        dwPanWant = GC_PAN  | GC_PAN_WITH_INERTIA | GC_PAN_WITH_GUTTER;
1360
        dwPanBlock = GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY | GC_PAN_WITH_SINGLE_FINGER_VERTICALLY;
1364
        dwPanBlock = GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY | GC_PAN_WITH_SINGLE_FINGER_VERTICALLY;
Lines 1389-1412 bool WebView::gesture(WPARAM wParam, LPA WebKit/win/WebView.cpp_sec4
1389
        CloseGestureInfoHandlePtr()(gestureHandle);
1393
        CloseGestureInfoHandlePtr()(gestureHandle);
1390
        break;
1394
        break;
1391
    case GID_PAN: {
1395
    case GID_PAN: {
1392
        Frame* coreFrame = core(m_mainFrame);
1393
        if (!coreFrame) {
1394
            CloseGestureInfoHandlePtr()(gestureHandle);
1395
            return false;
1396
        }
1397
1398
        ScrollView* view = coreFrame->view();
1399
        if (!view) {
1400
            CloseGestureInfoHandlePtr()(gestureHandle);
1401
            return false;
1402
        }
1403
1404
        Scrollbar* vertScrollbar = view->verticalScrollbar();
1405
        if (!vertScrollbar) {
1406
            CloseGestureInfoHandlePtr()(gestureHandle);
1407
            return true;    //No panning of any kind when no vertical scrollbar, matches IE8
1408
        }
1409
1410
        // Where are the fingers currently?
1396
        // Where are the fingers currently?
1411
        long currentX = gi.ptsLocation.x;
1397
        long currentX = gi.ptsLocation.x;
1412
        long currentY = gi.ptsLocation.y;
1398
        long currentY = gi.ptsLocation.y;
Lines 1414-1420 bool WebView::gesture(WPARAM wParam, LPA WebKit/win/WebView.cpp_sec5
1414
        // How far did we pan in each direction?
1400
        // How far did we pan in each direction?
1415
        long deltaX = currentX - m_lastPanX;
1401
        long deltaX = currentX - m_lastPanX;
1416
        long deltaY = currentY - m_lastPanY;
1402
        long deltaY = currentY - m_lastPanY;
1417
        
1403
1418
        // Calculate the overpan for window bounce
1404
        // Calculate the overpan for window bounce
1419
        m_yOverpan -= m_lastPanY - currentY;
1405
        m_yOverpan -= m_lastPanY - currentY;
1420
        m_xOverpan -= m_lastPanX - currentX;
1406
        m_xOverpan -= m_lastPanX - currentX;
Lines 1423-1430 bool WebView::gesture(WPARAM wParam, LPA WebKit/win/WebView.cpp_sec6
1423
        m_lastPanX = currentX;
1409
        m_lastPanX = currentX;
1424
        m_lastPanY = currentY;
1410
        m_lastPanY = currentY;
1425
1411
1412
        Frame* coreFrame = core(m_mainFrame);
1413
        if (!coreFrame) {
1414
            CloseGestureInfoHandlePtr()(gestureHandle);
1415
            return false;
1416
        }
1426
        // Represent the pan gesture as a mouse wheel event
1417
        // Represent the pan gesture as a mouse wheel event
1427
        PlatformWheelEvent wheelEvent(m_viewWindow, deltaX, deltaY, currentX, currentY);
1418
        PlatformWheelEvent wheelEvent(m_viewWindow, FloatSize(deltaX, deltaY), FloatPoint(currentX, currentY));
1428
        coreFrame->eventHandler()->handleWheelEvent(wheelEvent);
1419
        coreFrame->eventHandler()->handleWheelEvent(wheelEvent);
1429
1420
1430
        if (!(UpdatePanningFeedbackPtr() && BeginPanningFeedbackPtr() && EndPanningFeedbackPtr())) {
1421
        if (!(UpdatePanningFeedbackPtr() && BeginPanningFeedbackPtr() && EndPanningFeedbackPtr())) {
Lines 1432-1443 bool WebView::gesture(WPARAM wParam, LPA WebKit/win/WebView.cpp_sec7
1432
            return true;
1423
            return true;
1433
        }
1424
        }
1434
1425
1435
        // FIXME: Support Horizontal Window Bounce
1436
        if (vertScrollbar->currentPos() == 0)
1437
            UpdatePanningFeedbackPtr()(m_viewWindow, 0, m_yOverpan, gi.dwFlags & GF_INERTIA);
1438
        else if (vertScrollbar->currentPos() >= vertScrollbar->maximum())
1439
            UpdatePanningFeedbackPtr()(m_viewWindow, 0, m_yOverpan, gi.dwFlags & GF_INERTIA);
1440
        
1441
        if (gi.dwFlags & GF_BEGIN) {
1426
        if (gi.dwFlags & GF_BEGIN) {
1442
            BeginPanningFeedbackPtr()(m_viewWindow);
1427
            BeginPanningFeedbackPtr()(m_viewWindow);
1443
            m_yOverpan = 0;
1428
            m_yOverpan = 0;
Lines 1446-1451 bool WebView::gesture(WPARAM wParam, LPA WebKit/win/WebView.cpp_sec8
1446
            m_yOverpan = 0;
1431
            m_yOverpan = 0;
1447
        }
1432
        }
1448
1433
1434
        ScrollView* view = coreFrame->view();
1435
        if (!view) {
1436
            CloseGestureInfoHandlePtr()(gestureHandle);
1437
            return false;
1438
        }
1439
        Scrollbar* vertScrollbar = view->verticalScrollbar();
1440
        if (!vertScrollbar) {
1441
            CloseGestureInfoHandlePtr()(gestureHandle);
1442
            return true;
1443
        }
1444
1445
        // FIXME: Support Horizontal Window Bounce
1446
        if (vertScrollbar->currentPos() == 0)
1447
            UpdatePanningFeedbackPtr()(m_viewWindow, 0, m_yOverpan, gi.dwFlags & GF_INERTIA);
1448
        else if (vertScrollbar->currentPos() >= vertScrollbar->maximum())
1449
            UpdatePanningFeedbackPtr()(m_viewWindow, 0, m_yOverpan, gi.dwFlags & GF_INERTIA);
1450
1449
        CloseGestureInfoHandlePtr()(gestureHandle);
1451
        CloseGestureInfoHandlePtr()(gestureHandle);
1450
        break;
1452
        break;
1451
    }
1453
    }

Return to Bug 26695