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

Unified Diff: third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp

Issue 1660863002: Force all LayoutUnit construction to be explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix LayoutRectTest.cpp Created 4 years, 10 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
Index: third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp
diff --git a/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp b/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp
index ebdd408ef4f3c87b74fe5879c58922ddd2badc71..354675fd5af8b089af80044d9469502edddcd044 100644
--- a/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/SliderThumbElement.cpp
@@ -154,8 +154,8 @@ void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point)
if (closest.isFinite()) {
double closestFraction = stepRange.proportionFromValue(closest).toDouble();
double closestRatio = isVertical || !isLeftToRightDirection ? 1.0 - closestFraction : closestFraction;
- LayoutUnit closestPosition = trackSize * closestRatio;
- const LayoutUnit snappingThreshold = 5;
+ LayoutUnit closestPosition(trackSize * closestRatio);
+ const LayoutUnit snappingThreshold(5);
if ((closestPosition - position).abs() <= snappingThreshold)
value = closest;
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLSelectElement.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutGeometryMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698