Title: [117331] branches/safari-536-branch/Source

Diff

Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog	2012-05-16 20:25:32 UTC (rev 117331)
@@ -1,5 +1,39 @@
 2012-05-16  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 117129
+
+    2012-05-15  Anders Carlsson  <ander...@apple.com>
+
+            Use unaccelerated scrolling deltas when rubber-banding
+            https://bugs.webkit.org/show_bug.cgi?id=86503
+            <rdar://problem/11378742>
+
+            Reviewed by Sam Weinig.
+
+            * WebCore.exp.in:
+            * platform/PlatformWheelEvent.h:
+            (WebCore::PlatformWheelEvent::PlatformWheelEvent):
+            (PlatformWheelEvent):
+            (WebCore::PlatformWheelEvent::scrollCount):
+            (WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaX):
+            (WebCore::PlatformWheelEvent::unacceleratedScrollingDeltaY):
+            Add scroll count and unaccelerated scrolling deltas.
+
+            * platform/mac/ScrollElasticityController.mm:
+            (WebCore::elasticDeltaForTimeDelta):
+            (WebCore::elasticDeltaForReboundDelta):
+            (WebCore::reboundDeltaForElasticDelta):
+            Call the new WKSI functions.
+
+            (WebCore::ScrollElasticityController::handleWheelEvent):
+            Use the unaccelerated scrolling deltas when needed.
+
+            * platform/mac/WebCoreSystemInterface.h:
+            * platform/mac/WebCoreSystemInterface.mm:
+            Add new WKSI functions.
+
+2012-05-16  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 117113
 
     2012-05-15  Beth Dakin  <bda...@apple.com>

Modified: branches/safari-536-branch/Source/WebCore/WebCore.exp.in (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/WebCore.exp.in	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/WebCore.exp.in	2012-05-16 20:25:32 UTC (rev 117331)
@@ -1690,6 +1690,9 @@
 _wkFilterWasBlocked
 _wkFilterAddData
 _wkFilterDataComplete
+_wkNSElasticDeltaForTimeDelta
+_wkNSElasticDeltaForReboundDelta
+_wkNSReboundDeltaForElasticDelta
 #endif
 
 #if ENABLE(SVG)

Modified: branches/safari-536-branch/Source/WebCore/platform/PlatformWheelEvent.h (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/platform/PlatformWheelEvent.h	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/platform/PlatformWheelEvent.h	2012-05-16 20:25:32 UTC (rev 117331)
@@ -94,6 +94,9 @@
             , m_hasPreciseScrollingDeltas(false)
             , m_phase(PlatformWheelEventPhaseNone)
             , m_momentumPhase(PlatformWheelEventPhaseNone)
+            , m_scrollCount(0)
+            , m_unacceleratedScrollingDeltaX(0)
+            , m_unacceleratedScrollingDeltaY(0)
 #endif
         {
         }
@@ -112,6 +115,9 @@
             , m_hasPreciseScrollingDeltas(false)
             , m_phase(PlatformWheelEventPhaseNone)
             , m_momentumPhase(PlatformWheelEventPhaseNone)
+            , m_scrollCount(0)
+            , m_unacceleratedScrollingDeltaX(0)
+            , m_unacceleratedScrollingDeltaY(0)
 #endif
         {
         }
@@ -153,6 +159,10 @@
         PlatformWheelEventPhase phase() const { return m_phase; }
         PlatformWheelEventPhase momentumPhase() const { return m_momentumPhase; }
         bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
+
+        unsigned scrollCount() const { return m_scrollCount; }
+        float unacceleratedScrollingDeltaX() const { return m_unacceleratedScrollingDeltaX; }
+        float unacceleratedScrollingDeltaY() const { return m_unacceleratedScrollingDeltaY; }
 #endif
 
 #if PLATFORM(WIN)
@@ -181,6 +191,9 @@
         bool m_hasPreciseScrollingDeltas;
         PlatformWheelEventPhase m_phase;
         PlatformWheelEventPhase m_momentumPhase;
+        unsigned m_scrollCount;
+        float m_unacceleratedScrollingDeltaX;
+        float m_unacceleratedScrollingDeltaY;
 #endif
     };
 

Modified: branches/safari-536-branch/Source/WebCore/platform/mac/ScrollElasticityController.mm (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/platform/mac/ScrollElasticityController.mm	2012-05-16 20:25:32 UTC (rev 117331)
@@ -27,6 +27,7 @@
 #include "ScrollElasticityController.h"
 
 #include "PlatformWheelEvent.h"
+#include "WebCoreSystemInterface.h"
 #include <sys/time.h>
 #include <sys/sysctl.h>
 
@@ -67,9 +68,11 @@
 namespace WebCore {
 
 static const float scrollVelocityZeroingTimeout = 0.10f;
-static const float rubberbandStiffness = 20;
 static const float rubberbandDirectionLockStretchRatio = 1;
 static const float rubberbandMinimumRequiredDeltaBeforeStretch = 10;
+
+#if defined(BUILDING_ON_LEOPARD) || defined(BULDING_ON_SNOW_LEOPARD) || defined(BUILDING_ON_LION)
+static const float rubberbandStiffness = 20;
 static const float rubberbandAmplitude = 0.31f;
 static const float rubberbandPeriod = 1.6f;
 
@@ -92,7 +95,23 @@
 {
     return delta * rubberbandStiffness;
 }
+#else
+static float elasticDeltaForTimeDelta(float initialPosition, float initialVelocity, float elapsedTime)
+{
+    return wkNSElasticDeltaForTimeDelta(initialPosition, initialVelocity, elapsedTime);
+}
 
+static float elasticDeltaForReboundDelta(float delta)
+{
+    return wkNSElasticDeltaForReboundDelta(delta);
+}
+
+static float reboundDeltaForElasticDelta(float delta)
+{
+    return wkNSReboundDeltaForElasticDelta(delta);
+}
+#endif
+
 static float scrollWheelMultiplier()
 {
     static float multiplier = -1;
@@ -159,9 +178,21 @@
     // Reset overflow values because we may decide to remove delta at various points and put it into overflow.
     m_overflowScrollDelta = FloatSize();
 
-    float eventCoalescedDeltaX = -wheelEvent.deltaX();
-    float eventCoalescedDeltaY = -wheelEvent.deltaY();
+    IntSize stretchAmount = m_client->stretchAmount();
+    bool isVerticallyStretched = stretchAmount.height();
+    bool isHorizontallyStretched = stretchAmount.width();
 
+    float eventCoalescedDeltaX;
+    float eventCoalescedDeltaY;
+
+    if (isVerticallyStretched || isHorizontallyStretched) {
+        eventCoalescedDeltaX = -wheelEvent.unacceleratedScrollingDeltaX();
+        eventCoalescedDeltaY = -wheelEvent.unacceleratedScrollingDeltaY();
+    } else {
+        eventCoalescedDeltaX = -wheelEvent.deltaX();
+        eventCoalescedDeltaY = -wheelEvent.deltaY();
+    }
+
     deltaX += eventCoalescedDeltaX;
     deltaY += eventCoalescedDeltaY;
 
@@ -171,15 +202,8 @@
     else
         deltaY = 0;
 
-    bool isVerticallyStretched = false;
-    bool isHorizontallyStretched = false;
     bool shouldStretch = false;
 
-    IntSize stretchAmount = m_client->stretchAmount();
-
-    isHorizontallyStretched = stretchAmount.width();
-    isVerticallyStretched = stretchAmount.height();
-
     PlatformWheelEventPhase momentumPhase = wheelEvent.momentumPhase();
 
     // If we are starting momentum scrolling then do some setup.

Modified: branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.h	2012-05-16 20:25:32 UTC (rev 117331)
@@ -319,6 +319,10 @@
 extern BOOL (*wkFilterWasBlocked)(WebFilterEvaluator *);
 extern const char* (*wkFilterAddData)(WebFilterEvaluator *, const char* data, int* length);
 extern const char* (*wkFilterDataComplete)(WebFilterEvaluator *, int* length);
+
+extern CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
+extern CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
+extern CGFloat (*wkNSReboundDeltaForElasticDelta)(CGFloat delta);
 #endif
 
 }

Modified: branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm (117330 => 117331)


--- branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebCore/platform/mac/WebCoreSystemInterface.mm	2012-05-16 20:25:32 UTC (rev 117331)
@@ -202,4 +202,9 @@
 BOOL (*wkFilterWasBlocked)(WebFilterEvaluator *);
 const char* (*wkFilterAddData)(WebFilterEvaluator *, const char* data, int* length);
 const char* (*wkFilterDataComplete)(WebFilterEvaluator *, int* length);
+
+CGFloat (*wkNSElasticDeltaForTimeDelta)(CGFloat initialPosition, CGFloat initialVelocity, CGFloat elapsedTime);
+CGFloat (*wkNSElasticDeltaForReboundDelta)(CGFloat delta);
+CGFloat (*wkNSReboundDeltaForElasticDelta)(CGFloat delta);
 #endif
+

Modified: branches/safari-536-branch/Source/WebKit/mac/ChangeLog (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit/mac/ChangeLog	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit/mac/ChangeLog	2012-05-16 20:25:32 UTC (rev 117331)
@@ -1,3 +1,19 @@
+2012-05-16  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 117129
+
+    2012-05-15  Anders Carlsson  <ander...@apple.com>
+
+            Use unaccelerated scrolling deltas when rubber-banding
+            https://bugs.webkit.org/show_bug.cgi?id=86503
+            <rdar://problem/11378742>
+
+            Reviewed by Sam Weinig.
+
+            * WebCoreSupport/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+            Init new WKSI functions.
+
 2012-05-15  Sam Weinig  <s...@webkit.org>
 
         <rdar://problem/11401642> ENABLE_IFRAME_SEAMLESS should be turned off on the branch

Modified: branches/safari-536-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm	2012-05-16 20:25:32 UTC (rev 117331)
@@ -195,6 +195,10 @@
     INIT(FilterWasBlocked);
     INIT(FilterAddData);
     INIT(FilterDataComplete);
+
+    INIT(NSElasticDeltaForTimeDelta); 
+    INIT(NSElasticDeltaForReboundDelta); 
+    INIT(NSReboundDeltaForElasticDelta);
 #endif
     didInit = true;
 }

Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-05-16 20:25:32 UTC (rev 117331)
@@ -1,5 +1,47 @@
 2012-05-16  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 117129
+
+    2012-05-15  Anders Carlsson  <ander...@apple.com>
+
+            Use unaccelerated scrolling deltas when rubber-banding
+            https://bugs.webkit.org/show_bug.cgi?id=86503
+            <rdar://problem/11378742>
+
+            Reviewed by Sam Weinig.
+
+            * Shared/WebEvent.h:
+            (WebWheelEvent):
+            (WebKit::WebWheelEvent::scrollCount):
+            (WebKit::WebWheelEvent::unacceleratedScrollingDelta):
+            Add scroll count and unaccelerated scrolling delta.
+
+            * Shared/WebEventConversion.cpp:
+            (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
+            Initialize scroll count and unaccelerated scrolling deltas.
+
+            * Shared/WebWheelEvent.cpp:
+            (WebKit::WebWheelEvent::WebWheelEvent):
+            Initialize scroll count and unaccelerated scrolling deltas.
+
+            (WebKit::WebWheelEvent::encode):
+            (WebKit::WebWheelEvent::decode):
+            Encode and decode scroll count and unaccelerated scrolling deltas.
+
+            * Shared/mac/WebEventFactory.mm:
+            (WebKit::WebEventFactory::createWebWheelEvent):
+            Initialize the scroll count and unaccelerated scrolling deltas from the underlying NSEvent.
+
+            * UIProcess/WebPageProxy.cpp:
+            (WebKit::coalesce):
+            Coalesce unaccelerated scrolling deltas as well.
+
+            * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+            (InitWebCoreSystemInterface):
+            Init new WKSI functions.
+
+2012-05-16  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 117124
 
     2012-05-15  Alexey Proskuryakov  <a...@apple.com>

Modified: branches/safari-536-branch/Source/WebKit2/Shared/WebEvent.h (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/Shared/WebEvent.h	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/Shared/WebEvent.h	2012-05-16 20:25:32 UTC (rev 117331)
@@ -182,7 +182,7 @@
 
     WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Modifiers, double timestamp);
 #if PLATFORM(MAC)
-    WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, Phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, Modifiers, double timestamp, bool directionInvertedFromDevice);
+    WebWheelEvent(Type, const WebCore::IntPoint& position, const WebCore::IntPoint& globalPosition, const WebCore::FloatSize& delta, const WebCore::FloatSize& wheelTicks, Granularity, bool directionInvertedFromDevice, Phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, Modifiers, double timestamp);
 #endif
 
     const WebCore::IntPoint position() const { return m_position; }
@@ -195,6 +195,8 @@
     Phase phase() const { return static_cast<Phase>(m_phase); }
     Phase momentumPhase() const { return static_cast<Phase>(m_momentumPhase); }
     bool hasPreciseScrollingDeltas() const { return m_hasPreciseScrollingDeltas; }
+    uint32_t scrollCount() const { return m_scrollCount; }
+    const WebCore::FloatSize& unacceleratedScrollingDelta() const { return m_unacceleratedScrollingDelta; }
 #endif
 
     void encode(CoreIPC::ArgumentEncoder*) const;
@@ -213,6 +215,8 @@
     uint32_t m_phase; // Phase
     uint32_t m_momentumPhase; // Phase
     bool m_hasPreciseScrollingDeltas;
+    uint32_t m_scrollCount;
+    WebCore::FloatSize m_unacceleratedScrollingDelta;
 #endif
 };
 

Modified: branches/safari-536-branch/Source/WebKit2/Shared/WebEventConversion.cpp (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/Shared/WebEventConversion.cpp	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/Shared/WebEventConversion.cpp	2012-05-16 20:25:32 UTC (rev 117331)
@@ -136,6 +136,9 @@
         m_phase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.phase());
         m_momentumPhase = static_cast<WebCore::PlatformWheelEventPhase>(webEvent.momentumPhase());
         m_hasPreciseScrollingDeltas = webEvent.hasPreciseScrollingDeltas();
+        m_scrollCount = webEvent.scrollCount();
+        m_unacceleratedScrollingDeltaX = webEvent.unacceleratedScrollingDelta().width();
+        m_unacceleratedScrollingDeltaY = webEvent.unacceleratedScrollingDelta().height();
 #endif
     }
 };

Modified: branches/safari-536-branch/Source/WebKit2/Shared/WebWheelEvent.cpp (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/Shared/WebWheelEvent.cpp	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/Shared/WebWheelEvent.cpp	2012-05-16 20:25:32 UTC (rev 117331)
@@ -44,13 +44,14 @@
 #if PLATFORM(MAC)
     , m_phase(PhaseNone)
     , m_hasPreciseScrollingDeltas(false)
+    , m_scrollCount(0)
 #endif
 {
     ASSERT(isWheelEventType(type));
 }
 
 #if PLATFORM(MAC)
-WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, Phase phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, Modifiers modifiers, double timestamp, bool directionInvertedFromDevice)
+WebWheelEvent::WebWheelEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, const FloatSize& delta, const FloatSize& wheelTicks, Granularity granularity, bool directionInvertedFromDevice, Phase phase, Phase momentumPhase, bool hasPreciseScrollingDeltas, uint32_t scrollCount, const WebCore::FloatSize& unacceleratedScrollingDelta, Modifiers modifiers, double timestamp)
     : WebEvent(type, modifiers, timestamp)
     , m_position(position)
     , m_globalPosition(globalPosition)
@@ -61,6 +62,8 @@
     , m_phase(phase)
     , m_momentumPhase(momentumPhase)
     , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
+    , m_scrollCount(scrollCount)
+    , m_unacceleratedScrollingDelta(unacceleratedScrollingDelta)
 {
     ASSERT(isWheelEventType(type));
 }
@@ -80,6 +83,8 @@
     encoder->encode(m_phase);
     encoder->encode(m_momentumPhase);
     encoder->encode(m_hasPreciseScrollingDeltas);
+    encoder->encode(m_scrollCount);
+    encoder->encode(m_unacceleratedScrollingDelta);
 #endif
 }
 
@@ -106,6 +111,10 @@
         return false;
     if (!decoder->decode(t.m_hasPreciseScrollingDeltas))
         return false;
+    if (!decoder->decode(t.m_scrollCount))
+        return false;
+    if (!decoder->decode(t.m_unacceleratedScrollingDelta))
+        return false;
 #endif
     return true;
 }

Modified: branches/safari-536-branch/Source/WebKit2/Shared/mac/WebEventFactory.mm (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/Shared/mac/WebEventFactory.mm	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/Shared/mac/WebEventFactory.mm	2012-05-16 20:25:32 UTC (rev 117331)
@@ -34,6 +34,12 @@
 
 using namespace WebCore;
 
+@interface NSEvent (WebNSEventDetails)
+- (NSInteger)_scrollCount;
+- (CGFloat)_unacceleratedScrollingDeltaX;
+- (CGFloat)_unacceleratedScrollingDeltaY;
+@end
+
 namespace WebKit {
 
 // FIXME: This is a huge copy/paste from WebCore/PlatformEventFactoryMac.mm. The code should be merged.
@@ -385,8 +391,6 @@
     NSPoint position = pointForEvent(event, windowView);
     NSPoint globalPosition = globalPointForEvent(event);
 
-    WebWheelEvent::Granularity granularity  = WebWheelEvent::ScrollByPixelWheelEvent;
-
     BOOL continuous;
     float deltaX = 0;
     float deltaY = 0;
@@ -407,17 +411,34 @@
         deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
     }
 
+    WebWheelEvent::Granularity granularity  = WebWheelEvent::ScrollByPixelWheelEvent;
+
+#if HAVE(INVERTED_WHEEL_EVENTS)
+    bool directionInvertedFromDevice        = [event isDirectionInvertedFromDevice];
+#else
+    bool directionInvertedFromDevice        = false;
+#endif
+
     WebWheelEvent::Phase phase              = phaseForEvent(event);
     WebWheelEvent::Phase momentumPhase      = momentumPhaseForEvent(event);
     bool hasPreciseScrollingDeltas          = continuous;
+
+    uint32_t scrollCount;
+    FloatSize unacceleratedScrollingDelta;
+
+    static bool nsEventSupportsScrollCount = [NSEvent instancesRespondToSelector:@selector(_scrollCount)];
+    if (nsEventSupportsScrollCount) {
+        scrollCount = [event _scrollCount];
+        unacceleratedScrollingDelta = FloatSize([event _unacceleratedScrollingDeltaX], [event _unacceleratedScrollingDeltaY]);
+    } else {
+        scrollCount = 0;
+        unacceleratedScrollingDelta = FloatSize(deltaX, deltaY);
+    }
+
     WebEvent::Modifiers modifiers           = modifiersForEvent(event);
     double timestamp                        = [event timestamp];
-#if HAVE(INVERTED_WHEEL_EVENTS)
-    bool directionInvertedFromDevice        = [event isDirectionInvertedFromDevice];
-#else
-    bool directionInvertedFromDevice        = false;
-#endif
-    return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, phase, momentumPhase, hasPreciseScrollingDeltas, modifiers, timestamp, directionInvertedFromDevice);
+    
+    return WebWheelEvent(WebEvent::Wheel, IntPoint(position), IntPoint(globalPosition), FloatSize(deltaX, deltaY), FloatSize(wheelTicksX, wheelTicksY), granularity, directionInvertedFromDevice, phase, momentumPhase, hasPreciseScrollingDeltas, scrollCount, unacceleratedScrollingDelta, modifiers, timestamp);
 }
 
 WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(NSEvent *event, NSView *)

Modified: branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-05-16 20:25:32 UTC (rev 117331)
@@ -1019,7 +1019,9 @@
     FloatSize mergedWheelTicks = a.wheelTicks() + b.wheelTicks();
 
 #if PLATFORM(MAC)
-    return WebWheelEvent(WebEvent::Wheel, b.position(), b.globalPosition(), mergedDelta, mergedWheelTicks, b.granularity(), b.phase(), b.momentumPhase(), b.hasPreciseScrollingDeltas(), b.modifiers(), b.timestamp(), b.directionInvertedFromDevice());
+    FloatSize mergedUnacceleratedScrollingDelta = a.unacceleratedScrollingDelta() + b.unacceleratedScrollingDelta();
+
+    return WebWheelEvent(WebEvent::Wheel, b.position(), b.globalPosition(), mergedDelta, mergedWheelTicks, b.granularity(), b.directionInvertedFromDevice(), b.phase(), b.momentumPhase(), b.hasPreciseScrollingDeltas(), b.scrollCount(), mergedUnacceleratedScrollingDelta, b.modifiers(), b.timestamp());
 #else
     return WebWheelEvent(WebEvent::Wheel, b.position(), b.globalPosition(), mergedDelta, mergedWheelTicks, b.granularity(), b.modifiers(), b.timestamp());
 #endif

Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm (117330 => 117331)


--- branches/safari-536-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2012-05-16 20:20:10 UTC (rev 117330)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm	2012-05-16 20:25:32 UTC (rev 117331)
@@ -181,6 +181,10 @@
         INIT(FilterWasBlocked);
         INIT(FilterAddData);
         INIT(FilterDataComplete);
+
+        INIT(NSElasticDeltaForTimeDelta);
+        INIT(NSElasticDeltaForReboundDelta);
+        INIT(NSReboundDeltaForElasticDelta);
 #endif
 
     });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to