summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-12-18 06:46:44 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-12-18 06:46:44 -0800
commit485577bbca8667339b88793a02f9a4400b477dd0 (patch)
tree6c12033d39b975cb9d0b08981d0a9bfbda29bb22 /WebCore
parent06b4dc1467fbed1b6d97d688ece43f15686f8644 (diff)
parent17789fff81dac758d724db8595a5ce80c949af5e (diff)
downloadexternal_webkit-485577bbca8667339b88793a02f9a4400b477dd0.zip
external_webkit-485577bbca8667339b88793a02f9a4400b477dd0.tar.gz
external_webkit-485577bbca8667339b88793a02f9a4400b477dd0.tar.bz2
Merge change Ife24867a
* changes: Updates use of pow() in HTMLInputElement::stepMismatch() to match version upstreamed to webkit.org.
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/html/HTMLInputElement.cpp14
1 files changed, 2 insertions, 12 deletions
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 @@ 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
+ 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().