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

Unified Diff: Source/core/html/forms/StepRange.cpp

Issue 172223003: Input type Number maximum value increase (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adds back in StepRange FLT_MANT_DIG Created 6 years, 10 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
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | Source/core/html/parser/HTMLParserIdioms.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/StepRange.cpp
diff --git a/Source/core/html/forms/StepRange.cpp b/Source/core/html/forms/StepRange.cpp
index 62a3afac9b47be031dc26a11f069d001d9ebbb07..8967c06652782de76711ec74bf0622b5e9d927ea 100644
--- a/Source/core/html/forms/StepRange.cpp
+++ b/Source/core/html/forms/StepRange.cpp
@@ -26,6 +26,7 @@
#include "wtf/MathExtras.h"
#include "wtf/text/WTFString.h"
#include <float.h>
+#include <stdio.h>
tkent 2014/02/28 01:12:04 This change is unnecessary.
Habib Virji 2014/03/04 09:33:44 Done. Apologies missed it.
using namespace std;
@@ -157,11 +158,11 @@ bool StepRange::stepMismatch(const Decimal& valueForCheck) const
DEFINE_STATIC_LOCAL(const Decimal, twoPowerOfDoubleMantissaBits, (Decimal::Positive, 0, UINT64_C(1) << DBL_MANT_DIG));
if (value / twoPowerOfDoubleMantissaBits > m_step)
return false;
- // The computation follows HTML5 4.10.7.2.10 `The step attribute' :
+ // http://www.whatwg.org/specs/web-apps/current-work/#the-step-attribute:
tkent 2014/02/28 01:12:04 We don't need to update this now.
Habib Virji 2014/03/04 09:33:44 Done.
// ... that number subtracted from the step base is not an integral multiple
// of the allowed value step, the element is suffering from a step mismatch.
const Decimal remainder = (value - m_step * (value / m_step).round()).abs();
- // Accepts errors in lower fractional part which IEEE 754 single-precision
+ // Accepts errors in lower fractional part which IEEE 754 double-precision
tkent 2014/02/28 01:12:04 Ditto.
Habib Virji 2014/03/04 09:33:44 Done.
// can't represent.
const Decimal computedAcceptableError = acceptableError();
return computedAcceptableError < remainder && remainder < (m_step - computedAcceptableError);
« no previous file with comments | « Source/core/html/forms/NumberInputType.cpp ('k') | Source/core/html/parser/HTMLParserIdioms.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698