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 (isFocusable() && Element::supportsFocus()) |
| 167 return HTMLElement::isKeyboardFocusable(); |
| 168 |
166 if (isLink()) { | 169 if (isLink()) { |
167 Page* page = document().page(); | 170 Page* page = document().page(); |
168 if (!page) | 171 if (!page) |
169 return false; | 172 return false; |
170 if (!page->chrome().client().tabsToLinks()) | 173 if (!page->chrome().client().tabsToLinks()) |
171 return false; | 174 return false; |
172 } | 175 } |
173 return HTMLElement::isKeyboardFocusable(); | 176 return HTMLElement::isKeyboardFocusable(); |
174 } | 177 } |
175 | 178 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 | 844 |
842 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. | 845 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. |
843 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) | 846 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) |
844 return; | 847 return; |
845 | 848 |
846 preconnectToURL(url, motivation); | 849 preconnectToURL(url, motivation); |
847 m_hasIssuedPreconnect = true; | 850 m_hasIssuedPreconnect = true; |
848 } | 851 } |
849 | 852 |
850 } | 853 } |
OLD | NEW |