Index: Source/core/page/SpatialNavigation.cpp |
diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp |
index 77606ddb4c91a389207c7a5c04d15528bccd0c8e..8e5a04e73224bfe466b569d5c52f4934121c2977 100644 |
--- a/Source/core/page/SpatialNavigation.cpp |
+++ b/Source/core/page/SpatialNavigation.cpp |
@@ -662,8 +662,8 @@ void distanceDataForNode(FocusType type, const FocusCandidate& current, FocusCan |
return; |
} |
- float x = (entryPoint.x() - exitPoint.x()) * (entryPoint.x() - exitPoint.x()); |
- float y = (entryPoint.y() - exitPoint.y()) * (entryPoint.y() - exitPoint.y()); |
+ float x = ((entryPoint.x() - exitPoint.x()) * (entryPoint.x() - exitPoint.x())).toFloat(); |
+ float y = ((entryPoint.y() - exitPoint.y()) * (entryPoint.y() - exitPoint.y())).toFloat(); |
float euclidianDistance = sqrt(x + y); |