summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-12-17 18:48:37 +0000
committerSteve Block <steveblock@google.com>2009-12-17 18:51:33 +0000
commitff875e53ee5cadb137435bb73bddf78c2b48a144 (patch)
treed264f3c56fa7a0561f32d72dd13706fbda018c7e
parent6ddddda63fdb2acedd17e06029f8cb5377fb9476 (diff)
downloadexternal_webkit-ff875e53ee5cadb137435bb73bddf78c2b48a144.zip
external_webkit-ff875e53ee5cadb137435bb73bddf78c2b48a144.tar.gz
external_webkit-ff875e53ee5cadb137435bb73bddf78c2b48a144.tar.bz2
Fixes the build break in master.
The new WebKit merge caused a build break when auto-merged from eclair-mr2 to master, due to the fact that master uses stl_port. Change-Id: I1437352a3439f3e103572ed3e1bb523ec65e98ef
-rw-r--r--WebCore/html/HTMLInputElement.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/html/HTMLInputElement.cpp b/WebCore/html/HTMLInputElement.cpp
index 163424d..6320e0c 100644
--- a/WebCore/html/HTMLInputElement.cpp
+++ b/WebCore/html/HTMLInputElement.cpp
@@ -340,11 +340,21 @@ bool HTMLInputElement::stepMismatch() const
// 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
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
return acceptableError < remainder && remainder < (step - acceptableError);
}
// Non-RANGE types should be rejected by getAllowedValueStep().