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

Unified Diff: Source/core/svg/SVGAElement.cpp

Issue 455223002: Make anchors mouse-focusable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: from scratch: put focus logic in Element Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« Source/core/dom/Element.h ('K') | « Source/core/svg/SVGAElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAElement.cpp
diff --git a/Source/core/svg/SVGAElement.cpp b/Source/core/svg/SVGAElement.cpp
index 7cb84f81f84681390520a21c97e0d0a3f474d8cf..a40d061e5433cce8979ba6bb18b1dd57e3fcd198 100644
--- a/Source/core/svg/SVGAElement.cpp
+++ b/Source/core/svg/SVGAElement.cpp
@@ -157,7 +157,12 @@ bool SVGAElement::supportsFocus() const
if (hasEditableStyle())
return SVGGraphicsElement::supportsFocus();
// If not a link we should still be able to focus the element if it has tabIndex.
- return isLink() || Element::supportsFocus();
+ return isLink() || SVGGraphicsElement::supportsFocus();
+}
+
+bool SVGAElement::shouldShowFocusRingOnMouseFocus() const
+{
+ return SVGGraphicsElement::supportsFocus();
}
bool SVGAElement::isURLAttribute(const Attribute& attribute) const
@@ -167,10 +172,8 @@ bool SVGAElement::isURLAttribute(const Attribute& attribute) const
bool SVGAElement::isMouseFocusable() const
{
- // Links are focusable by default, but only allow links with tabindex or contenteditable to be mouse focusable.
- // https://bugs.webkit.org/show_bug.cgi?id=26856
if (isLink())
- return Element::supportsFocus();
+ return supportsFocus();
return SVGElement::isMouseFocusable();
}
« Source/core/dom/Element.h ('K') | « Source/core/svg/SVGAElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698