Bug 89154 - Use IntSize in RenderLayer to represent scroll offsets
Summary: Use IntSize in RenderLayer to represent scroll offsets
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-14 18:49 PDT by Julien Chaffraix
Modified: 2012-06-20 10:24 PDT (History)
6 users (show)

See Also:


Attachments
Proposed change. Use IntSize when applicable. (16.37 KB, patch)
2012-06-14 18:57 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Version 2. Forgot to update WebKit callers. (21.15 KB, patch)
2012-06-15 10:12 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-06-14 18:49:01 PDT
The code mixes IntPoint, IntSize and int, which makes it hard to read, let alone change.

The rest of WebCore assumes that an offset is an IntSize but ScrollableArea uses IntPoint / FloatPoint to represent offsets. I don't know if there is a consensus on offsets being points vs sizes but the usage seems to point at size.

This change aims at simplifying the logic by switching as much of RenderLayer to using IntSize for manipulating scroll offsets. This has the added benefit of simplifying some of the computations by doing both coordinates with one line of code.
Comment 1 Julien Chaffraix 2012-06-14 18:57:13 PDT
Created attachment 147706 [details]
Proposed change. Use IntSize when applicable.
Comment 2 Build Bot 2012-06-14 19:22:41 PDT
Comment on attachment 147706 [details]
Proposed change. Use IntSize when applicable.

Attachment 147706 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12956539
Comment 3 Julien Chaffraix 2012-06-15 10:12:22 PDT
Created attachment 147846 [details]
Version 2. Forgot to update WebKit callers.
Comment 4 Eric Seidel (no email) 2012-06-19 20:28:22 PDT
Comment on attachment 147846 [details]
Version 2. Forgot to update WebKit callers.

LGTM.
Comment 5 WebKit Review Bot 2012-06-20 10:24:42 PDT
Comment on attachment 147846 [details]
Version 2. Forgot to update WebKit callers.

Clearing flags on attachment: 147846

Committed r120832: <http://trac.webkit.org/changeset/120832>
Comment 6 WebKit Review Bot 2012-06-20 10:24:46 PDT
All reviewed patches have been landed.  Closing bug.