[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
Thu Oct 28 17:33:37 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=48308
Kent Tamura <tkent at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #72189|review? |review-
Flag| |
--- Comment #7 from Kent Tamura <tkent at chromium.org> 2010-10-28 17:33:37 PST ---
(From update of attachment 72189)
View in context: https://bugs.webkit.org/attachment.cgi?id=72189&action=review
> JavaScriptCore/ChangeLog:5
> + Too precise serialization from floating point number to string
Please change the summary as Simon did for the bug entry.
We should mention that this affects only to input element.
> JavaScriptCore/JavaScriptCore.exp:392
> +__ZN3WTF14numberToStringEdPtj
We need similar change to JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def. The mangled symbol name in VC++ is different from gcc's.
> LayoutTests/fast/forms/script-tests/input-valueasnumber-number.js:24
> +shouldBe('valueAsNumberFor("123456789012345678901234567890123456789")', '1.23456789012345678E+38');
Why the result is changed? This test doesn't use serializeForNumberType().
> WebCore/html/HTMLInputElement.cpp:302
> + double acceptableError = step / pow(2.0, FLT_MANT_DIG);
This is specific to type=number. Other types such as type=date may have different acceptableError value.
Please introduce InputType::acceptableError(step) and override it in NumberInputType. You can merge the same expression in NumberImputType::stepMismatch().
> WebCore/html/HTMLInputElement.cpp:303
> + if (newValue - m_inputType->minimum() < -acceptableError) {
Is this change needed to pass existing tests? If not, we need new test cases.
> WebCore/html/HTMLInputElement.cpp:309
> + if (newValue - m_inputType->maximum() > acceptableError) {
ditto.
--
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