Chromium Code Reviews| Index: Source/core/svg/SVGAElement.cpp |
| diff --git a/Source/core/svg/SVGAElement.cpp b/Source/core/svg/SVGAElement.cpp |
| index 7cb84f81f84681390520a21c97e0d0a3f474d8cf..9c227e0ebacbc945f9b38ec76a1889c69383ae39 100644 |
| --- a/Source/core/svg/SVGAElement.cpp |
| +++ b/Source/core/svg/SVGAElement.cpp |
| @@ -41,6 +41,7 @@ |
| #include "core/loader/FrameLoaderTypes.h" |
| #include "core/page/Chrome.h" |
| #include "core/page/ChromeClient.h" |
| +#include "core/page/FocusController.h" |
| #include "core/page/Page.h" |
| #include "core/rendering/svg/RenderSVGInline.h" |
| #include "core/rendering/svg/RenderSVGText.h" |
| @@ -157,7 +158,13 @@ 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::shouldHaveFocusAppearance() const |
| +{ |
| + ASSERT(focused()); |
| + return !document().page()->focusController().wasFocusedByMouse() || SVGGraphicsElement::supportsFocus(); |
|
pdr.
2014/08/12 02:02:23
Why is this SVGGraphicsElement::supportsFocus inst
robwu
2014/08/12 14:27:49
I noticed that the HTMLAnchorElement refers to HTM
|
| } |
| bool SVGAElement::isURLAttribute(const Attribute& attribute) const |
| @@ -167,10 +174,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(); |
| } |