Index: Source/core/page/SpatialNavigation.cpp |
diff --git a/Source/core/page/SpatialNavigation.cpp b/Source/core/page/SpatialNavigation.cpp |
index 7a4b3f96f90397ce0288a7241b21e9ebf29b4f74..37426cb6a4dc61be1d71a93c753b8fc04dfac1f2 100644 |
--- a/Source/core/page/SpatialNavigation.cpp |
+++ b/Source/core/page/SpatialNavigation.cpp |
@@ -292,7 +292,7 @@ bool hasOffscreenRect(Node* node, FocusDirection direction) |
// Get the FrameView in which |node| is (which means the current viewport if |node| |
// is not in an inner document), so we can check if its content rect is visible |
// before we actually move the focus to it. |
- FrameView* frameView = node->document()->view(); |
+ FrameView* frameView = node->document().view(); |
if (!frameView) |
return true; |
@@ -437,7 +437,7 @@ Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection direc |
Node* parent = node; |
do { |
if (parent->isDocumentNode()) |
- parent = toDocument(parent)->document()->frame()->ownerElement(); |
+ parent = toDocument(parent)->document().frame()->ownerElement(); |
else |
parent = parent->parentOrShadowHostNode(); |
} while (parent && !canScrollInDirection(parent, direction) && !parent->isDocumentNode()); |
@@ -515,11 +515,11 @@ static LayoutRect rectToAbsoluteCoordinates(Frame* initialFrame, const LayoutRec |
LayoutRect nodeRectInAbsoluteCoordinates(Node* node, bool ignoreBorder) |
{ |
- ASSERT(node && node->renderer() && !node->document()->view()->needsLayout()); |
+ ASSERT(node && node->renderer() && !node->document().view()->needsLayout()); |
if (node->isDocumentNode()) |
return frameRectInAbsoluteCoordinates(toDocument(node)->frame()); |
- LayoutRect rect = rectToAbsoluteCoordinates(node->document()->frame(), node->boundingBox()); |
+ LayoutRect rect = rectToAbsoluteCoordinates(node->document().frame(), node->boundingBox()); |
// For authors that use border instead of outline in their CSS, we compensate by ignoring the border when calculating |
// the rect of the focused element. |
@@ -671,7 +671,7 @@ void distanceDataForNode(FocusDirection direction, const FocusCandidate& current |
float distance = euclidianDistance + sameAxisDistance + 2 * otherAxisDistance; |
candidate.distance = roundf(distance); |
- LayoutSize viewSize = candidate.visibleNode->document()->page()->mainFrame()->view()->visibleContentRect().size(); |
+ LayoutSize viewSize = candidate.visibleNode->document().page()->mainFrame()->view()->visibleContentRect().size(); |
candidate.alignment = alignmentForRects(direction, currentRect, nodeRect, viewSize); |
} |
@@ -727,7 +727,7 @@ LayoutRect virtualRectForAreaElementAndDirection(HTMLAreaElement* area, FocusDir |
ASSERT(area->imageElement()); |
// Area elements tend to overlap more than other focusable elements. We flatten the rect of the area elements |
// to minimize the effect of overlapping areas. |
- LayoutRect rect = virtualRectForDirection(direction, rectToAbsoluteCoordinates(area->document()->frame(), area->computeRect(area->imageElement()->renderer())), 1); |
+ LayoutRect rect = virtualRectForDirection(direction, rectToAbsoluteCoordinates(area->document().frame(), area->computeRect(area->imageElement()->renderer())), 1); |
return rect; |
} |