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

Unified Diff: Source/core/page/SpatialNavigation.cpp

Issue 16982005: Allow objects without scrollbars to be scrollable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed ScrollbarGroup pageStep Created 7 years, 5 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/core/page/FrameView.cpp ('k') | Source/core/platform/ScrollAnimator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/SpatialNavigation.cpp
diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp
index 64ff00a7d1f663ba78a898d848e6b386a9dda0b9..cb014f916c282beaef9813d6078bd17a04fbcadd 100644
--- a/Source/core/page/SpatialNavigation.cpp
+++ b/Source/core/page/SpatialNavigation.cpp
@@ -305,18 +305,18 @@ bool hasOffscreenRect(Node* node, FocusDirection direction)
// and we do not adjust for scrolling.
switch (direction) {
case FocusDirectionLeft:
- containerViewportRect.setX(containerViewportRect.x() - Scrollbar::pixelsPerLineStep());
- containerViewportRect.setWidth(containerViewportRect.width() + Scrollbar::pixelsPerLineStep());
+ containerViewportRect.setX(containerViewportRect.x() - ScrollableArea::pixelsPerLineStep());
+ containerViewportRect.setWidth(containerViewportRect.width() + ScrollableArea::pixelsPerLineStep());
break;
case FocusDirectionRight:
- containerViewportRect.setWidth(containerViewportRect.width() + Scrollbar::pixelsPerLineStep());
+ containerViewportRect.setWidth(containerViewportRect.width() + ScrollableArea::pixelsPerLineStep());
break;
case FocusDirectionUp:
- containerViewportRect.setY(containerViewportRect.y() - Scrollbar::pixelsPerLineStep());
- containerViewportRect.setHeight(containerViewportRect.height() + Scrollbar::pixelsPerLineStep());
+ containerViewportRect.setY(containerViewportRect.y() - ScrollableArea::pixelsPerLineStep());
+ containerViewportRect.setHeight(containerViewportRect.height() + ScrollableArea::pixelsPerLineStep());
break;
case FocusDirectionDown:
- containerViewportRect.setHeight(containerViewportRect.height() + Scrollbar::pixelsPerLineStep());
+ containerViewportRect.setHeight(containerViewportRect.height() + ScrollableArea::pixelsPerLineStep());
break;
default:
break;
@@ -342,16 +342,16 @@ bool scrollInDirection(Frame* frame, FocusDirection direction)
LayoutUnit dy = 0;
switch (direction) {
case FocusDirectionLeft:
- dx = - Scrollbar::pixelsPerLineStep();
+ dx = - ScrollableArea::pixelsPerLineStep();
break;
case FocusDirectionRight:
- dx = Scrollbar::pixelsPerLineStep();
+ dx = ScrollableArea::pixelsPerLineStep();
break;
case FocusDirectionUp:
- dy = - Scrollbar::pixelsPerLineStep();
+ dy = - ScrollableArea::pixelsPerLineStep();
break;
case FocusDirectionDown:
- dy = Scrollbar::pixelsPerLineStep();
+ dy = ScrollableArea::pixelsPerLineStep();
break;
default:
ASSERT_NOT_REACHED();
@@ -378,18 +378,18 @@ bool scrollInDirection(Node* container, FocusDirection direction)
LayoutUnit dy = 0;
switch (direction) {
case FocusDirectionLeft:
- dx = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollLeft());
+ dx = - min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollLeft());
break;
case FocusDirectionRight:
ASSERT(container->renderBox()->scrollWidth() > (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
- dx = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
+ dx = min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollWidth() - (container->renderBox()->scrollLeft() + container->renderBox()->clientWidth()));
break;
case FocusDirectionUp:
- dy = - min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollTop());
+ dy = - min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollTop());
break;
case FocusDirectionDown:
ASSERT(container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
- dy = min<LayoutUnit>(Scrollbar::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
+ dy = min<LayoutUnit>(ScrollableArea::pixelsPerLineStep(), container->renderBox()->scrollHeight() - (container->renderBox()->scrollTop() + container->renderBox()->clientHeight()));
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | Source/core/platform/ScrollAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698