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

Side by Side Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 15238002: Disallow tabsToLinks setting to prevent tabbing to anchor with tabIndex. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: And update expected result after removing accidentally added line 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
« no previous file with comments | « LayoutTests/fast/events/tab-focus-anchor-tab-to-links-expected.txt ('k') | no next file » | 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) 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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/tab-focus-anchor-tab-to-links-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698