Bug 63333

Summary: CSS zoom property incorrectly affects offset
Product: WebKit Reporter: Malcolm MacLeod <mmacleod>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: eae
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
test none

Malcolm MacLeod
Reported 2011-06-24 10:51:34 PDT
When CSS zoom is applied to an element the element can return incorrect offset values as a results (even though it continues to display in the correct place), seemingly the code to fill in the offsets automatically assumes that the element itself has been affected by the zoom without actually checking to ensure this is the case. Steps to reproduce: 1) Open attached testcase "zoombug.html" 2) click through 3 alert messages observing the offsetLeft value that it displays 3) observe that in each case the actual position of the div has not changed 4) observe that only the content inside the div that is zoomed the page around the div and the div itself are not affected by the zoom 5) observe that in each case the offsetLeft value of the element does change despite the fact that it is clearly offset by the exact same amount it was previously
Attachments
test (848 bytes, text/html)
2011-06-24 11:07 PDT, Emil A Eklund
no flags
Emil A Eklund
Comment 1 2011-06-24 11:07:52 PDT
Created attachment 98513 [details] test I assume you meant to upload a copy of the test.
Emil A Eklund
Comment 2 2011-06-24 11:10:53 PDT
*** This bug has been marked as a duplicate of bug 39924 ***
Malcolm MacLeod
Comment 3 2011-06-24 11:18:43 PDT
Yes sorry, forgot to upload test thanks. Not entirely sure this is a duplicate of 39924 as in the case of 39924 the whole page is zoomed and the offsets of the elements do actually change visually. In this case the element does not move at all.
Emil A Eklund
Comment 4 2011-06-24 11:24:30 PDT
No worries, we'll make sure to run your test case when fixing 39924. Thanks for the report and the reduced test!
Note You need to log in before you can comment on or make changes to this bug.