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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp

Issue 2342913003: Replace narrowPrecisionToFloat with clampTo<float> (Closed)
Patch Set: Created 4 years, 3 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/modules/accessibility/AXProgressIndicator.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp b/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
index d133dfb4b0c007a4fccee7c3a81f9cfd16ebba4d..7e7fe7d0a6a5e26ae2c866e4c8a630bf345cb9e1 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
@@ -23,7 +23,7 @@
#include "core/html/HTMLProgressElement.h"
#include "core/layout/LayoutProgress.h"
#include "modules/accessibility/AXObjectCacheImpl.h"
-#include "platform/FloatConversion.h"
+#include "wtf/MathExtras.h"
namespace blink {
@@ -57,7 +57,7 @@ float AXProgressIndicator::valueForRange() const
return getAttribute(aria_valuenowAttr).toFloat();
if (element()->position() >= 0)
- return narrowPrecisionToFloat(element()->value());
+ return clampTo<float>(element()->value());
// Indeterminate progress bar should return 0.
return 0.0f;
}
@@ -67,7 +67,7 @@ float AXProgressIndicator::maxValueForRange() const
if (hasAttribute(aria_valuemaxAttr))
return getAttribute(aria_valuemaxAttr).toFloat();
- return narrowPrecisionToFloat(element()->max());
+ return clampTo<float>(element()->max());
}
float AXProgressIndicator::minValueForRange() const

Powered by Google App Engine
This is Rietveld 408576698