From ca5b1a472a5b343b517ef2184e2d7d5ba01d957e Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Wed, 15 Oct 2008 05:22:03 +0000 Subject: [PATCH] 2008-10-09 Darin Fisher Reviewed by Sam Weinig. Make pan scrolling a platform configurable option https://bugs.webkit.org/show_bug.cgi?id=21515 * page/EventHandler.cpp: (WebCore::EventHandler::handleAutoscroll): (WebCore::EventHandler::autoscrollTimerFired): (WebCore::EventHandler::stopAutoscrollTimer): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::keyEvent): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@37601 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 14 ++++++++++++++ WebCore/page/EventHandler.cpp | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index b1f3b3bd2070..c1ec3e5c3193 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2008-10-09 Darin Fisher + + Reviewed by Sam Weinig. + + Make pan scrolling a platform configurable option + https://bugs.webkit.org/show_bug.cgi?id=21515 + + * page/EventHandler.cpp: + (WebCore::EventHandler::handleAutoscroll): + (WebCore::EventHandler::autoscrollTimerFired): + (WebCore::EventHandler::stopAutoscrollTimer): + (WebCore::EventHandler::handleMousePressEvent): + (WebCore::EventHandler::keyEvent): + 2008-10-10 Darin Fisher Reviewed by Darin Adler. diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp index 52b697056e6f..2c3e3427f3b3 100644 --- a/WebCore/page/EventHandler.cpp +++ b/WebCore/page/EventHandler.cpp @@ -576,7 +576,7 @@ void EventHandler::handleAutoscroll(RenderObject* renderer) setAutoscrollRenderer(renderer); -#if PLATFORM(WIN) +#if ENABLE(PAN_SCROLLING) if (m_panScrollInProgress) { m_panScrollStartPos = currentMousePosition(); m_frame->view()->addPanScrollIcon(m_panScrollStartPos); @@ -609,7 +609,7 @@ void EventHandler::autoscrollTimerFired(Timer*) stopAutoscrollTimer(); return; } -#if PLATFORM(WIN) +#if ENABLE(PAN_SCROLLING) setPanScrollCursor(); r->panScroll(m_panScrollStartPos); #endif @@ -744,7 +744,7 @@ void EventHandler::stopAutoscrollTimer(bool rendererIsBeingDestroyed) if (autoscrollRenderer()) { if (!rendererIsBeingDestroyed && (m_autoscrollInProgress || m_panScrollInProgress)) autoscrollRenderer()->stopAutoscroll(); -#if PLATFORM(WIN) +#if ENABLE(PAN_SCROLLING) if (m_panScrollInProgress) { m_frame->view()->removePanScrollIcon(); m_frame->view()->setCursor(pointerCursor()); @@ -1022,7 +1022,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent) return true; } -#if PLATFORM(WIN) +#if ENABLE(PAN_SCROLLING) if (m_frame->page()->mainFrame()->eventHandler()->panScrollInProgress() || m_autoscrollInProgress) { stopAutoscrollTimer(); invalidateClick(); @@ -1737,7 +1737,7 @@ bool EventHandler::needsKeyboardEventDisambiguationQuirks() const bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent) { -#if PLATFORM(WIN) || (PLATFORM(WX) && PLATFORM(WIN_OS)) +#if ENABLE(PAN_SCROLLING) if (m_frame->page()->mainFrame()->eventHandler()->panScrollInProgress() || m_autoscrollInProgress) { String escKeyId = "U+001B"; // If a key is pressed while the autoscroll/panScroll is in progress then we want to stop -- 2.36.0