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

Side by Side Diff: Source/core/page/SpatialNavigation.h

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org> 3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 , isOffscreen(true) 109 , isOffscreen(true)
110 , isOffscreenAfterScrolling(true) 110 , isOffscreenAfterScrolling(true)
111 { 111 {
112 } 112 }
113 113
114 FocusCandidate(Node* n, FocusDirection); 114 FocusCandidate(Node* n, FocusDirection);
115 explicit FocusCandidate(HTMLAreaElement* area, FocusDirection); 115 explicit FocusCandidate(HTMLAreaElement* area, FocusDirection);
116 bool isNull() const { return !visibleNode; } 116 bool isNull() const { return !visibleNode; }
117 bool inScrollableContainer() const { return visibleNode && enclosingScrollab leBox; } 117 bool inScrollableContainer() const { return visibleNode && enclosingScrollab leBox; }
118 bool isFrameOwnerElement() const { return visibleNode && visibleNode->isFram eOwnerElement(); } 118 bool isFrameOwnerElement() const { return visibleNode && visibleNode->isFram eOwnerElement(); }
119 Document* document() const { return visibleNode ? visibleNode->document() : 0; } 119 Document* document() const { return visibleNode ? &visibleNode->document() : 0; }
120 120
121 // We handle differently visibleNode and FocusableNode to properly handle th e areas of imagemaps, 121 // We handle differently visibleNode and FocusableNode to properly handle th e areas of imagemaps,
122 // where visibleNode would represent the image element and focusableNode wou ld represent the area element. 122 // where visibleNode would represent the image element and focusableNode wou ld represent the area element.
123 // In all other cases, visibleNode and focusableNode are one and the same. 123 // In all other cases, visibleNode and focusableNode are one and the same.
124 Node* visibleNode; 124 Node* visibleNode;
125 Node* focusableNode; 125 Node* focusableNode;
126 Node* enclosingScrollableBox; 126 Node* enclosingScrollableBox;
127 long long distance; 127 long long distance;
128 long long parentDistance; 128 long long parentDistance;
129 RectsAlignment alignment; 129 RectsAlignment alignment;
(...skipping 14 matching lines...) Expand all
144 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection, Node *); 144 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(FocusDirection, Node *);
145 LayoutRect nodeRectInAbsoluteCoordinates(Node*, bool ignoreBorder = false); 145 LayoutRect nodeRectInAbsoluteCoordinates(Node*, bool ignoreBorder = false);
146 LayoutRect frameRectInAbsoluteCoordinates(Frame*); 146 LayoutRect frameRectInAbsoluteCoordinates(Frame*);
147 LayoutRect virtualRectForDirection(FocusDirection, const LayoutRect& startingRec t, LayoutUnit width = 0); 147 LayoutRect virtualRectForDirection(FocusDirection, const LayoutRect& startingRec t, LayoutUnit width = 0);
148 LayoutRect virtualRectForAreaElementAndDirection(HTMLAreaElement*, FocusDirectio n); 148 LayoutRect virtualRectForAreaElementAndDirection(HTMLAreaElement*, FocusDirectio n);
149 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate&); 149 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate&);
150 150
151 } // namspace WebCore 151 } // namspace WebCore
152 152
153 #endif // SpatialNavigation_h 153 #endif // SpatialNavigation_h
OLDNEW
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/page/SpatialNavigation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698