Bug 77141

Summary: Simplify checking of whether we should rubberband horizontally
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch aroben: review+

Description Anders Carlsson 2012-01-26 14:26:12 PST
Simplify checking of whether we should rubberband horizontally
Comment 1 Anders Carlsson 2012-01-26 14:28:22 PST
Created attachment 124180 [details]
Patch
Comment 2 Adam Roben (:aroben) 2012-01-26 14:30:58 PST
Comment on attachment 124180 [details]
Patch

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

> Source/WebCore/platform/mac/ScrollAnimatorMac.mm:923
> -        if (m_scrollableArea->isHorizontalScrollerPinnedToMinimumPosition() &&
> -            isScrollingLeftAndShouldNotRubberBand(wheelEvent, m_scrollableArea))
> -            return false;
> -
> -        if (m_scrollableArea->isHorizontalScrollerPinnedToMaximumPosition() &&
> -            isScrollingRightAndShouldNotRubberBand(wheelEvent, m_scrollableArea))
> +        if (pinnedInDirection(-wheelEvent.deltaX(), 0) &&
> +            !shouldRubberBandInHorizontalDirection(wheelEvent, m_scrollableArea))

Do we still need isHorizontalScrollerPinnedToMinimumPosition/isHorizontalScrollerPinnedToMaximumPosition?

pinnedInDirection is a confusing function. It takes two deltas, not a direction! What does it all MEAN?
Comment 3 Anders Carlsson 2012-01-26 14:34:26 PST
Committed r106046: <http://trac.webkit.org/changeset/106046>