Existing test: LayoutTests/platform/mac/fast/forms/listbox-scrollbar-hit-test.html The test seems to succeed in DRT but the scrollbars don't work properly in Safari. Scrollwheel events seem to work, but clicking on the scrollbar, using up/down etc all don't work.
Hmm, I see the "native animator" getting called, but ends up doing nothing: ScrollAnimatorMac::scroll... [m_scrollAnimationHelper.get() scrollToPoint:newPoint]; gdb> po m_scrollAnimationHelper.get() <NSScrollAnimationHelper: 0x118616b50> Because ScrollAnimatorMac::adjustScrollPositionIfNecessary resets the y scroll to 0: float newY = max<float>(min<float>(position.y(), m_scrollableArea->contentsSize().height() - m_scrollableArea->visibleHeight()), 0); => max(min(1, 125-129), 0) => max(min(1, -4), 0) => max(-1, 0) => 0 Is the "- m_scrollableArea->visibleHeight()" part of the equation necessary? It sounds like we just want to clamp in the content size, in this case from 0 to 125 and the visible height is not needed? However, I think custom scrollers work. So I'll compare this to custom scrollers.
This breaks whenever the visibleHeight is greater than the contentHeight. So this is broken for custom scrollbars as well.
Created attachment 100430 [details] [PATCH] Proposed Fix
Created attachment 100431 [details] [PATCH] Proposed Fix Now with git add ChangeLog!
Joe, do you know why this seems to work in DRT?
Nope, I didn't look into that =/.
The difference between content and visible should be padding/margin, no? We need some way to test this...
Would a test that used up/down work?
Comment on attachment 100431 [details] [PATCH] Proposed Fix r- for lack of test or lack of why testing is impossible/impratical.