+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.
setAutoscrollRenderer(renderer);
-#if PLATFORM(WIN)
+#if ENABLE(PAN_SCROLLING)
if (m_panScrollInProgress) {
m_panScrollStartPos = currentMousePosition();
m_frame->view()->addPanScrollIcon(m_panScrollStartPos);
stopAutoscrollTimer();
return;
}
-#if PLATFORM(WIN)
+#if ENABLE(PAN_SCROLLING)
setPanScrollCursor();
r->panScroll(m_panScrollStartPos);
#endif
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());
return true;
}
-#if PLATFORM(WIN)
+#if ENABLE(PAN_SCROLLING)
if (m_frame->page()->mainFrame()->eventHandler()->panScrollInProgress() || m_autoscrollInProgress) {
stopAutoscrollTimer();
invalidateClick();
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