Changeset 167634 in webkit
- Timestamp:
- Apr 21, 2014 5:05:02 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167632 r167634 1 2014-04-21 Brent Fulgham <bfulgham@apple.com> 2 3 [Mac] Difficulty gesture scrolling vertically with trackpad after scrolling horizontally 4 https://bugs.webkit.org/show_bug.cgi?id=131959 5 <rdar://problem/16654523> 6 7 Reviewed by Simon Fraser. 8 9 * page/mac/EventHandlerMac.mm: 10 (WebCore::deltaIsPredominantlyVertical): Added. 11 (WebCore::scrolledToEdgeInDominantDirection): Only consider current mouse wheel event. We don't care about 12 overall history when deciding if we are bumping against the edge of a scrollable region. Short-circuit if 13 the element style indicates that overflow is hidden, since this means there is no scroll possible in that 14 direction. 15 (WebCore::EventHandler::platformPrepareForWheelEvents): Update for new signature. 16 1 17 2014-04-21 Eric Carlson <eric.carlson@apple.com> 2 18 -
trunk/Source/WebCore/page/mac/EventHandlerMac.mm
r167560 r167634 753 753 } 754 754 755 static bool scrolledToEdgeInDominantDirection(const ScrollableArea& area, DominantScrollGestureDirection direction, float deltaX, float deltaY) 756 { 757 if (DominantScrollGestureDirection::Horizontal == direction && deltaX) { 755 static bool deltaIsPredominantlyVertical(float deltaX, float deltaY) 756 { 757 return std::abs(deltaY) > std::abs(deltaX); 758 } 759 760 static bool scrolledToEdgeInDominantDirection(const ContainerNode& container, const ScrollableArea& area, float deltaX, float deltaY) 761 { 762 if (!container.renderer()) 763 return true; 764 765 const RenderStyle& style = container.renderer()->style(); 766 767 if (!deltaIsPredominantlyVertical(deltaX, deltaY) && deltaX) { 768 if (style.overflowX() == OHIDDEN) 769 return true; 770 758 771 if (deltaX < 0) 759 772 return area.scrolledToRight(); … … 761 774 return area.scrolledToLeft(); 762 775 } 763 776 777 if (style.overflowY() == OHIDDEN) 778 return true; 779 764 780 if (deltaY < 0) 765 781 return area.scrolledToBottom(); … … 791 807 if (wheelEvent.shouldConsiderLatching()) { 792 808 if (scrollableArea) 793 m_startedGestureAtScrollLimit = scrolledToEdgeInDominantDirection(*scrollable Area, m_recentWheelEventDeltaTracker->dominantScrollGestureDirection(), wheelEvent.deltaX(), wheelEvent.deltaY());809 m_startedGestureAtScrollLimit = scrolledToEdgeInDominantDirection(*scrollableContainer, *scrollableArea, wheelEvent.deltaX(), wheelEvent.deltaY()); 794 810 else 795 811 m_startedGestureAtScrollLimit = false;
Note: See TracChangeset
for help on using the changeset viewer.