Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2256)

Unified Diff: Source/platform/scroll/ScrollAnimator.cpp

Issue 1298973004: Remove special wheel handling path from ScrollableArea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed TODO Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/scroll/ScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimatorNone.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollAnimator.cpp
diff --git a/Source/platform/scroll/ScrollAnimator.cpp b/Source/platform/scroll/ScrollAnimator.cpp
index 91bece5f83cf7b1eedecf4afba18e50cdf6fe9cf..75cdc5a167aba0e22836bca56805003408f74e85 100644
--- a/Source/platform/scroll/ScrollAnimator.cpp
+++ b/Source/platform/scroll/ScrollAnimator.cpp
@@ -72,66 +72,6 @@ void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
notifyPositionChanged();
}
-ScrollResult ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
-{
- bool canScrollX = m_scrollableArea->userInputScrollable(HorizontalScrollbar)
- && e.railsMode() != PlatformEvent::RailsModeVertical;
- bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar)
- && e.railsMode() != PlatformEvent::RailsModeHorizontal;
-
- // Accept the event if we are scrollable in that direction and can still
- // scroll any further.
- float deltaX = canScrollX ? e.deltaX() : 0;
- float deltaY = canScrollY ? e.deltaY() : 0;
-
- ScrollResult result;
-
-#if !OS(MACOSX)
- ScrollGranularity granularity = e.hasPreciseScrollingDeltas() ? ScrollByPrecisePixel : ScrollByPixel;
-#else
- ScrollGranularity granularity = ScrollByPixel;
-#endif
-
- if (deltaY) {
- if (e.granularity() == ScrollByPageWheelEvent) {
- bool negative = deltaY < 0;
- deltaY = m_scrollableArea->pageStep(VerticalScrollbar);
- if (negative)
- deltaY = -deltaY;
- }
-
- ScrollResultOneDimensional resultY = userScroll(
- VerticalScrollbar, granularity, m_scrollableArea->pixelStep(VerticalScrollbar), -deltaY);
- result.didScrollY = resultY.didScroll;
- if (e.granularity() != ScrollByPageWheelEvent) {
- if (resultY.didScroll)
- result.unusedScrollDeltaY = -resultY.unusedScrollDelta;
- else
- result.unusedScrollDeltaY = deltaY;
- }
- }
-
- if (deltaX) {
- if (e.granularity() == ScrollByPageWheelEvent) {
- bool negative = deltaX < 0;
- deltaX = m_scrollableArea->pageStep(HorizontalScrollbar);
- if (negative)
- deltaX = -deltaX;
- }
-
- ScrollResultOneDimensional resultX = userScroll(
- HorizontalScrollbar, granularity, m_scrollableArea->pixelStep(HorizontalScrollbar), -deltaX);
- result.didScrollX = resultX.didScroll;
- if (e.granularity() != ScrollByPageWheelEvent) {
- if (resultX.didScroll)
- result.unusedScrollDeltaX = -resultX.unusedScrollDelta;
- else
- result.unusedScrollDeltaX = deltaX;
- }
- }
- return result;
-}
-
void ScrollAnimator::setCurrentPosition(const FloatPoint& position)
{
m_currentPosX = position.x();
« no previous file with comments | « Source/platform/scroll/ScrollAnimator.h ('k') | Source/platform/scroll/ScrollAnimatorNone.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698