This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11936 - Progress element max and value IDL attributes should be float, not double
Summary: Progress element max and value IDL attributes should be float, not double
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 11:46 UTC by Mounir Lamouri
Modified: 2011-08-04 05:16 UTC (History)
4 users (show)

See Also:


Attachments

Description Mounir Lamouri 2011-02-01 11:46:02 UTC
AFAIUI, max and value content attributes are limited to single precision float values [1] so I don't understand why IDL attributes reflecting them should be double.
Maybe parsing float algorithm should be changed to allow double-precision attributes? Otherwise, these attribute should be float.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#rules-for-parsing-floating-point-number-values
Comment 1 Mounir Lamouri 2011-02-01 14:06:32 UTC
data:text/html,<progress value="0.42857142857142855"></progress><script>alert(document.getElementsByTagName('progress')[0].value == '0.42857142857142855')</script>

Opera: true
Webkit: true
Specs: false

Maybe I missed something in the specs but I think 0.42857142857142855 isn't a valid single-precision floating point number so .value can't return 0.42857142857142855.
I guess Opera and Webkit allows double-precision float for attributes (Gecko doesn't).

So, should we change the rules for parsing a floating point number or move back those IDL attributes to the float type?
Comment 2 Ian 'Hixie' Hickson 2011-02-25 08:10:29 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Oops, the parsing rules were supposed to have changed to double-precision, except I made a mistake when doing that change. I've updated the spec accordingly. (It's not expected that browsers will have caught up with that change yet, and we might still change it back.)

The s/single/double/ change was:
   http://html5.org/tools/web-apps-tracker?from=5372&to=5373
Comment 3 contributor 2011-02-25 08:12:16 UTC
Checked in as WHATWG revision r5915.
Check-in comment: oops, forgot to change s/single/double/ here when updating the spec to use double-precision everywhere (see r5373).
http://html5.org/tools/web-apps-tracker?from=5914&to=5915
Comment 4 Michael[tm] Smith 2011-08-04 05:16:27 UTC
mass-move component to LC1