Bug 126054

Summary: REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding at the top
Product: WebKit Reporter: Beth Dakin <bdakin>
Component: Layout and RenderingAssignee: Beth Dakin <bdakin>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, cmarcelo, commit-queue, jamesr, luiz, simon.fraser, thorton, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Description Beth Dakin 2013-12-19 22:34:54 PST
http://trac.webkit.org/changeset/160791 caused this regression. Patch forthcoming.
Comment 1 Radar WebKit Bug Importer 2013-12-19 22:35:40 PST
<rdar://problem/15706328>
Comment 2 Beth Dakin 2013-12-19 22:38:52 PST
Created attachment 219731 [details]
Patch
Comment 3 Simon Fraser (smfr) 2013-12-19 22:44:48 PST
Comment on attachment 219731 [details]
Patch

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

> Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:287
> +    float nearestXWithinBounds = std::max<float>(std::min<float>(currentScrollPosition.x(), maxPosition.x()), minPosition.x());
> +    float nearestYWithinBounds = std::max<float>(std::min<float>(currentScrollPosition.y(), maxPosition.y()), minPosition.y());

Not sure why you're doing this in floats (yet).

> Source/WebCore/platform/mac/ScrollAnimatorMac.mm:739
> +    bool currentlyConstrainsToContentEdge = m_scrollableArea->constrainsScrollingToContentEdge();
> +    m_scrollableArea->setConstrainsScrollingToContentEdge(true);

We can't use TemporaryChange<> here?
Comment 4 Beth Dakin 2013-12-19 23:12:36 PST
(In reply to comment #3)
> (From update of attachment 219731 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219731&action=review
> 
> > Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:287
> > +    float nearestXWithinBounds = std::max<float>(std::min<float>(currentScrollPosition.x(), maxPosition.x()), minPosition.x());
> > +    float nearestYWithinBounds = std::max<float>(std::min<float>(currentScrollPosition.y(), maxPosition.y()), minPosition.y());
> 
> Not sure why you're doing this in floats (yet).
> 

Will change to ints.

> > Source/WebCore/platform/mac/ScrollAnimatorMac.mm:739
> > +    bool currentlyConstrainsToContentEdge = m_scrollableArea->constrainsScrollingToContentEdge();
> > +    m_scrollableArea->setConstrainsScrollingToContentEdge(true);
> 
> We can't use TemporaryChange<> here?

I don't think we can because the bool belongs to ScrollableArea and this is ScrollAnimator. I think that ScrollAnimator would need a direct reference to the variable to use a TemporaryChange<>. Let me know if I am wrong though! I would be happy to fix it in a follow-up patch.
Comment 5 Beth Dakin 2013-12-19 23:17:20 PST
http://trac.webkit.org/changeset/160898