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

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

Issue 333173002: 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 8f63b83fb670548d7ae0d6c80ba27b5d967b48a1..e7c40bd0bf82f9ee9b38e029e910ad7ad780df47 100644
--- a/Source/web/tests/ScrollAnimatorNoneTest.cpp
+++ b/Source/web/tests/ScrollAnimatorNoneTest.cpp
@@ -37,7 +37,6 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
-using namespace std;
using namespace WebCore;
using testing::AtLeast;
@@ -277,9 +276,9 @@ bool ScrollAnimatorNoneTest::updateDataFromParameters(float step, float multipli
double deltaTime = m_data->m_lastAnimationTime - m_data->m_startTime;
double timeLeft = m_data->m_animationTime - deltaTime;
- 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 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);
// If we're getting near the finish, the desired velocity can decrease since the time left gets increased.
if (step * multiplier) {
@@ -307,9 +306,9 @@ bool ScrollAnimatorNoneTest::animateScroll(double currentTime)
double deltaTime = m_data->m_lastAnimationTime - m_data->m_startTime;
double timeLeft = m_data->m_animationTime - deltaTime;
- 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 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 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