Updates use of pow() in HTMLInputElement::stepMismatch() to match version upstreamed to webkit.org.
See https://bugs.webkit.org/show_bug.cgi?id=32675
Change-Id: Ife24867a1c96a3b46226d06862198a2e6dfeb216
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 6320e0c..acfe51f 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -340,21 +340,11 @@
// double's fractional part size is DBL_MAN_DIG-bit. If the current
// value is greater than step*2^DBL_MANT_DIG, the following fmod() makes
// no sense.
-#if PLATFORM(ANDROID)
- // TODO: Upstream this change or fix the underlying cause in Android's stl_port
- if (doubleValue / pow(2, static_cast<double>(DBL_MANT_DIG)) > step)
-#else
- if (doubleValue / pow(2, DBL_MANT_DIG) > step)
-#endif
+ if (doubleValue / pow(2.0, DBL_MANT_DIG) > step)
return false;
double remainder = fmod(doubleValue, step);
// Accepts errors in lower 7-bit.
-#if PLATFORM(ANDROID)
- // TODO: Upstream this change or fix the underlying cause in Android's stl_port
- double acceptableError = step / pow(2, static_cast<double>(DBL_MANT_DIG - 7));
-#else
- double acceptableError = step / pow(2, DBL_MANT_DIG - 7);
-#endif
+ double acceptableError = step / pow(2.0, DBL_MANT_DIG - 7);
return acceptableError < remainder && remainder < (step - acceptableError);
}
// Non-RANGE types should be rejected by getAllowedValueStep().