| Index: ui/views/controls/link.cc
|
| diff --git a/ui/views/controls/link.cc b/ui/views/controls/link.cc
|
| index ec955b385979911957b4c951a59fe53d2357399d..a49bdbca5a28f736e87009352b49e111e50aa883 100644
|
| --- a/ui/views/controls/link.cc
|
| +++ b/ui/views/controls/link.cc
|
| @@ -159,10 +159,11 @@ void Link::SetFontList(const gfx::FontList& font_list) {
|
|
|
| void Link::SetText(const base::string16& text) {
|
| Label::SetText(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());
|
| + SetFocusBehavior(text.empty() ? NEVER : CONTROL);
|
| }
|
|
|
| void Link::OnNativeThemeChanged(const ui::NativeTheme* theme) {
|
| @@ -198,9 +199,9 @@ 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.
|
| + SetFocusBehavior(text().empty() ? NEVER : CONTROL);
|
| }
|
|
|
| void Link::SetPressed(bool pressed) {
|
|
|