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

Unified Diff: Source/core/page/TouchDisambiguation.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/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/TouchDisambiguation.cpp
diff --git a/Source/core/page/TouchDisambiguation.cpp b/Source/core/page/TouchDisambiguation.cpp
index c74cf5599538ea28932f87404af4b3706f261557..2a6f8680ac12767b6028f9dda4cb1c4df32cee2c 100644
--- a/Source/core/page/TouchDisambiguation.cpp
+++ b/Source/core/page/TouchDisambiguation.cpp
@@ -45,8 +45,6 @@
#include "core/rendering/HitTestResult.h"
#include "core/rendering/RenderBlock.h"
-using namespace std;
-
namespace WebCore {
static IntRect boundingBoxForEventNodes(Node* eventNode)
@@ -77,8 +75,8 @@ static float scoreTouchTarget(IntPoint touchPoint, int padding, IntRect bounding
float score = 1;
IntSize distance = boundingBox.differenceToPoint(touchPoint);
- score *= max((padding - abs(distance.width())) * reciprocalPadding, 0.f);
- score *= max((padding - abs(distance.height())) * reciprocalPadding, 0.f);
+ score *= std::max((padding - abs(distance.width())) * reciprocalPadding, 0.f);
+ score *= std::max((padding - abs(distance.height())) * reciprocalPadding, 0.f);
return score;
}
@@ -92,7 +90,7 @@ void findGoodTouchTargets(const IntRect& touchBox, LocalFrame* mainFrame, Vector
{
goodTargets.clear();
- int touchPointPadding = ceil(max(touchBox.width(), touchBox.height()) * 0.5);
+ int touchPointPadding = ceil(std::max(touchBox.width(), touchBox.height()) * 0.5);
IntPoint touchPoint = touchBox.center();
IntPoint contentsPoint = mainFrame->view()->windowToContents(touchPoint);
@@ -132,7 +130,7 @@ void findGoodTouchTargets(const IntRect& touchBox, LocalFrame* mainFrame, Vector
TouchTargetData& targetData = touchTargets.add(node, TouchTargetData()).storedValue->value;
targetData.windowBoundingBox = boundingBoxForEventNodes(node);
targetData.score = scoreTouchTarget(touchPoint, touchPointPadding, targetData.windowBoundingBox);
- bestScore = max(bestScore, targetData.score);
+ bestScore = std::max(bestScore, targetData.score);
break;
}
}
« no previous file with comments | « Source/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/svg/animation/SMILTimeContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698