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

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

Issue 302213002: Convert page-level classes to handle RemoteFrames from FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: bug fix Created 6 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
« no previous file with comments | « Source/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.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 6a8112cb6c787cc811602b52a92332af8cba13f2..c8ae77b3a70851b8f277867fa7e7b71bdfda1ad1 100644
--- a/Source/core/page/SpatialNavigation.cpp
+++ b/Source/core/page/SpatialNavigation.cpp
@@ -496,12 +496,14 @@ bool canScrollInDirection(const LocalFrame* frame, FocusType type)
static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame, const LayoutRect& initialRect)
{
LayoutRect rect = initialRect;
- for (LocalFrame* frame = initialFrame; frame; frame = frame->tree().parent()) {
+ for (Frame* frame = initialFrame; frame; frame = frame->tree().parent()) {
+ if (!frame->isLocalFrame())
+ continue;
if (Element* element = frame->ownerElement()) {
do {
rect.move(element->offsetLeft(), element->offsetTop());
} while ((element = element->offsetParent()));
- rect.move((-frame->view()->scrollOffset()));
+ rect.move((-toLocalFrame(frame)->view()->scrollOffset()));
}
}
return rect;
« no previous file with comments | « Source/core/page/ScopedPageLoadDeferrer.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698