RESOLVED FIXED 64858
input[type='number'] with step="any" suffers from step mismatch.
https://bugs.webkit.org/show_bug.cgi?id=64858
Summary input[type='number'] with step="any" suffers from step mismatch.
Shinya Kawanaka
Reported 2011-07-20 03:34:49 PDT
This bug is related to https://bugs.webkit.org/show_bug.cgi?id=57723 For this input: <input min="0" max="100" step="any" value="1.5"> stepping up from renderer makes the value 3.0. I think this should be 2.5. The input with step="any" should not suffer from step mismatch.
Attachments
Patch (7.87 KB, patch)
2011-07-20 03:39 PDT, Shinya Kawanaka
no flags
Patch (8.89 KB, patch)
2011-07-21 19:38 PDT, Shinya Kawanaka
no flags
Shinya Kawanaka
Comment 1 2011-07-20 03:39:23 PDT
Kent Tamura
Comment 2 2011-07-20 04:02:59 PDT
Comment on attachment 101446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101446&action=review > Source/WebCore/html/HTMLInputElement.cpp:429 > + // If step is not "any", the value should by aligned to the step. > + const AtomicString& stepString = fastGetAttribute(stepAttr); > + if (!equalIgnoringCase(stepString, "any")) { This comment is not helpful. We avoid comments about "what we do here". This comment should be removed. Also, this comment has a typo; by -> be. In this case, you might want to make a function named alignValueForStep(...) for readability.
Shinya Kawanaka
Comment 3 2011-07-21 19:38:47 PDT
Kent Tamura
Comment 4 2011-07-21 20:04:48 PDT
Comment on attachment 101690 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=101690&action=review ok. > Source/WebCore/html/HTMLInputElement.cpp:428 > + const AtomicString& stepString = fastGetAttribute(stepAttr); > + if (!equalIgnoringCase(stepString, "any")) nit: The variable 'stepString' is not needed.
WebKit Review Bot
Comment 5 2011-07-21 20:27:43 PDT
Comment on attachment 101690 [details] Patch Clearing flags on attachment: 101690 Committed r91549: <http://trac.webkit.org/changeset/91549>
WebKit Review Bot
Comment 6 2011-07-21 20:27:47 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.