| Index: Source/core/html/HTMLAnchorElement.cpp
|
| diff --git a/Source/core/html/HTMLAnchorElement.cpp b/Source/core/html/HTMLAnchorElement.cpp
|
| index 8aa7f7eac91f6f2094d75822d3579fb6c6128a9e..b1696b2b0e88eff47c06350936111c0381641f38 100644
|
| --- a/Source/core/html/HTMLAnchorElement.cpp
|
| +++ b/Source/core/html/HTMLAnchorElement.cpp
|
| @@ -43,6 +43,8 @@
|
| #include "core/loader/PingLoader.h"
|
| #include "core/page/Chrome.h"
|
| #include "core/page/ChromeClient.h"
|
| +#include "core/page/FocusController.h"
|
| +#include "core/page/Page.h"
|
| #include "core/rendering/RenderImage.h"
|
| #include "platform/PlatformMouseEvent.h"
|
| #include "platform/network/DNS.h"
|
| @@ -84,12 +86,16 @@ bool HTMLAnchorElement::supportsFocus() const
|
| return isLink() || HTMLElement::supportsFocus();
|
| }
|
|
|
| +bool HTMLAnchorElement::shouldHaveFocusAppearance() const
|
| +{
|
| + ASSERT(focused());
|
| + return !document().page()->focusController().wasFocusedByMouse() || HTMLElement::supportsFocus();
|
| +}
|
| +
|
| bool HTMLAnchorElement::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 HTMLElement::supportsFocus();
|
| + return supportsFocus();
|
|
|
| return HTMLElement::isMouseFocusable();
|
| }
|
|
|