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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGAElement.cpp

Issue 1700833003: Consider focusability even when tabs-to-links is enabled for <svg:a> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/svg/custom/display-none-a-does-not-stop-focus-navigation.html ('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) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2010 Apple Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 if (isLink()) 191 if (isLink())
192 return supportsFocus(); 192 return supportsFocus();
193 193
194 return SVGElement::isMouseFocusable(); 194 return SVGElement::isMouseFocusable();
195 } 195 }
196 196
197 bool SVGAElement::isKeyboardFocusable() const 197 bool SVGAElement::isKeyboardFocusable() const
198 { 198 {
199 if (isFocusable() && Element::supportsFocus()) 199 if (isFocusable() && Element::supportsFocus())
200 return SVGElement::isKeyboardFocusable(); 200 return SVGElement::isKeyboardFocusable();
201 201 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks())
202 if (isLink()) 202 return false;
203 return document().frameHost()->chromeClient().tabsToLinks();
204 return SVGElement::isKeyboardFocusable(); 203 return SVGElement::isKeyboardFocusable();
205 } 204 }
206 205
207 bool SVGAElement::canStartSelection() const 206 bool SVGAElement::canStartSelection() const
208 { 207 {
209 if (!isLink()) 208 if (!isLink())
210 return SVGElement::canStartSelection(); 209 return SVGElement::canStartSelection();
211 return hasEditableStyle(); 210 return hasEditableStyle();
212 } 211 }
213 212
214 bool SVGAElement::willRespondToMouseClickEvents() 213 bool SVGAElement::willRespondToMouseClickEvents()
215 { 214 {
216 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents(); 215 return isLink() || SVGGraphicsElement::willRespondToMouseClickEvents();
217 } 216 }
218 217
219 } // namespace blink 218 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/custom/display-none-a-does-not-stop-focus-navigation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698