Bug 39884

Summary: Full Page Zoom: rounding errors with element metrics
Product: WebKit Reporter: Ojan Vafai <ojan>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: djlee, eae, erosenthal, gregsimon, hyatt, isherman, komoroske, leviw, logingx, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on: 60318    
Bug Blocks:    
Attachments:
Description Flags
test case none

Description Ojan Vafai 2010-05-28 10:33:45 PDT
Google Spreadsheets has some bugs with rounding errors during full page zoom. The cause is the rounding to an int in adjustForLocalZoom in Element.cpp. It used to be unusable during full page zoom because the rounding errors would add up to quite a bit. They've thrown a bunch of JS code at it that detects the zoom level and guesses at what the rounding error will be. It mostly works now, but it's unfortunate, it's fragile and this surely affects other sites.

Firefox doesn't have this problem because use decimal values both interally and exposed to JS. Should we do the same? That's a super scary change, but it's the only way I can think of making full-page zoom actually work.

Test case attached.
Comment 1 Ojan Vafai 2010-05-28 18:33:11 PDT
Created attachment 57400 [details]
test case
Comment 2 Emil A Eklund 2012-10-08 16:14:57 PDT
This has been fixed by subpixel layout and works as expected on ports that enable the SUBPIXEL_LAYOUT flag. Marking as fixed.

Bug 85532 tracks the ports that have turned on the flag.