| Index: ui/views/controls/link.cc
|
| diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
|
| index ec955b385979911957b4c951a59fe53d2357399d..1a135fee729b435f5bfed172e17a97b4aa539cf4 100644
|
| --- a/ui/views/controls/link.cc
|
| +++ b/ui/views/controls/link.cc
|
| @@ -20,6 +20,7 @@
|
| #include "ui/native_theme/native_theme.h"
|
| #include "ui/views/controls/link_listener.h"
|
| #include "ui/views/native_cursor.h"
|
| +#include "ui/views/style/platform_style.h"
|
|
|
| namespace views {
|
|
|
| @@ -162,7 +163,8 @@ void Link::SetText(const base::string16& text) {
|
| // Disable focusability for empty links. Otherwise Label::GetInsets() will
|
| // give them an unconditional 1-px. inset on every side to allow for a focus
|
| // border, when in this case we probably wanted zero width.
|
| - SetFocusable(!text.empty());
|
| + if (!text.empty())
|
| + PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::LINK, this);
|
| }
|
|
|
| void Link::OnNativeThemeChanged(const ui::NativeTheme* theme) {
|
| @@ -198,9 +200,10 @@ void Link::Init() {
|
|
|
| // Label::Init() calls SetText(), but if that's being called from Label(), our
|
| // SetText() override will not be reached (because the constructed class is
|
| - // only a Label at the moment, not yet a Link). So so the set_focusable()
|
| - // call explicitly here.
|
| - SetFocusable(!text().empty());
|
| + // only a Label at the moment, not yet a Link). So explicitly set
|
| + // focusability here.
|
| + if (!text().empty())
|
| + PlatformStyle::ConfigureFocus(PlatformStyle::CONTROL::LINK, this);
|
| }
|
|
|
| void Link::SetPressed(bool pressed) {
|
|
|