Bug 77141 - Simplify checking of whether we should rubberband horizontally
Summary: Simplify checking of whether we should rubberband horizontally
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 14:26 PST by Anders Carlsson
Modified: 2012-01-26 14:34 PST (History)
0 users

See Also:


Attachments
Patch (2.98 KB, patch)
2012-01-26 14:28 PST, Anders Carlsson
aroben: review+
Details | Formatted Diff | Diff

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