Lines Matching refs:step
124 bool NumberInputType::stepMismatch(const String& value, double step) const
133 // is greater than step*2^DBL_MANT_DIG, the following computation for
135 if (doubleValue / pow(2.0, DBL_MANT_DIG) > step)
137 // The computation follows HTML5 4.10.7.2.10 `The step attribute' :
138 // ... that number subtracted from the step base is not an integral multiple
139 // of the allowed value step, the element is suffering from a step mismatch.
140 double remainder = fabs(doubleValue - step * round(doubleValue / step));
143 double computedAcceptableError = acceptableError(step);
144 return computedAcceptableError < remainder && remainder < (step - computedAcceptableError);
204 double NumberInputType::acceptableError(double step) const
206 return step / pow(2.0, FLT_MANT_DIG);