[Webkit-unassigned] [Bug 146693] Rubber banding is broken when using a Mighty Mouse

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 8 22:44:50 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146693

--- Comment #6 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Ok -- I've traced the bug to what I believe is the source. Both mainframe and overflow scrolling go through ScrollController::handleWheelEvent. This, in turn, invokes the scroll client (m_client)'s immediateScrollBy method. This is where things start to diverge.

Mainframe scrolling uses ScrollingTreeFrameScrollingNodeMac::immediateScrollBy, which calls a few methods which end up clamping the destination scroll offset to a min and max. When scrolling against the edge of the mainframe a Mighty Mouse, this clamping operation doesn't cause us to go over the edge of the container, so mainframe Mighty Mouse scrolling behaves as expected.

For overflow scrolling, ScrollAnimatorMac::immediateScrollBy does something similar: before performing the scroll, it consults adjustScrollPositionIfNecessary for the scroll offsets it should land on. However, this *only* clamps the scroll offsets to the min/max if !m_scrollableArea.constrainsScrollingToContentEdge(). This is not the case initially, as the constructor for RenderLayer does not constrain scrolling to the content edge by default! I was able to "fix" this issue by turning this edge constraint on by default, but it's not clear whether this will have unintended consequences for other scrolling behaviors.

It was also reported in the original bug that scrolling was no longer broken once you scrolled within the container for a bit (i.e. if you scrolled down away from the edge and then scrolled back up against the edge, the problem would not occur). I found out that this is due to the current implementation of ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints for overflow scrolling, which calls m_scrollableArea.setConstrainsScrollingToContentEdge(true) regardless of whether or not the ScrollableArea previously constrained scrolling to content edges. I'm not sure whether this is intended behavior.

TL;DR The bug seems to be caused by the value of constrainsScrollingToContentEdge() in ScrollAnimatorMac::adjustScrollPositionIfNecessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150709/97b83187/attachment.html>


More information about the webkit-unassigned mailing list