Bug 85199

Summary: when zoomed in/out getBoundingClientRect returns different height, width etc
Product: WebKit Reporter: Surendra Singhi <ssinghi>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: bdakin, donggwan.kim, eae, mitz, sam
Priority: P2    
Version: 525.x (Safari 3.2)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Failing Test Case, shows an alert message none

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).