Bug 133436

Summary: Don't scroll to non-integral scroll offsets
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, cmarcelo, commit-queue, jamesr, luiz, simon.fraser, thorton, tonikitoo
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Simon Fraser (smfr) 2014-06-01 12:43:34 PDT
Don't scroll to non-integral scroll offsets
Comment 1 Simon Fraser (smfr) 2014-06-01 12:45:53 PDT
Created attachment 232351 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-06-01 12:46:17 PDT
<rdar://problem/17088336>
Comment 3 zalan 2014-06-01 13:24:59 PDT
Comment on attachment 232351 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232351&action=review

> Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:324
> +    // FIXME: when we support half-pixel scroll positions on Retina displays, this will need to round to half pixels.

half-pixel -> device pixel

> Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:325
> +    FloatPoint roundedPosition(roundf(scrollPosition.x()), roundf(scrollPosition.y()));

I am wondering whether the input devices that send integral values do integer truncation or rounding. (and whether we should mimic that behavior)
Comment 4 Darin Adler 2014-06-01 14:49:04 PDT
Comment on attachment 232351 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232351&action=review

>> Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:325
>> +    FloatPoint roundedPosition(roundf(scrollPosition.x()), roundf(scrollPosition.y()));
> 
> I am wondering whether the input devices that send integral values do integer truncation or rounding. (and whether we should mimic that behavior)

Is this the single correct bottleneck for the rounding? What about the setScrollPositionWithoutContentEdgeConstraints and setScrollLayerPosition functions?
Comment 5 Simon Fraser (smfr) 2014-06-01 15:34:47 PDT
(In reply to comment #4)
> (From update of attachment 232351 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232351&action=review
> 
> >> Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:325
> >> +    FloatPoint roundedPosition(roundf(scrollPosition.x()), roundf(scrollPosition.y()));
> > 
> > I am wondering whether the input devices that send integral values do integer truncation or rounding. (and whether we should mimic that behavior)
> 
> Is this the single correct bottleneck for the rounding? What about the setScrollPositionWithoutContentEdgeConstraints and setScrollLayerPosition functions?

This is the bottleneck, yes.
Comment 6 WebKit Commit Bot 2014-06-01 16:07:51 PDT
Comment on attachment 232351 [details]
Patch

Clearing flags on attachment: 232351

Committed r169519: <http://trac.webkit.org/changeset/169519>
Comment 7 WebKit Commit Bot 2014-06-01 16:07:55 PDT
All reviewed patches have been landed.  Closing bug.