Bug 85199 - when zoomed in/out getBoundingClientRect returns different height, width etc
Summary: when zoomed in/out getBoundingClientRect returns different height, width etc
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-30 08:20 PDT by Surendra Singhi
Modified: 2013-02-15 17:36 PST (History)
5 users (show)

See Also:


Attachments
Failing Test Case, shows an alert message (563 bytes, text/html)
2012-04-30 08:20 PDT, Surendra Singhi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Surendra Singhi 2012-04-30 08:20:13 PDT
Created attachment 139455 [details]
Failing Test Case, shows an alert message

At non 100% zoom levels, getBoundingClientRect does not returns height, width, top and left position values which are set using the style properties.

The attached testcase explains the problem.

This bug for example causes jquery UI draggable grid demo at http://jqueryui.com/demos/draggable/#snap-to to fail, when the zoom level is other than 100%.
Comment 1 Emil A Eklund 2013-02-15 17:36:14 PST
This was fixed by subpixel layout which was turned on for chrome in June and Safari about two months ago. The test as written will still fail for some zoom levels due to floating point imprecision. (I.e. it might return 199.9999234 instead of 200 in some cases).