Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1808)

Unified Diff: Source/web/tests/ScrollAnimatorNoneTest.cpp

Issue 330933002: Revert of Removing "using" declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698