New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 720225 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Numbers in cssom attributes should not use scientific notification

Project Member Reported by meade@chromium.org, May 10 2017

Issue description

Steps to reproduce the problem:
1. set "1000000px" height (or larger) for an element. For example:
document.body.style.height = "1000988px";

2. get this value For example:
document.body.style.height

What is the expected behavior?
The value of element.style.height will be the same as set ("1000988px")

What went wrong?
The value is "1.00099e+06px"

In the "Serializing CSS Values" section of the cssom spec, it says "Note: scientific notation is not used."
https://drafts.csswg.org/cssom/#serializing-css-values
 
Labels: Update-Quarterly

Comment 2 by shoon....@lge.com, Jun 16 2017

Firefox (v54.0, 64bits)
1000988px => document.body.style.height=1000990px
10009888px => document.body.style.height=1.00099e+7px

IE11 (v11.0.42)
1000988px => document.body.style.height=1000988px
10009888px => document.body.style.height=10009888px
100098888px => document.body.style.height=21474836.47px

Firefox also uses scientific notification, but IE does not.


Yeah, serializing to scinot loses precision, and actually changes the meaning in some circumstances - currently, scinot is defined to make it parse as a <number>, not an <integer>.  (This doesn't matter for dimensions.)  We should fix this.

Comment 4 by nainar@chromium.org, Oct 12 2017

Status: Started (was: Available)
I can take this on
Labels: -Update-Quarterly

Comment 6 by meade@chromium.org, Jan 8 2018

Cc: nainar@chromium.org
Status: Available (was: Started)
Project Member

Comment 7 by sheriffbot@chromium.org, Jan 8

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: -nainar@chromium.org
Status: Available (was: Untriaged)

Sign in to add a comment