[Webkit-unassigned] [Bug 48308] Too precise serialization from floating point number to string for "number" input elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 31 23:18:04 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=48308





--- Comment #20 from Dai Mikurube <dmikurube at google.com>  2010-10-31 23:18:03 PST ---
(In reply to comment #18)
Thanks for your comments, Gavin.

I agree with your comments that reducing numeric erros is the first priority. It's very important. But I believe adjustment is always required. Numeric errors occur and accumulate if using double.

I tried just removing the line (from the version without my patch). Then, numeric errors still occur. And the error piles up by and by clicking. Like :
> 5.0249999999999995
> ...
> 5.064999999999999
> ...
> 5.109999999999998
> ...
> 5.149999999999997
> ...

I guess this snapping to integral multiples comes from 4.10.7.2.10 `The step attribute' (not 4.10.7.3) below. (Actually I have no idea on the true reason...it's not by me.) It mentions about stepMismatch(), not stepUp(). But the result of stepUp() should be false for stepMismatch().
> Constraint validation: When the element ... (snip) ... number, and 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.

Currently, a similar adjustment is done at NumberInputType::stepMismatch() to fix the bug 48220. This change replaced using fmod() with adjusting to integral multiples.
> https://bugs.webkit.org/show_bug.cgi?id=48220

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list