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

Unified Diff: Source/core/page/TouchDisambiguation.cpp

Issue 330933002: Revert of 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 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;
}
}
« 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