Commit df2b9969 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Remove PlatformStyle::kPreferFocusRings

This has been true on all platforms for a long time now. Its presence is
more confusing (suggests platforms where this is not true).

Bug: 924232
Change-Id: Ib73c8d3f785e96912739a83e6d325db33c85a27e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2527365
Commit-Queue: Peter Boström <pbos@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Auto-Submit: Peter Boström <pbos@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825543}
parent a5af2468
......@@ -10,7 +10,6 @@
#include "ash/capture_mode/capture_mode_constants.h"
#include "ui/views/animation/ink_drop_host_view.h"
#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/style/platform_style.h"
namespace ash {
......@@ -40,7 +39,7 @@ class ViewWithInkDrop : public T {
std::unique_ptr<views::InkDrop> CreateInkDrop() override {
auto ink_drop = T::CreateDefaultFloodFillInkDropImpl();
ink_drop->SetShowHighlightOnHover(false);
ink_drop->SetShowHighlightOnFocus(!views::PlatformStyle::kPreferFocusRings);
ink_drop->SetShowHighlightOnFocus(false);
return std::move(ink_drop);
}
......
......@@ -15,7 +15,6 @@
#include "ui/views/background.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/rect_based_targeting_utils.h"
#include "ui/views/style/platform_style.h"
namespace ash {
......@@ -46,7 +45,7 @@ const char* CloseDeskButton::GetClassName() const {
std::unique_ptr<views::InkDrop> CloseDeskButton::CreateInkDrop() {
auto ink_drop = CreateDefaultFloodFillInkDropImpl();
ink_drop->SetShowHighlightOnFocus(!views::PlatformStyle::kPreferFocusRings);
ink_drop->SetShowHighlightOnFocus(false);
return std::move(ink_drop);
}
......
......@@ -26,7 +26,6 @@
#include "ui/views/border.h"
#include "ui/views/controls/button/label_button_border.h"
#include "ui/views/controls/highlight_path_generator.h"
#include "ui/views/style/platform_style.h"
namespace ash {
......@@ -140,7 +139,7 @@ void NewDeskButton::OnPaintBackground(gfx::Canvas* canvas) {
std::unique_ptr<views::InkDrop> NewDeskButton::CreateInkDrop() {
auto ink_drop = CreateDefaultFloodFillInkDropImpl();
ink_drop->SetShowHighlightOnHover(false);
ink_drop->SetShowHighlightOnFocus(!views::PlatformStyle::kPreferFocusRings);
ink_drop->SetShowHighlightOnFocus(false);
return std::move(ink_drop);
}
......
......@@ -108,7 +108,6 @@
#include "ui/views/controls/separator.h"
#include "ui/views/drag_utils.h"
#include "ui/views/metrics.h"
#include "ui/views/style/platform_style.h"
#include "ui/views/view_constants.h"
#include "ui/views/widget/tooltip_manager.h"
#include "ui/views/widget/widget.h"
......@@ -133,7 +132,7 @@ gfx::ImageSkia* GetImageSkiaNamed(int id) {
std::unique_ptr<views::InkDrop> CreateBookmarkButtonInkDrop(
std::unique_ptr<views::InkDropImpl> ink_drop) {
ink_drop->SetShowHighlightOnFocus(!views::PlatformStyle::kPreferFocusRings);
ink_drop->SetShowHighlightOnFocus(false);
return std::move(ink_drop);
}
......
......@@ -594,7 +594,7 @@ Button::Button(PressedCallback callback)
SetFocusBehavior(PlatformStyle::DefaultFocusBehavior());
SetProperty(kIsButtonProperty, true);
hover_animation_.SetSlideDuration(base::TimeDelta::FromMilliseconds(150));
SetInstallFocusRingOnFocus(PlatformStyle::kPreferFocusRings);
SetInstallFocusRingOnFocus(true);
button_controller_ = std::make_unique<ButtonController>(
this, std::make_unique<DefaultButtonControllerDelegate>(this));
}
......
......@@ -49,7 +49,6 @@ const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false;
const bool PlatformStyle::kUseRipples = true;
const bool PlatformStyle::kTextfieldScrollsToStartOnFocusChange = false;
const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = true;
const bool PlatformStyle::kPreferFocusRings = true;
const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = false;
// Linux clips bubble windows that extend outside their parent window
......
......@@ -73,11 +73,6 @@ class VIEWS_EXPORT PlatformStyle {
static const float kFocusHaloThickness;
static const float kFocusHaloInset;
// Whether "button-like" (for example, buttons in the top chrome or Omnibox
// decorations) UI elements should use a focus ring, rather than show
// hover state on focus.
static const bool kPreferFocusRings;
// Whether controls in inactive widgets appear disabled.
static const bool kInactiveWidgetControlsAppearDisabled;
......
......@@ -42,7 +42,6 @@ const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = false;
const bool PlatformStyle::kTableViewSupportsKeyboardNavigationByCell = false;
const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true;
const bool PlatformStyle::kUseRipples = false;
const bool PlatformStyle::kPreferFocusRings = true;
const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = true;
const bool PlatformStyle::kAdjustBubbleIfOffscreen = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment