Changeset 96639 in webkit
- Timestamp:
- Oct 4, 2011 1:44:05 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r96638 r96639 1 2011-10-04 Anders Carlsson <andersca@apple.com> 2 3 Use const PlatformWheelEvent references where possible 4 https://bugs.webkit.org/show_bug.cgi?id=69367 5 6 Reviewed by Sam Weinig. 7 8 * page/EventHandler.cpp: 9 (WebCore::EventHandler::handleWheelEvent): 10 * platform/ScrollAnimator.cpp: 11 (WebCore::ScrollAnimator::handleWheelEvent): 12 * platform/ScrollAnimator.h: 13 * platform/ScrollView.cpp: 14 (WebCore::ScrollView::wheelEvent): 15 * platform/ScrollView.h: 16 * platform/ScrollableArea.cpp: 17 (WebCore::ScrollableArea::handleWheelEvent): 18 * platform/ScrollableArea.h: 19 * platform/chromium/ScrollAnimatorChromiumMac.h: 20 * platform/chromium/ScrollAnimatorChromiumMac.mm: 21 (WebCore::ScrollAnimatorChromiumMac::handleWheelEvent): 22 * platform/mac/ScrollAnimatorMac.h: 23 * platform/mac/ScrollAnimatorMac.mm: 24 (WebCore::isScrollingLeftAndShouldNotRubberBand): 25 (WebCore::isScrollingRightAndShouldNotRubberBand): 26 (WebCore::ScrollAnimatorMac::handleWheelEvent): 27 (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): 28 1 29 2011-10-04 Andreas Kling <kling@webkit.org> 2 30 -
trunk/Source/WebCore/page/EventHandler.cpp
r96633 r96639 2168 2168 } 2169 2169 2170 // FIXME: This should not mutate the event. 2170 2171 if (shouldTurnVerticalTicksIntoHorizontal(result)) 2171 2172 e.turnVerticalTicksIntoHorizontal(); -
trunk/Source/WebCore/platform/ScrollAnimator.cpp
r96633 r96639 82 82 } 83 83 84 bool ScrollAnimator::handleWheelEvent( PlatformWheelEvent& e)84 bool ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e) 85 85 { 86 86 Scrollbar* horizontalScrollbar = m_scrollableArea->horizontalScrollbar(); -
trunk/Source/WebCore/platform/ScrollAnimator.h
r96561 r96639 64 64 virtual void setIsActive() { } 65 65 66 virtual bool handleWheelEvent( PlatformWheelEvent&);66 virtual bool handleWheelEvent(const PlatformWheelEvent&); 67 67 #if ENABLE(GESTURE_EVENTS) 68 68 virtual void handleGestureEvent(const PlatformGestureEvent&); -
trunk/Source/WebCore/platform/ScrollView.cpp
r96561 r96639 798 798 } 799 799 800 bool ScrollView::wheelEvent( PlatformWheelEvent& e)800 bool ScrollView::wheelEvent(const PlatformWheelEvent& e) 801 801 { 802 802 // We don't allow mouse wheeling to happen in a ScrollView that has had its scrollbars explicitly disabled. -
trunk/Source/WebCore/platform/ScrollView.h
r96561 r96639 235 235 // On Mac the underlying NSScrollView just does the scrolling, but on other platforms 236 236 // (like Windows), we need this function in order to do the scroll ourselves. 237 bool wheelEvent( PlatformWheelEvent&);237 bool wheelEvent(const PlatformWheelEvent&); 238 238 #if ENABLE(GESTURE_EVENTS) 239 239 void gestureEvent(const PlatformGestureEvent&); -
trunk/Source/WebCore/platform/ScrollableArea.cpp
r96561 r96639 124 124 } 125 125 126 bool ScrollableArea::handleWheelEvent( PlatformWheelEvent& wheelEvent)126 bool ScrollableArea::handleWheelEvent(const PlatformWheelEvent& wheelEvent) 127 127 { 128 128 return scrollAnimator()->handleWheelEvent(wheelEvent); -
trunk/Source/WebCore/platform/ScrollableArea.h
r96561 r96639 53 53 void scrollToYOffsetWithoutAnimation(float x); 54 54 55 bool handleWheelEvent( PlatformWheelEvent&);55 bool handleWheelEvent(const PlatformWheelEvent&); 56 56 #if ENABLE(GESTURE_EVENTS) 57 57 void handleGestureEvent(const PlatformGestureEvent&); -
trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.h
r96561 r96639 60 60 61 61 #if ENABLE(RUBBER_BANDING) 62 virtual bool handleWheelEvent( PlatformWheelEvent&) OVERRIDE;62 virtual bool handleWheelEvent(const PlatformWheelEvent&) OVERRIDE; 63 63 #if ENABLE(GESTURE_EVENTS) 64 64 virtual void handleGestureEvent(const PlatformGestureEvent&); -
trunk/Source/WebCore/platform/chromium/ScrollAnimatorChromiumMac.mm
r96633 r96639 782 782 } 783 783 784 bool ScrollAnimatorChromiumMac::handleWheelEvent( PlatformWheelEvent& wheelEvent)784 bool ScrollAnimatorChromiumMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent) 785 785 { 786 786 m_haveScrolledSincePageLoad = true; -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.h
r96561 r96639 63 63 64 64 #if ENABLE(RUBBER_BANDING) 65 virtual bool handleWheelEvent( PlatformWheelEvent&) OVERRIDE;65 virtual bool handleWheelEvent(const PlatformWheelEvent&) OVERRIDE; 66 66 #if ENABLE(GESTURE_EVENTS) 67 67 virtual void handleGestureEvent(const PlatformGestureEvent&); … … 138 138 void snapRubberBand(); 139 139 void snapRubberBandTimerFired(Timer<ScrollAnimatorMac>*); 140 void smoothScrollWithEvent( PlatformWheelEvent&);140 void smoothScrollWithEvent(const PlatformWheelEvent&); 141 141 void beginScrollGesture(); 142 142 void endScrollGesture(); -
trunk/Source/WebCore/platform/mac/ScrollAnimatorMac.mm
r96633 r96639 783 783 } 784 784 785 static inline bool isScrollingLeftAndShouldNotRubberBand( PlatformWheelEvent& wheelEvent, ScrollableArea* scrollableArea)785 static inline bool isScrollingLeftAndShouldNotRubberBand(const PlatformWheelEvent& wheelEvent, ScrollableArea* scrollableArea) 786 786 { 787 787 return wheelEvent.deltaX() > 0 && !scrollableArea->shouldRubberBandInDirection(ScrollLeft); 788 788 } 789 789 790 static inline bool isScrollingRightAndShouldNotRubberBand( PlatformWheelEvent& wheelEvent, ScrollableArea* scrollableArea)790 static inline bool isScrollingRightAndShouldNotRubberBand(const PlatformWheelEvent& wheelEvent, ScrollableArea* scrollableArea) 791 791 { 792 792 return wheelEvent.deltaX() < 0 && !scrollableArea->shouldRubberBandInDirection(ScrollRight); 793 793 } 794 794 795 bool ScrollAnimatorMac::handleWheelEvent( PlatformWheelEvent& wheelEvent)795 bool ScrollAnimatorMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent) 796 796 { 797 797 m_haveScrolledSincePageLoad = true; … … 924 924 } 925 925 926 void ScrollAnimatorMac::smoothScrollWithEvent( PlatformWheelEvent& wheelEvent)926 void ScrollAnimatorMac::smoothScrollWithEvent(const PlatformWheelEvent& wheelEvent) 927 927 { 928 928 m_haveScrolledSincePageLoad = true;
Note: See TracChangeset
for help on using the changeset viewer.