2008-10-09 Darin Fisher <darin@chromium.org>
authordarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 05:22:03 +0000 (05:22 +0000)
committerdarin@chromium.org <darin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 15 Oct 2008 05:22:03 +0000 (05:22 +0000)
        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
WebCore/page/EventHandler.cpp

index b1f3b3b..c1ec3e5 100644 (file)
@@ -1,3 +1,17 @@
+2008-10-09  Darin Fisher  <darin@chromium.org>
+
+        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  <darin@chromium.org>
 
         Reviewed by Darin Adler.
index 52b6970..2c3e342 100644 (file)
@@ -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<EventHandler>*)
             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