| Index: Source/core/page/TouchDisambiguation.cpp
|
| diff --git a/Source/core/page/TouchDisambiguation.cpp b/Source/core/page/TouchDisambiguation.cpp
|
| index fe825b8bf579e92cba96d758810205794e82ee9e..c74cf5599538ea28932f87404af4b3706f261557 100644
|
| --- a/Source/core/page/TouchDisambiguation.cpp
|
| +++ b/Source/core/page/TouchDisambiguation.cpp
|
| @@ -45,6 +45,8 @@
|
| #include "core/rendering/HitTestResult.h"
|
| #include "core/rendering/RenderBlock.h"
|
|
|
| +using namespace std;
|
| +
|
| namespace WebCore {
|
|
|
| static IntRect boundingBoxForEventNodes(Node* eventNode)
|
| @@ -75,8 +77,8 @@
|
| float score = 1;
|
|
|
| IntSize distance = boundingBox.differenceToPoint(touchPoint);
|
| - score *= std::max((padding - std::abs(distance.width())) * reciprocalPadding, 0.f);
|
| - score *= std::max((padding - std::abs(distance.height())) * reciprocalPadding, 0.f);
|
| + score *= max((padding - abs(distance.width())) * reciprocalPadding, 0.f);
|
| + score *= max((padding - abs(distance.height())) * reciprocalPadding, 0.f);
|
|
|
| return score;
|
| }
|
| @@ -90,7 +92,7 @@
|
| {
|
| goodTargets.clear();
|
|
|
| - int touchPointPadding = ceil(std::max(touchBox.width(), touchBox.height()) * 0.5);
|
| + int touchPointPadding = ceil(max(touchBox.width(), touchBox.height()) * 0.5);
|
|
|
| IntPoint touchPoint = touchBox.center();
|
| IntPoint contentsPoint = mainFrame->view()->windowToContents(touchPoint);
|
| @@ -130,7 +132,7 @@
|
| TouchTargetData& targetData = touchTargets.add(node, TouchTargetData()).storedValue->value;
|
| targetData.windowBoundingBox = boundingBoxForEventNodes(node);
|
| targetData.score = scoreTouchTarget(touchPoint, touchPointPadding, targetData.windowBoundingBox);
|
| - bestScore = std::max(bestScore, targetData.score);
|
| + bestScore = max(bestScore, targetData.score);
|
| break;
|
| }
|
| }
|
|
|