OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Links are focusable by default, but only allow links with tabindex or con
tenteditable to be mouse focusable. | 156 // Links are focusable by default, but only allow links with tabindex or con
tenteditable to be mouse focusable. |
157 // https://bugs.webkit.org/show_bug.cgi?id=26856 | 157 // https://bugs.webkit.org/show_bug.cgi?id=26856 |
158 if (isLink()) | 158 if (isLink()) |
159 return HTMLElement::supportsFocus(); | 159 return HTMLElement::supportsFocus(); |
160 | 160 |
161 return HTMLElement::isMouseFocusable(); | 161 return HTMLElement::isMouseFocusable(); |
162 } | 162 } |
163 | 163 |
164 bool HTMLAnchorElement::isKeyboardFocusable() const | 164 bool HTMLAnchorElement::isKeyboardFocusable() const |
165 { | 165 { |
166 if (!isLink()) | |
167 return HTMLElement::isKeyboardFocusable(); | |
168 | |
169 if (!isFocusable()) | 166 if (!isFocusable()) |
170 return false; | 167 return false; |
171 | 168 |
| 169 // If the tab index is set explicitly, ignore the tabsToLinks |
| 170 // setting and empty bounding box check. |
| 171 if (Element::supportsFocus()) |
| 172 return HTMLElement::isKeyboardFocusable(); |
| 173 |
172 Page* page = document().page(); | 174 Page* page = document().page(); |
173 if (!page) | 175 if (!page) |
174 return false; | 176 return false; |
175 | 177 |
176 if (!page->chrome().client().tabsToLinks()) | 178 if (!page->chrome().client().tabsToLinks()) |
177 return false; | 179 return false; |
178 | 180 |
179 if (isInCanvasSubtree()) | 181 if (isInCanvasSubtree()) |
180 return true; | 182 return true; |
181 | 183 |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 | 852 |
851 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. | 853 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. |
852 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) | 854 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) |
853 return; | 855 return; |
854 | 856 |
855 preconnectToURL(url, motivation); | 857 preconnectToURL(url, motivation); |
856 m_hasIssuedPreconnect = true; | 858 m_hasIssuedPreconnect = true; |
857 } | 859 } |
858 | 860 |
859 } | 861 } |
OLD | NEW |