Bug 24703

Summary: Support snapping, ticks for <input type="range">
Product: WebKit Reporter: Peter Kasting <pkasting>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, hyatt, ian, jonlee, michelangelo, mike, ravi.kasibhatla, tkent, webkit-bug-importer, webmaster
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on: 27450, 27451    
Bug Blocks: 19264    
Attachments:
Description Flags
Testcase none

Description Peter Kasting 2009-03-19 14:27:21 PDT
<input type="range" min="1" max="3" step="1"> draws as an unmarked slider that slides smoothly from one end to the other.  It would be nicer to have tickmarks and to snap to them.  Try using Opera for a sample experience.
Comment 1 Peter Kasting 2009-03-19 14:27:46 PDT
Created attachment 28763 [details]
Testcase
Comment 2 Peter Kasting 2009-03-27 14:40:02 PDT
Hixie says: Draw tickmarks as given in list="".  If no list="", draw them for step="", unless step has been set to "any".

Hyatt says: 
Comment 3 Peter Kasting 2009-03-27 14:40:58 PDT
Bah, didn't mean to submit that yet.  Anyway, Hyatt says: Don't want ticks by default.  Perhaps also no ticks for step=1.
Comment 4 Peter Kasting 2009-03-27 14:59:46 PDT
My proposal: Do what Hixie says, but also don't draw tickmarks if we don't have enough room.  Assuming 1-px ticks, you'd need 2n + 1 pixels or more.  If the theme only goes down to k-px ticks, we'd probably want k(2n + 1) free pixels; below that, no tickmarks + no snapping.

Hopefully, this avoids breaking too many existing Mac widgets that don't want tickmarks, e.g. the Safari RSS widget, because they'd fail the 2n + 1 test.
Comment 5 Radar WebKit Bug Importer 2011-09-06 14:41:32 PDT
<rdar://problem/10081072>
Comment 6 Ravi Phaneendra Kasibhatla 2011-10-13 05:22:09 PDT
Is this issue still valid? If yes, I would like to propose a patch for the same.
Comment 7 Peter Kasting 2011-10-13 11:05:12 PDT
(In reply to comment #6)
> Is this issue still valid?

It's not closed and no one has commented otherwise, so assume yes.
Comment 8 Kent Tamura 2011-10-13 19:47:21 PDT
(In reply to comment #6)
> Is this issue still valid? If yes, I would like to propose a patch for the same.

Yes.
I think Comment #2 to #4 are reasonable.
Comment 9 Kent Tamura 2013-03-28 01:36:55 PDT
This was done as <datalist> support.