Closed
Bug 424387
Opened 18 years ago
Closed 18 years ago
getBoundingClientRect / getClientRects don't return integers
Categories
(Core :: DOM: CSS Object Model, defect)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
INVALID
People
(Reporter: jeresig, Unassigned)
References
()
Details
According to PPK, in Gecko 1.9, the getBoundingClientRect and getClientRects methods no longer return a correct value:
http://www.quirksmode.org/dom/w3c_cssom.html#elementviewm
A simple test case is provided here (click 'Show bounding rectangle'):
http://www.quirksmode.org/dom/tests/rectangles.html
| Reporter | ||
Comment 1•18 years ago
|
||
I forgot to mention but this is also part of the W3C CSSOM working draft:
http://www.w3.org/TR/cssom-view/
Comment 2•18 years ago
|
||
See bug 174397, comment 57. It was decided there that float were allowed.
I think there was also a draft spec, but I can't find one, anymore.
John just linked to it, and it says getBoundingClientRect/getClientRects can return floats.
John, why do you think this is a bug?
| Reporter | ||
Comment 4•18 years ago
|
||
Ok, I didn't realize that floats were permitted. Based upon the work that PPK did it sounded like this was a problem, I'll contact him, instead. Thanks.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Comment 5•18 years ago
|
||
Fwiw, I think I would prefer rounding these numbers too.
Rounding loses information. If we made these APIs round, then sooner or later we'd want to provide unrounded versions as well. So far I haven't heard of any real problems created by these APIs not rounding. Of course it's easy for toolkits to do the rounding themselves (whereas if we rounded, it would be basically impossible for toolkits to provide unrounded versions).
You need to log in
before you can comment on or make changes to this bug.
Description
•