[Webkit-unassigned] [Bug 101516] Handle gesture events on scrollbars.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 13 10:08:23 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=101516
--- Comment #6 from Antonio Gomes <tonikitoo at webkit.org> 2012-11-13 10:10:09 PST ---
(From update of attachment 173915)
View in context: https://bugs.webkit.org/attachment.cgi?id=173915&action=review
Did you check how does this added test behavior for ports that disable scrollbars?
> Source/WebCore/platform/Scrollbar.cpp:377
> + if (evt.type() == PlatformEvent::GestureTapDown) {
> + setPressedPart(theme()->hitTest(this, evt.position()));
> + m_pressedPos = (orientation() == HorizontalScrollbar ? convertFromContainingWindow(evt.position()).x() : convertFromContainingWindow(evt.position()).y());
> + return true;
> + }
> + if (m_pressedPart == ThumbPart && (evt.type() == PlatformEvent::GestureTapDownCancel || evt.type() == PlatformEvent::GestureScrollBegin))
> + return true;
> + if (m_pressedPart == ThumbPart && evt.type() == PlatformEvent::GestureScrollUpdate) {
> + moveThumb(m_pressedPos + (m_orientation == HorizontalScrollbar ? evt.deltaX() : evt.deltaY()), false);
> + return true;
> + }
> + if (evt.type() == PlatformEvent::GestureTap) {
> + if (m_pressedPart == ThumbPart || m_pressedPart == NoPart)
> + return false;
> + if (m_scrollableArea)
> + return m_scrollableArea->scroll(pressedPartScrollDirection(), pressedPartScrollGranularity());
> + }
By looking at this, would it look nicer if you handle all type's in a switch/case block instead?
> LayoutTests/fast/events/touch/gesture/gesture-scrollbar.html:51
> +function runTest()
> +{
> + internals.settings.setMockScrollbarsEnabled(true);
Did you check how this added test behavior for ports that disable scrollbars? AH, maybe setMockScrollbarsEnabled take care of it...
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list