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()) | 166 if (isLink()) { |
167 return HTMLElement::isKeyboardFocusable(); | 167 Page* page = document().page(); |
168 | 168 if (!page) |
169 if (!isFocusable()) | 169 return false; |
170 return false; | 170 if (!page->chrome().client().tabsToLinks()) |
171 | 171 return false; |
172 Page* page = document().page(); | 172 } |
173 if (!page) | 173 return HTMLElement::isKeyboardFocusable(); |
174 return false; | |
175 | |
176 if (!page->chrome().client().tabsToLinks()) | |
177 return false; | |
178 | |
179 if (isInCanvasSubtree()) | |
180 return true; | |
181 | |
182 return hasNonEmptyBoundingBox(); | |
183 } | 174 } |
184 | 175 |
185 static void appendServerMapMousePosition(StringBuilder& url, Event* event) | 176 static void appendServerMapMousePosition(StringBuilder& url, Event* event) |
186 { | 177 { |
187 if (!event->isMouseEvent()) | 178 if (!event->isMouseEvent()) |
188 return; | 179 return; |
189 | 180 |
190 ASSERT(event->target()); | 181 ASSERT(event->target()); |
191 Node* target = event->target()->toNode(); | 182 Node* target = event->target()->toNode(); |
192 ASSERT(target); | 183 ASSERT(target); |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 | 841 |
851 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. | 842 // The precision of current MouseOver trigger is too low to actually trigger
preconnects. |
852 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) | 843 if (motivation == WebKit::WebPreconnectMotivationLinkMouseOver) |
853 return; | 844 return; |
854 | 845 |
855 preconnectToURL(url, motivation); | 846 preconnectToURL(url, motivation); |
856 m_hasIssuedPreconnect = true; | 847 m_hasIssuedPreconnect = true; |
857 } | 848 } |
858 | 849 |
859 } | 850 } |
OLD | NEW |