Issue metadata
Sign in to add a comment
|
getBoundingClientRect() results have some small bias based on zoom level
Reported by
anton.fe...@4straction.com,
Jan 31 2018
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 Steps to reproduce the problem: 1. Open http://jsfiddle.net/4ta5z7yh/ 2. Change zoom level. 3. Check a number in a green box. 4. Try several times with different zoom levels. What is the expected behavior? A number in a green box, the "top" value of box's bounding rect is always the same. What went wrong? A number in a green box, the "top" value of box's bounding rect is different every time. The difference is less than 0.05px regardless of zoom level and they don't seem to correlate. Did this work before? Yes 62 Does this work in other browsers? Yes Chrome version: 63.0.3239.132 Channel: n/a OS Version: 10.0 Flash Version: It works as expected in other browsers.
,
Jan 31 2018
Thanks for the report. This is due to limited precision due to the conversion between fixed-width and floating point values at the API boundary. Values are only guaranteed to be accurate to within 1/64 px. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Jan 31 2018