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

Julien Chaffraix
Reported 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.
Attachments
Proposed change. Use IntSize when applicable. (16.37 KB, patch)
2012-06-14 18:57 PDT, Julien Chaffraix
no flags
Version 2. Forgot to update WebKit callers. (21.15 KB, patch)
2012-06-15 10:12 PDT, Julien Chaffraix
no flags
Julien Chaffraix
Comment 1 2012-06-14 18:57:13 PDT
Created attachment 147706 [details] Proposed change. Use IntSize when applicable.
Build Bot
Comment 2 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
Julien Chaffraix
Comment 3 2012-06-15 10:12:22 PDT
Created attachment 147846 [details] Version 2. Forgot to update WebKit callers.
Eric Seidel (no email)
Comment 4 2012-06-19 20:28:22 PDT
Comment on attachment 147846 [details] Version 2. Forgot to update WebKit callers. LGTM.
WebKit Review Bot
Comment 5 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>
WebKit Review Bot
Comment 6 2012-06-20 10:24:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.