Changeset 52302 in webkit
- Timestamp:
- Dec 17, 2009 11:17:12 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52300 r52302 1 2009-12-17 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Darin Adler. 4 5 HTMLInputElement::stepMismatch() uses ambiguous overload of pow() 6 https://bugs.webkit.org/show_bug.cgi?id=32675 7 8 Use the double constant 2.0 instead of static_cast<double>(2). 9 10 * html/HTMLInputElement.cpp: 11 (WebCore::HTMLInputElement::stepMismatch): 12 1 13 2009-12-17 Justin Schuh <jschuh@chromium.org> 2 14 -
trunk/WebCore/html/HTMLInputElement.cpp
r52292 r52302 338 338 // value is greater than step*2^DBL_MANT_DIG, the following fmod() makes 339 339 // no sense. 340 if (doubleValue / pow( static_cast<double>(2), DBL_MANT_DIG) > step)340 if (doubleValue / pow(2.0, DBL_MANT_DIG) > step) 341 341 return false; 342 342 double remainder = fmod(doubleValue, step); 343 343 // Accepts errors in lower 7-bit. 344 double acceptableError = step / pow( static_cast<double>(2), DBL_MANT_DIG - 7);344 double acceptableError = step / pow(2.0, DBL_MANT_DIG - 7); 345 345 return acceptableError < remainder && remainder < (step - acceptableError); 346 346 }
Note: See TracChangeset
for help on using the changeset viewer.