Bug 39884 - Full Page Zoom: rounding errors with element metrics
Summary: Full Page Zoom: rounding errors with element metrics
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on: 60318
  Show dependency treegraph
Reported: 2010-05-28 10:33 PDT by Ojan Vafai
Modified: 2012-10-08 16:14 PDT (History)
10 users (show)

See Also:

test case (378 bytes, text/html)
2010-05-28 18:33 PDT, Ojan Vafai
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.