Diff
Modified: trunk/Source/WebCore/ChangeLog (111685 => 111686)
--- trunk/Source/WebCore/ChangeLog 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/ChangeLog 2012-03-22 14:03:06 UTC (rev 111686)
@@ -1,3 +1,26 @@
+2012-03-22 W. James MacLean <wjmacl...@chromium.org>
+
+ Rename touchpad fling curve, add curve parameters to constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=81820
+
+ Reviewed by Adrienne Walker.
+
+ Covered by existing unit tests.
+
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * platform/ScrollAnimatorNone.cpp:
+ (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
+ * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp.
+ (WebCore):
+ (WebCore::TouchpadFlingPlatformGestureCurve::create):
+ (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
+ (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve):
+ (WebCore::TouchpadFlingPlatformGestureCurve::apply):
+ * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h.
+ (WebCore):
+ (TouchpadFlingPlatformGestureCurve):
+
2012-03-22 Pavel Feldman <pfeld...@chromium.org>
Web Inspector: make CSS and _javascript_ files editable by default.
Modified: trunk/Source/WebCore/GNUmakefile.list.am (111685 => 111686)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-03-22 14:03:06 UTC (rev 111686)
@@ -3564,8 +3564,8 @@
Source/WebCore/platform/text/UnicodeBidi.h \
Source/WebCore/platform/text/UnicodeRange.cpp \
Source/WebCore/platform/text/UnicodeRange.h \
- Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp \
- Source/WebCore/platform/TouchFlingPlatformGestureCurve.h \
+ Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp \
+ Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h \
Source/WebCore/platform/ThemeTypes.h \
Source/WebCore/platform/ThreadCheck.h \
Source/WebCore/platform/ThreadGlobalData.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (111685 => 111686)
--- trunk/Source/WebCore/WebCore.gypi 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/WebCore.gypi 2012-03-22 14:03:06 UTC (rev 111686)
@@ -3091,8 +3091,8 @@
'platform/ThreadTimers.cpp',
'platform/ThreadTimers.h',
'platform/Timer.cpp',
- 'platform/TouchFlingPlatformGestureCurve.cpp',
- 'platform/TouchFlingPlatformGestureCurve.h',
+ 'platform/TouchpadFlingPlatformGestureCurve.cpp',
+ 'platform/TouchpadFlingPlatformGestureCurve.h',
'platform/UUID.cpp',
'platform/UUID.h',
'platform/WheelFlingPlatformGestureCurve.cpp',
Modified: trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp (111685 => 111686)
--- trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/platform/ScrollAnimatorNone.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -41,7 +41,7 @@
#include "PlatformGestureEvent.h"
#include "ScrollableArea.h"
#include "ScrollbarTheme.h"
-#include "TouchFlingPlatformGestureCurve.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include <algorithm>
#include <wtf/CurrentTime.h>
#include <wtf/PassOwnPtr.h>
@@ -396,7 +396,7 @@
{
if (m_gestureAnimation)
m_gestureAnimation.clear();
- m_gestureAnimation = ActivePlatformGestureAnimation::create(TouchFlingPlatformGestureCurve::create(fp), this);
+ m_gestureAnimation = ActivePlatformGestureAnimation::create(TouchpadFlingPlatformGestureCurve::create(fp), this);
startNextTimer();
}
Deleted: trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp (111685 => 111686)
--- trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "TouchFlingPlatformGestureCurve.h"
-
-#include "PlatformGestureCurveTarget.h"
-#include "UnitBezier.h"
-#include <math.h>
-
-namespace WebCore {
-
-using namespace std;
-
-PassOwnPtr<PlatformGestureCurve> TouchFlingPlatformGestureCurve::create(const FloatPoint& velocity)
-{
- return adoptPtr(new TouchFlingPlatformGestureCurve(velocity));
-}
-
-TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve(const FloatPoint& velocity)
- : m_velocity(velocity)
- , m_timeScaleFactor(3 / log10(max(10.f, max(fabs(velocity.x()), fabs(velocity.y())))))
-{
- ASSERT(velocity != FloatPoint::zero());
-}
-
-TouchFlingPlatformGestureCurve::~TouchFlingPlatformGestureCurve()
-{
-}
-
-bool TouchFlingPlatformGestureCurve::apply(double time, PlatformGestureCurveTarget* target)
-{
- // Use 2-D Bezier curve with a "stretched-italic-s" curve.
- // We scale time logarithmically as this (subjectively) feels better.
- time *= m_timeScaleFactor;
-
- static UnitBezier flingBezier(0.3333, 0.6666, 0.6666, 1);
-
- float displacement;
- if (time < 0)
- displacement = 0;
- else if (time < 1) {
- // Below, s is the curve parameter for the 2-D Bezier curve (time(s), displacement(s)).
- double s = flingBezier.solveCurveX(time, 1.e-3);
- displacement = flingBezier.sampleCurveY(s);
- } else
- displacement = 1;
-
- // Keep track of integer portion of scroll thus far, and prepare increment.
- IntPoint scroll(displacement * m_velocity.x(), displacement * m_velocity.y());
- IntPoint scrollIncrement(scroll - m_cumulativeScroll);
- m_cumulativeScroll = scroll;
-
- if (time < 1 || scrollIncrement != IntPoint::zero()) {
- target->scrollBy(scrollIncrement);
- return true;
- }
-
- return false;
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.h (111685 => 111686)
--- trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.h 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.h 2012-03-22 14:03:06 UTC (rev 111686)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef TouchFlingPlatformGestureCurve_h
-#define TouchFlingPlatformGestureCurve_h
-
-#include "FloatPoint.h"
-#include "PlatformGestureCurve.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebCore {
-
-class PlatformGestureCurveTarget;
-
-// Implementation of PlatformGestureCurve suitable for touch pad/screen-based
-// fling scroll. Starts with a flat velocity profile based on 'velocity', which
-// tails off to zero. Time is scaled to that duration of the fling is proportional
-// the initial velocity.
-class TouchFlingPlatformGestureCurve : public PlatformGestureCurve {
-public:
- static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity);
- virtual ~TouchFlingPlatformGestureCurve();
-
- virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*);
-
-private:
- explicit TouchFlingPlatformGestureCurve(const FloatPoint& velocity);
-
- FloatPoint m_velocity;
- float m_timeScaleFactor;
- IntPoint m_cumulativeScroll;
-};
-
-} // namespace WebCore
-
-#endif
Copied: trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp (from rev 111685, trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp) (0 => 111686)
--- trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp (rev 0)
+++ trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include "TouchpadFlingPlatformGestureCurve.h"
+
+#include "PlatformGestureCurveTarget.h"
+#include <math.h>
+
+namespace WebCore {
+
+using namespace std;
+
+PassOwnPtr<PlatformGestureCurve> TouchpadFlingPlatformGestureCurve::create(const FloatPoint& velocity)
+{
+ return create(velocity, 3, FloatPoint(0.3333, 0.6666), FloatPoint(0.6666, 1));
+}
+
+PassOwnPtr<PlatformGestureCurve> TouchpadFlingPlatformGestureCurve::create(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2)
+{
+ return adoptPtr(new TouchpadFlingPlatformGestureCurve(velocity, unitTimeScaleLog10, bezierP1, bezierP2));
+}
+
+TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2)
+ : m_velocity(velocity)
+ , m_timeScaleFactor(unitTimeScaleLog10 / log10(max(10.f, max(fabs(velocity.x()), fabs(velocity.y())))))
+ , m_flingBezier(bezierP1.x(), bezierP1.y(), bezierP2.x(), bezierP2.y())
+{
+ ASSERT(velocity != FloatPoint::zero());
+}
+
+TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve()
+{
+}
+
+bool TouchpadFlingPlatformGestureCurve::apply(double time, PlatformGestureCurveTarget* target)
+{
+ // Use 2-D Bezier curve with a "stretched-italic-s" curve.
+ // We scale time logarithmically as this (subjectively) feels better.
+ time *= m_timeScaleFactor;
+
+ float displacement;
+ if (time < 0)
+ displacement = 0;
+ else if (time < 1) {
+ // Below, s is the curve parameter for the 2-D Bezier curve (time(s), displacement(s)).
+ double s = m_flingBezier.solveCurveX(time, 1.e-3);
+ displacement = m_flingBezier.sampleCurveY(s);
+ } else
+ displacement = 1;
+
+ // Keep track of integer portion of scroll thus far, and prepare increment.
+ IntPoint scroll(displacement * m_velocity.x(), displacement * m_velocity.y());
+ IntPoint scrollIncrement(scroll - m_cumulativeScroll);
+ m_cumulativeScroll = scroll;
+
+ if (time < 1 || scrollIncrement != IntPoint::zero()) {
+ target->scrollBy(scrollIncrement);
+ return true;
+ }
+
+ return false;
+}
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h (from rev 111685, trunk/Source/WebCore/platform/TouchFlingPlatformGestureCurve.h) (0 => 111686)
--- trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h (rev 0)
+++ trunk/Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h 2012-03-22 14:03:06 UTC (rev 111686)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef TouchpadFlingPlatformGestureCurve_h
+#define TouchpadFlingPlatformGestureCurve_h
+
+#include "FloatPoint.h"
+#include "PlatformGestureCurve.h"
+#include "UnitBezier.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+
+class PlatformGestureCurveTarget;
+
+// Implementation of PlatformGestureCurve suitable for touch pad/screen-based
+// fling scroll. Starts with a flat velocity profile based on 'velocity', which
+// tails off to zero. Time is scaled to that duration of the fling is proportional
+// the initial velocity.
+class TouchpadFlingPlatformGestureCurve : public PlatformGestureCurve {
+public:
+ static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity);
+ static PassOwnPtr<PlatformGestureCurve> create(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2);
+ virtual ~TouchpadFlingPlatformGestureCurve();
+
+ virtual bool apply(double monotonicTime, PlatformGestureCurveTarget*);
+
+private:
+ explicit TouchpadFlingPlatformGestureCurve(const FloatPoint& velocity, const float unitTimeScaleLog10, const FloatPoint& bezierP1, const FloatPoint& bezierP2);
+
+ FloatPoint m_velocity;
+ float m_timeScaleFactor;
+ IntPoint m_cumulativeScroll;
+ UnitBezier m_flingBezier;
+};
+
+} // namespace WebCore
+
+#endif
Modified: trunk/Source/WebKit/chromium/ChangeLog (111685 => 111686)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-22 14:03:06 UTC (rev 111686)
@@ -1,3 +1,16 @@
+2012-03-22 W. James MacLean <wjmacl...@chromium.org>
+
+ Rename touchpad fling curve, add curve parameters to constructor.
+ https://bugs.webkit.org/show_bug.cgi?id=81820
+
+ Reviewed by Adrienne Walker.
+
+ * src/WebCompositorInputHandlerImpl.cpp:
+ (WebKit::WebCompositorInputHandlerImpl::handleGestureFling):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::gestureEvent):
+ * tests/PlatformGestureCurveTest.cpp:
+
2012-03-21 Ian Vollick <voll...@chromium.org>
[chromium] timing functions are getting incorrectly applied for accelerated css transitions
Modified: trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp (111685 => 111686)
--- trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -28,7 +28,7 @@
#include "WebCompositorInputHandlerImpl.h"
#include "PlatformGestureCurveTarget.h"
-#include "TouchFlingPlatformGestureCurve.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include "TraceEvent.h"
#include "WebCompositorImpl.h"
#include "WebCompositorInputHandlerClient.h"
@@ -259,7 +259,7 @@
switch (scrollStatus) {
case CCInputHandlerClient::ScrollStarted: {
TRACE_EVENT_INSTANT0("cc", "WebCompositorInputHandlerImpl::handleGestureFling::started");
- OwnPtr<PlatformGestureCurve> flingCurve = TouchFlingPlatformGestureCurve::create(FloatPoint(-gestureEvent.deltaX, -gestureEvent.deltaY));
+ OwnPtr<PlatformGestureCurve> flingCurve = TouchpadFlingPlatformGestureCurve::create(FloatPoint(-gestureEvent.deltaX, -gestureEvent.deltaY));
m_wheelFlingAnimation = CCActiveGestureAnimation::create(PlatformGestureToCCGestureAdapter::create(flingCurve.release()), this);
m_wheelFlingPoint = IntPoint(gestureEvent.x, gestureEvent.y);
m_inputHandlerClient->scheduleAnimation();
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (111685 => 111686)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -110,7 +110,7 @@
#include "SpeechRecognitionClient.h"
#include "TextIterator.h"
#include "Timer.h"
-#include "TouchFlingPlatformGestureCurve.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include "TraceEvent.h"
#include "TypingCommand.h"
#include "UserGestureIndicator.h"
@@ -634,7 +634,7 @@
m_lastWheelGlobalPosition = WebPoint(event.globalX, event.globalY);
m_flingModifier = event.modifiers;
// FIXME: Make the curve parametrizable from the browser.
- m_gestureAnimation = ActivePlatformGestureAnimation::create(TouchFlingPlatformGestureCurve::create(FloatPoint(event.deltaX, event.deltaY)), this);
+ m_gestureAnimation = ActivePlatformGestureAnimation::create(TouchpadFlingPlatformGestureCurve::create(FloatPoint(event.deltaX, event.deltaY)), this);
scheduleAnimation();
return true;
}
Modified: trunk/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp (111685 => 111686)
--- trunk/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp 2012-03-22 13:59:41 UTC (rev 111685)
+++ trunk/Source/WebKit/chromium/tests/PlatformGestureCurveTest.cpp 2012-03-22 14:03:06 UTC (rev 111686)
@@ -29,7 +29,7 @@
#include "ActivePlatformGestureAnimation.h"
#include "PlatformGestureCurveTarget.h"
-#include "TouchFlingPlatformGestureCurve.h"
+#include "TouchpadFlingPlatformGestureCurve.h"
#include "WheelFlingPlatformGestureCurve.h"
#include "cc/CCActiveGestureAnimation.h"
#include "cc/CCGestureCurve.h"
@@ -100,9 +100,9 @@
TEST(PlatformGestureCurve, flingCurveTouch)
{
double initialVelocity = 1000;
- const double touchFlingCurveAreaFactor = 1; // Depends on parameterization in TouchFlingPlatformGestureCurve.
+ const double touchFlingCurveAreaFactor = 1; // Depends on parameterization in TouchpadFlingPlatformGestureCurve.
MockPlatformGestureCurveTarget target;
- OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(TouchFlingPlatformGestureCurve::create(FloatPoint(initialVelocity, 0)), &target);
+ OwnPtr<ActivePlatformGestureAnimation> animation = ActivePlatformGestureAnimation::create(TouchpadFlingPlatformGestureCurve::create(FloatPoint(initialVelocity, 0)), &target);
// Note: the expectations below are dependent on the value of sigma hard-coded in the Rayleigh
// curve. If sigma changes, these test expectations will also change.