Issue metadata
Sign in to add a comment
|
Incorrect style height
Reported by
masha.st...@gmail.com,
Aug 18 2016
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Example URL:
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"
Does it occur on multiple sites: Yes
Is it a problem with a plugin? No
Did this work before? Yes
Does this work in other browsers? Yes
Chrome version: 52.0.2743.116 Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0
,
Aug 22 2016
Same on linux. Works ok in Firefox.
,
Aug 22 2016
Testcase: https://jsfiddle.net/d5k0ww3x/ Output: document.body.style.height=1.00099e+06px Expected: document.body.style.height=1000990px
,
Aug 22 2016
,
Aug 22 2016
It looks like we store and print it as 'float', not an integer. http://ideone.com/clFGOB
,
Aug 22 2016
From the messages in https://codereview.chromium.org/1120133004 it sounds like other browsers already behave the same? Can someone document more rigorously how other browsers handle serialization?
,
Aug 22 2016
CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/c8cf02a2b8d39e0f70c255e4d68f51da2b39cc49..e72c28f23412e1fc1cf1fbd1a7275f7be9fe477d Blink CL: https://chromium.googlesource.com/chromium/blink/+log/c7ff1249d91d7a819cd82e0934a8b723c7ca6484..e1b16464d72188571e1328fc9c1719e04d0d3d2f suspecting https://chromium.googlesource.com/chromium/blink/+/33f8fe1eef2a6f4c6c650834c2f9f45315924de7 rob.buis@, Could you please take a look at the issue and assign it to concerned developer if your changes are not responsible? Good Build: 45.0.2408.0 Bad Build: 45.0.2410.0 Note: 1. Able to reproduce the issue on Win7, Mac OSX 10.11.6, Ubuntu 14.04 using Chrome Stable 52.0.2743.116,Beta 53.0.2785.70, Dev 54.0.2832.2 and Canary 54.0.2835.0 2. Able to reproduce the issue using the testcase https://jsfiddle.net/d5k0ww3x/ (provided in c#3) 3. Before M45, in Chrome it is showing the value as document.body.style.height=1000988px (considered as good build) 4. Behaviour in other browsers FF 47.0 : document.body.style.height=1000990px; IE 11 - document.body.style.height=1000988px; Safari 5.1.7 - document.body.style.height=1000988px
,
Aug 22 2016
,
Sep 13 2016
Pinging the owner asking to confirm whether their change caused this regression.
,
Sep 14 2016
@9 yes, https://codereview.chromium.org/1120133004 caused an intentional change in behavior to be more spec compliant ("to not produce more than 6 decimals" spec addition). Note that Firefox will start to have similar behavior at higher values: > document.body.style.height = "9999995px"; > document.body.style.height "1e+7px"
,
Sep 15 2016
The cssom spec still says "Note: scientific notation is not used." for <number>.
,
Oct 13 2016
,
Nov 22 2016
Issue 613527 has been merged into this issue.
,
Nov 22 2016
Note also that https://codereview.chromium.org/1120133004 seems to cause style attributes to be formatted in a locale-dependent way (see also duped bug http://crbug.com/620380 ). Rob, could you please update us with your progress? Thanks!
,
Dec 3 2016
,
Feb 13 2017
,
May 10 2017
It looks like I've decided to split this into two more specific bugs, one for the locale-dependent formatting (720222) and one for scientific notation (720225). |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Aug 19 2016