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

Unified Diff: Source/core/rendering/RenderMarquee.cpp

Issue 339333002: Removing using declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing mac error 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/core/rendering/RenderListMarker.cpp ('k') | Source/core/rendering/RenderMenuList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMarquee.cpp
diff --git a/Source/core/rendering/RenderMarquee.cpp b/Source/core/rendering/RenderMarquee.cpp
index 4b1e9a20c0091534c35777a6a75d104cca44e73e..0a437ebb098cfb5b26d68b643834b917ee30e6d6 100644
--- a/Source/core/rendering/RenderMarquee.cpp
+++ b/Source/core/rendering/RenderMarquee.cpp
@@ -54,8 +54,6 @@
#include "core/rendering/RenderView.h"
#include "platform/LengthFunctions.h"
-using namespace std;
-
namespace WebCore {
using namespace HTMLNames;
@@ -129,13 +127,13 @@ int RenderMarquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge
}
if (dir == MRIGHT) {
if (stopAtContentEdge)
- return max<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+ return std::max<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
else
return ltr ? contentWidth : clientWidth;
}
else {
if (stopAtContentEdge)
- return min<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
+ return std::min<LayoutUnit>(0, ltr ? (contentWidth - clientWidth) : (clientWidth - contentWidth));
else
return ltr ? -clientWidth : -contentWidth;
}
@@ -145,13 +143,13 @@ int RenderMarquee::computePosition(EMarqueeDirection dir, bool stopAtContentEdge
int clientHeight = this->clientHeight();
if (dir == MUP) {
if (stopAtContentEdge)
- return min(contentHeight - clientHeight, 0);
+ return std::min(contentHeight - clientHeight, 0);
else
return -clientHeight;
}
else {
if (stopAtContentEdge)
- return max(contentHeight - clientHeight, 0);
+ return std::max(contentHeight - clientHeight, 0);
else
return contentHeight;
}
@@ -307,9 +305,9 @@ void RenderMarquee::timerFired()
int currentPos = (isHorizontal() ? layer()->scrollableArea()->scrollXOffset() : layer()->scrollableArea()->scrollYOffset());
newPos = currentPos + (addIncrement ? increment : -increment);
if (positive)
- newPos = min(newPos, endPoint);
+ newPos = std::min(newPos, endPoint);
else
- newPos = max(newPos, endPoint);
+ newPos = std::max(newPos, endPoint);
}
if (newPos == endPoint) {
« no previous file with comments | « Source/core/rendering/RenderListMarker.cpp ('k') | Source/core/rendering/RenderMenuList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698