Bug 89154

Summary: Use IntSize in RenderLayer to represent scroll offsets
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, darin, eric, sam, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed change. Use IntSize when applicable.
none
Version 2. Forgot to update WebKit callers. none

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.