Intent to Deprecate and Remove: precision="float" attribute on <input type="range">

66 views
Skip to first unread message

Philip Jägenstedt

unread,
May 27, 2014, 5:33:15 AM5/27/14
to blink-dev

Primary eng (and PM) emails

phi...@opera.com


Summary

Remove the precision="float" attribute on <input type="range">, which is non-standard and can be replaced by step="any".


Motivation

10 years ago, this attribute was added to WebKit: http://trac.webkit.org/changeset/6311


I haven't been able to find it any spec, if it was it ought to have been here: http://www.w3.org/Submission/web-forms2/


5 years ago, support for step="any" was added to WebKit: http://trac.webkit.org/changeset/51159


These have the same effect, so the non-standard precision="float" can be removed.

Compatibility Risk

In this ad-hoc test, only WebKit and Blink appear to support the attribute:

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3041


Combined with the fact that usage is low, risk seems rather low.

Alternative implementation suggestion for web developers

Use step="any".


Usage information from UseCounter

http://www.chromestatus.com/metrics/feature/timeline/popularity/46


Usage appears to be slowly declining.

Entry on chromestatus.com and/or MDN

None.


Requesting approval to remove too?

Yes. The deprecation period doesn't seem useful, given the already low usage and lack of support in non-WebKit browsers.

PhistucK

unread,
May 27, 2014, 6:03:24 AM5/27/14
to Philip Jägenstedt, blink-dev
This either seems to have been mistakenly checked in, or it just was not mentioned in the commit message for some reason... funny.


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Eric Seidel

unread,
May 27, 2014, 1:40:04 PM5/27/14
to PhistucK, Philip Jägenstedt, blink-dev
lgtm

TAMURA, Kent

unread,
May 27, 2014, 7:24:17 PM5/27/14
to Eric Seidel, PhistucK, Philip Jägenstedt, blink-dev
LGTM2.

I prefer having deprecation period for one or two releases because this attribute has been available for 10 years.

--
TAMURA Kent
Software Engineer, Google


Ojan Vafai

unread,
May 27, 2014, 8:27:46 PM5/27/14
to TAMURA, Kent, Eric Seidel, PhistucK, Philip Jägenstedt, blink-dev
LGTM3

PhistucK

unread,
May 28, 2014, 1:30:44 AM5/28/14
to TAMURA, Kent, Eric Seidel, Philip Jägenstedt, blink-dev
That makes sense.


PhistucK

Philip Jägenstedt

unread,
May 28, 2014, 8:38:23 AM5/28/14
to TAMURA, Kent, Eric Seidel, PhistucK, blink-dev
Sorry, I saw "LGTM2" and "LGTM3" on my phone and sent out the prepared
CL, which has now landed:
https://codereview.chromium.org/301563002/

Should I revert and deprecate instead?

Philip

Eric Seidel

unread,
May 28, 2014, 9:40:21 AM5/28/14
to Philip Jägenstedt, TAMURA, Kent, PhistucK, blink-dev
I doubt it matters, especially given the way it was landed (hidden in
another commit) and how no other browser supports it. WebKit-only
sites which depend on this will break by their <input type='range'>
being integers instead of floats and will have a trivial fix of using
an explicit step value (like step='any') instead (and then magically
working in all other browsers).

If someone could find documentation on the internet mentioning
precision=float, that could be convincing evidence that we should keep
it for a while. I wasn't able to find any mention of precision=float
outside of this thread.

http://stackoverflow.com/questions/19011861/is-there-a-float-input-type-in-html5
http://blog.isotoma.com/2012/03/html5-input-typenumber-and-decimalsfloats-in-chrome/

TAMURA, Kent

unread,
May 28, 2014, 6:49:02 PM5/28/14
to Philip Jägenstedt, Eric Seidel, PhistucK, blink-dev
I don't think you need to revert it.  Sudden removal is also acceptable.

Reply all
Reply to author
Forward
0 new messages