Bug 77246 - Use LayoutSize instead of IntSize for RenderLayer::scrollOffset
Summary: Use LayoutSize instead of IntSize for RenderLayer::scrollOffset
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 14:39 PST by Tony Chang
Modified: 2012-02-07 14:42 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.56 KB, patch)
2012-01-27 14:40 PST, Tony Chang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Chang 2012-01-27 14:39:11 PST
Use LayoutSize instead of IntSize for RenderLayer::scrollOffset
Comment 1 Tony Chang 2012-01-27 14:40:06 PST
Created attachment 124370 [details]
Patch
Comment 2 Tony Chang 2012-01-27 14:42:05 PST
In some sense, all of these should be Int{Size,Point} since you can't scroll a fractional unit, but it looks like RenderLayer already uses mostly Layout{Size,Point} everywhere, so this is just for consistency.
Comment 3 Levi Weintraub 2012-01-27 15:09:10 PST
Comment on attachment 124370 [details]
Patch

This LGTM (there are annoying reasons why we want LayoutUnits for scroll), but I'm not a reviewer.
Comment 4 Darin Adler 2012-01-30 10:04:51 PST
Comment on attachment 124370 [details]
Patch

I am not sure this is correct. We intentionally don’t use rendering coordinates for scrolling; this is the place that the fractional layout machinery meets the non-fractional scrolling so some conversion is necessary. We should get the folks working on fractional pixel layout to remind us about how this works.
Comment 5 Tony Chang 2012-01-30 10:44:48 PST
(In reply to comment #4)
> (From update of attachment 124370 [details])
> I am not sure this is correct. We intentionally don’t use rendering coordinates for scrolling; this is the place that the fractional layout machinery meets the non-fractional scrolling so some conversion is necessary. We should get the folks working on fractional pixel layout to remind us about how this works.

Levi is working on fractional pixel layout.  Maybe he can explain in more detail why we use LayoutUnits for scroll offsets.
Comment 6 Levi Weintraub 2012-02-07 14:42:18 PST
(In reply to comment #5)
> Levi is working on fractional pixel layout.  Maybe he can explain in more detail why we use LayoutUnits for scroll offsets.

My initial response was incorrect. In the correct version of our patch, which we're working to get committed now, all scroll values are stored as integers representing pixels. We're working to correct this fallacy in trunk. Sorry for the confusion.