Bug 87494 - Body scrollWidth() and scrollHeight() should be page scale-invariant
Summary: Body scrollWidth() and scrollHeight() should be page scale-invariant
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: John Knottenbelt
URL:
Keywords:
Depends on: 87700
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 05:59 PDT by John Knottenbelt
Modified: 2012-05-28 23:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.95 KB, patch)
2012-05-25 06:04 PDT, John Knottenbelt
no flags Details | Formatted Diff | Diff
Patch (6.45 KB, patch)
2012-05-25 06:36 PDT, John Knottenbelt
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Knottenbelt 2012-05-25 05:59:21 PDT
RenderView::documentRect() is calculating the "scaled" document rect by applying
the current transformation matrix to the unscaledDocumentRect() and then
returning the rounded-out IntRect result.

This rounding out is incorrect because it allows the scaled rectangle to
represent an area that is not actually covered by the document.

This is evidenced by the document.body.scrollWidth() and
document.body.scrollHeight() changing under page scale factor when
they are expected to remain invariant.
Comment 1 John Knottenbelt 2012-05-25 06:04:53 PDT
Created attachment 144054 [details]
Patch
Comment 2 John Knottenbelt 2012-05-25 06:36:53 PDT
Created attachment 144060 [details]
Patch
Comment 3 Sami Kyostila 2012-05-25 06:51:53 PDT
For posterity, the effect of this bug is being able to scroll a page one pixel beyond the actual content dimensions at some page scale factors. With the Chromium compositor this causes a red band to be shown to the right and bottom of the page.
Comment 4 James Robinson 2012-05-25 14:37:48 PDT
Comment on attachment 144060 [details]
Patch

Rounding for teh loss! R=me.
Comment 5 WebKit Review Bot 2012-05-25 14:49:09 PDT
Comment on attachment 144060 [details]
Patch

Clearing flags on attachment: 144060

Committed r118569: <http://trac.webkit.org/changeset/118569>
Comment 6 WebKit Review Bot 2012-05-25 14:49:13 PDT
All reviewed patches have been landed.  Closing bug.