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

Unified Diff: Source/platform/scroll/ScrollableArea.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/ScrollableArea.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableArea.cpp
diff --git a/Source/platform/scroll/ScrollableArea.cpp b/Source/platform/scroll/ScrollableArea.cpp
index e26773186f9953612798139083e6ca52d94e3c95..324499011a62f40bca0b7400a0d4eebbb8c02e67 100644
--- a/Source/platform/scroll/ScrollableArea.cpp
+++ b/Source/platform/scroll/ScrollableArea.cpp
@@ -304,16 +304,6 @@ bool ScrollableArea::scrollBehaviorFromString(const String& behaviorString, Scro
return true;
}
-ScrollResult ScrollableArea::handleWheel(const PlatformWheelEvent& wheelEvent)
-{
- // Wheel events which do not scroll are used to trigger zooming.
- if (!wheelEvent.canScroll())
- return ScrollResult();
-
- cancelProgrammaticScrollAnimation();
- return scrollAnimator()->handleWheelEvent(wheelEvent);
-}
-
// NOTE: Only called from Internals for testing.
void ScrollableArea::setScrollOffsetFromInternals(const IntPoint& offset)
{
@@ -576,7 +566,6 @@ DoublePoint ScrollableArea::clampScrollPosition(const DoublePoint& scrollPositio
return scrollPosition.shrunkTo(maximumScrollPositionDouble()).expandedTo(minimumScrollPositionDouble());
}
-
int ScrollableArea::lineStep(ScrollbarOrientation) const
{
return pixelsPerLineStep();
@@ -584,7 +573,8 @@ int ScrollableArea::lineStep(ScrollbarOrientation) const
int ScrollableArea::pageStep(ScrollbarOrientation orientation) const
{
- int length = (orientation == HorizontalScrollbar) ? visibleWidth() : visibleHeight();
+ IntRect visibleRect = visibleContentRect(IncludeScrollbars);
+ int length = (orientation == HorizontalScrollbar) ? visibleRect.width() : visibleRect.height();
int minPageStep = static_cast<float>(length) * minFractionToStepWhenPaging();
int pageStep = std::max(minPageStep, length - maxOverlapBetweenPages());
« no previous file with comments | « Source/platform/scroll/ScrollableArea.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698