RESOLVED FIXED 45803
Support keyboard operations for <input type=range>
https://bugs.webkit.org/show_bug.cgi?id=45803
Summary Support keyboard operations for <input type=range>
Kent Tamura
Reported 2010-09-14 21:05:59 PDT
Support keyboard operations for <input type=range>
Attachments
Patch (10.28 KB, patch)
2010-09-14 21:11 PDT, Kent Tamura
no flags
Patch 2 (10.26 KB, patch)
2010-09-21 20:11 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-09-14 21:11:15 PDT
Dimitri Glazkov (Google)
Comment 2 2010-09-15 07:31:59 PDT
Comment on attachment 67640 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67640&action=prettypatch Aren't you worried about the refactoring gods getting angry with you? :) This defaultEventHandler method is now nearly as long as the Ecclesiastes.
chris fleizach
Comment 3 2010-09-21 14:50:09 PDT
Comment on attachment 67640 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=67640&action=review > LayoutTests/ChangeLog:5 > + Support keyboard operations for <input type=range> end in period > WebCore/ChangeLog:5 > + Support keyboard operations for <input type=range> end in period. > WebCore/html/HTMLInputElement.cpp:2264 > + } else if (inputType() == RANGE) { instead of making this if block even longer, i'd suggest putting the RANGE code into another method for easing readability > WebCore/html/HTMLInputElement.cpp:2265 > + if (key == "Up" || key == "Right" || key == "Down" || key == "Left") { an early return would help here. > WebCore/html/HTMLInputElement.cpp:2281 > + } the previous 5 lines can be combined with the 5 lines in Down and Left > WebCore/html/HTMLInputElement.cpp:2296 > + step = -1; shouldn't step honor what's set in the "stepAttr" field?
Kent Tamura
Comment 4 2010-09-21 20:11:57 PDT
Created attachment 68333 [details] Patch 2
Kent Tamura
Comment 5 2010-09-21 20:15:06 PDT
Thank you for reviewing. (In reply to comment #3) > > LayoutTests/ChangeLog:5 > > + Support keyboard operations for <input type=range> > > end in period done. > > WebCore/ChangeLog:5 > > + Support keyboard operations for <input type=range> > > end in period. done. > > WebCore/html/HTMLInputElement.cpp:2264 > > + } else if (inputType() == RANGE) { > > instead of making this if block even longer, i'd suggest putting the RANGE code into another method for easing readability done. > > > WebCore/html/HTMLInputElement.cpp:2265 > > + if (key == "Up" || key == "Right" || key == "Down" || key == "Left") { > > an early return would help here. done. > > WebCore/html/HTMLInputElement.cpp:2281 > > + } > > the previous 5 lines can be combined with the 5 lines in Down and Left done. > > WebCore/html/HTMLInputElement.cpp:2296 > > + step = -1; > > shouldn't step honor what's set in the "stepAttr" field? This code reflects stepAttr value because the parameter of stepUp() is a magnification. I renamed "step" to "stepMagnification".
Kent Tamura
Comment 6 2010-09-21 20:18:55 PDT
(In reply to comment #4) > Created an attachment (id=68333) [details] > Patch 2 The patch adds new call of deprecatedInputType(). It is going to be removed by Bug#45872.
chris fleizach
Comment 7 2010-09-21 23:49:53 PDT
Comment on attachment 68333 [details] Patch 2 r=me
Kent Tamura
Comment 8 2010-09-22 01:09:54 PDT
Comment on attachment 68333 [details] Patch 2 Clearing flags on attachment: 68333 Committed r68024: <http://trac.webkit.org/changeset/68024>
Kent Tamura
Comment 9 2010-09-22 01:10:02 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.