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

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

Issue 2900513002: Move CalculateScrollbarModes from FrameView to LayoutView. (Closed)
Patch Set: Created 3 years, 7 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
Index: third_party/WebKit/Source/core/page/SpatialNavigation.cpp
diff --git a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
index bba96114c553f431aa252da6d0a71eba828d7454..a94493668de1330c396c3d41832f301576a94acd 100644
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
@@ -37,6 +37,7 @@
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/html/HTMLImageElement.h"
#include "core/layout/LayoutBox.h"
+#include "core/layout/LayoutView.h"
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
#include "platform/geometry/IntRect.h"
@@ -359,9 +360,12 @@ bool CanScrollInDirection(const Node* container, WebFocusType type) {
bool CanScrollInDirection(const LocalFrame* frame, WebFocusType type) {
if (!frame->View())
return false;
+ LayoutView* layoutView = frame->ContentLayoutObject();
+ if (!layoutView)
+ return false;
ScrollbarMode vertical_mode;
ScrollbarMode horizontal_mode;
- frame->View()->CalculateScrollbarModes(horizontal_mode, vertical_mode);
+ layoutView->CalculateScrollbarModes(horizontal_mode, vertical_mode);
if ((type == kWebFocusTypeLeft || type == kWebFocusTypeRight) &&
kScrollbarAlwaysOff == horizontal_mode)
return false;

Powered by Google App Engine
This is Rietveld 408576698