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; |
} |
} |