OLD | NEW |
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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef SpatialNavigation_h | 21 #ifndef SpatialNavigation_h |
22 #define SpatialNavigation_h | 22 #define SpatialNavigation_h |
23 | 23 |
| 24 #include "core/CoreExport.h" |
24 #include "core/dom/Node.h" | 25 #include "core/dom/Node.h" |
25 #include "platform/geometry/LayoutRect.h" | 26 #include "platform/geometry/LayoutRect.h" |
26 #include "public/platform/WebFocusType.h" | 27 #include "public/platform/WebFocusType.h" |
27 | 28 |
28 #include <limits> | 29 #include <limits> |
29 | 30 |
30 namespace blink { | 31 namespace blink { |
31 | 32 |
32 class LocalFrame; | 33 class LocalFrame; |
33 class HTMLAreaElement; | 34 class HTMLAreaElement; |
34 class HTMLFrameOwnerElement; | 35 class HTMLFrameOwnerElement; |
35 | 36 |
36 inline double MaxDistance() { | 37 inline double MaxDistance() { |
37 return std::numeric_limits<double>::max(); | 38 return std::numeric_limits<double>::max(); |
38 } | 39 } |
39 | 40 |
40 inline int FudgeFactor() { | 41 inline int FudgeFactor() { |
41 return 2; | 42 return 2; |
42 } | 43 } |
43 | 44 |
44 bool IsSpatialNavigationEnabled(const LocalFrame*); | 45 CORE_EXPORT bool IsSpatialNavigationEnabled(const LocalFrame*); |
45 bool SpatialNavigationIgnoresEventHandlers(const LocalFrame*); | 46 bool SpatialNavigationIgnoresEventHandlers(const LocalFrame*); |
46 | 47 |
47 // Spatially speaking, two given elements in a web page can be: | 48 // Spatially speaking, two given elements in a web page can be: |
48 // 1) Fully aligned: There is a full intersection between the rects, either | 49 // 1) Fully aligned: There is a full intersection between the rects, either |
49 // vertically or horizontally. | 50 // vertically or horizontally. |
50 // | 51 // |
51 // * Horizontally * Vertically | 52 // * Horizontally * Vertically |
52 // _ | 53 // _ |
53 // |_| _ _ _ _ _ _ | 54 // |_| _ _ _ _ _ _ |
54 // |_|...... _ |_|_|_|_|_|_| | 55 // |_|...... _ |_|_|_|_|_|_| |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 LayoutRect VirtualRectForDirection(WebFocusType, | 146 LayoutRect VirtualRectForDirection(WebFocusType, |
146 const LayoutRect& starting_rect, | 147 const LayoutRect& starting_rect, |
147 LayoutUnit width = LayoutUnit()); | 148 LayoutUnit width = LayoutUnit()); |
148 LayoutRect VirtualRectForAreaElementAndDirection(HTMLAreaElement&, | 149 LayoutRect VirtualRectForAreaElementAndDirection(HTMLAreaElement&, |
149 WebFocusType); | 150 WebFocusType); |
150 HTMLFrameOwnerElement* FrameOwnerElement(FocusCandidate&); | 151 HTMLFrameOwnerElement* FrameOwnerElement(FocusCandidate&); |
151 | 152 |
152 } // namespace blink | 153 } // namespace blink |
153 | 154 |
154 #endif // SpatialNavigation_h | 155 #endif // SpatialNavigation_h |
OLD | NEW |