Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / PlatformWheelEvent.h
index af8fe1a..588013c 100644 (file)
@@ -29,7 +29,7 @@
 #include "platform/PlatformEvent.h"
 #include "platform/geometry/IntPoint.h"
 
-namespace WebCore {
+namespace blink {
 
 class FloatPoint;
 class FloatSize;
@@ -65,7 +65,6 @@ public:
         , m_wheelTicksX(0)
         , m_wheelTicksY(0)
         , m_granularity(ScrollByPixelWheelEvent)
-        , m_directionInvertedFromDevice(false)
         , m_hasPreciseScrollingDeltas(false)
 #if OS(MACOSX)
         , m_phase(PlatformWheelEventPhaseNone)
@@ -73,6 +72,8 @@ public:
         , m_scrollCount(0)
         , m_unacceleratedScrollingDeltaX(0)
         , m_unacceleratedScrollingDeltaY(0)
+        , m_canRubberbandLeft(true)
+        , m_canRubberbandRight(true)
 #endif
     {
     }
@@ -86,7 +87,6 @@ public:
         , m_wheelTicksX(wheelTicksX)
         , m_wheelTicksY(wheelTicksY)
         , m_granularity(granularity)
-        , m_directionInvertedFromDevice(false)
         , m_hasPreciseScrollingDeltas(false)
 #if OS(MACOSX)
         , m_phase(PlatformWheelEventPhaseNone)
@@ -94,22 +94,12 @@ public:
         , m_scrollCount(0)
         , m_unacceleratedScrollingDeltaX(0)
         , m_unacceleratedScrollingDeltaY(0)
+        , m_canRubberbandLeft(true)
+        , m_canRubberbandRight(true)
 #endif
     {
     }
 
-    PlatformWheelEvent copyTurningVerticalTicksIntoHorizontalTicks() const
-    {
-        PlatformWheelEvent copy = *this;
-
-        copy.m_deltaX = copy.m_deltaY;
-        copy.m_deltaY = 0;
-        copy.m_wheelTicksX = copy.m_wheelTicksY;
-        copy.m_wheelTicksY = 0;
-
-        return copy;
-    }
-
     const IntPoint& position() const { return m_position; } // PlatformWindow coordinates.
     const IntPoint& globalPosition() const { return m_globalPosition; } // Screen coordinates.
 
@@ -121,8 +111,6 @@ public:
 
     PlatformWheelEventGranularity granularity() const { return m_granularity; }
 
-    bool directionInvertedFromDevice() const { return m_directionInvertedFromDevice; }
-
     bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
     void setHasPreciseScrollingDeltas(bool b) { m_hasPreciseScrollingDeltas = b; }
 #if OS(MACOSX)
@@ -132,6 +120,8 @@ public:
     float unacceleratedScrollingDeltaX() const { return m_unacceleratedScrollingDeltaX; }
     float unacceleratedScrollingDeltaY() const { return m_unacceleratedScrollingDeltaY; }
     bool useLatchedEventNode() const { return m_momentumPhase == PlatformWheelEventPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; }
+    bool canRubberbandLeft() const { return m_canRubberbandLeft; }
+    bool canRubberbandRight() const { return m_canRubberbandRight; }
 #else
     bool useLatchedEventNode() const { return false; }
 #endif
@@ -144,7 +134,6 @@ protected:
     float m_wheelTicksX;
     float m_wheelTicksY;
     PlatformWheelEventGranularity m_granularity;
-    bool m_directionInvertedFromDevice;
     bool m_hasPreciseScrollingDeltas;
 #if OS(MACOSX)
     PlatformWheelEventPhase m_phase;
@@ -152,9 +141,11 @@ protected:
     unsigned m_scrollCount;
     float m_unacceleratedScrollingDeltaX;
     float m_unacceleratedScrollingDeltaY;
+    bool m_canRubberbandLeft;
+    bool m_canRubberbandRight;
 #endif
 };
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // PlatformWheelEvent_h