| Index: Source/web/tests/ScrollAnimatorNoneTest.cpp
|
| diff --git a/Source/web/tests/ScrollAnimatorNoneTest.cpp b/Source/web/tests/ScrollAnimatorNoneTest.cpp
|
| index e7c40bd0bf82f9ee9b38e029e910ad7ad780df47..8f63b83fb670548d7ae0d6c80ba27b5d967b48a1 100644
|
| --- a/Source/web/tests/ScrollAnimatorNoneTest.cpp
|
| +++ b/Source/web/tests/ScrollAnimatorNoneTest.cpp
|
| @@ -37,6 +37,7 @@
|
| #include <gmock/gmock.h>
|
| #include <gtest/gtest.h>
|
|
|
| +using namespace std;
|
| using namespace WebCore;
|
|
|
| using testing::AtLeast;
|
| @@ -276,9 +277,9 @@
|
|
|
| double deltaTime = m_data->m_lastAnimationTime - m_data->m_startTime;
|
| double timeLeft = m_data->m_animationTime - deltaTime;
|
| - double releaseTimeLeft = std::min(timeLeft, m_data->m_releaseTime);
|
| - double attackTimeLeft = std::max(0., m_data->m_attackTime - deltaTime);
|
| - double sustainTimeLeft = std::max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
|
| + double releaseTimeLeft = min(timeLeft, m_data->m_releaseTime);
|
| + double attackTimeLeft = max(0., m_data->m_attackTime - deltaTime);
|
| + double sustainTimeLeft = max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
|
|
|
| // If we're getting near the finish, the desired velocity can decrease since the time left gets increased.
|
| if (step * multiplier) {
|
| @@ -306,9 +307,9 @@
|
|
|
| double deltaTime = m_data->m_lastAnimationTime - m_data->m_startTime;
|
| double timeLeft = m_data->m_animationTime - deltaTime;
|
| - double releaseTimeLeft = std::min(timeLeft, m_data->m_releaseTime);
|
| - double attackTimeLeft = std::max(0., m_data->m_attackTime - deltaTime);
|
| - double sustainTimeLeft = std::max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
|
| + double releaseTimeLeft = min(timeLeft, m_data->m_releaseTime);
|
| + double attackTimeLeft = max(0., m_data->m_attackTime - deltaTime);
|
| + double sustainTimeLeft = max(0., timeLeft - releaseTimeLeft - attackTimeLeft);
|
| double distanceLeft = m_data->m_desiredPosition - *m_data->m_currentPosition;
|
|
|
| if (m_scrollingDown) {
|
|
|