Bug 126054 - REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-banding at the top
Summary: REGRESSION: cnn.com will continue to reveal 1 px of overhang after rubber-ban...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Beth Dakin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-12-19 22:34 PST by Beth Dakin
Modified: 2013-12-19 23:17 PST (History)
10 users (show)

See Also:


Attachments
Patch (6.81 KB, patch)
2013-12-19 22:38 PST, Beth Dakin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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