Commit 67575409 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Get rid of mis-use of static members in LayoutThemeDefault.

No behavioral change.

Change-Id: I054cd7f3743d0021f52241f2839297c0ae97bcf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1768340
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691098}
parent 2a237806
......@@ -141,10 +141,10 @@ class CORE_EXPORT LayoutTheme : public RefCounted<LayoutTheme> {
Color InactiveSelectionBackgroundColor() const;
Color ActiveSelectionForegroundColor() const;
Color InactiveSelectionForegroundColor() const;
virtual void SetSelectionColors(unsigned active_background_color,
unsigned active_foreground_color,
unsigned inactive_background_color,
unsigned inactive_foreground_color) {}
virtual void SetSelectionColors(Color active_background_color,
Color active_foreground_color,
Color inactive_background_color,
Color inactive_foreground_color) {}
// List box selection colors
Color ActiveListBoxSelectionBackgroundColor() const;
......
......@@ -48,16 +48,10 @@ static bool UseMockTheme() {
return WebTestSupport::IsMockThemeEnabledForTest();
}
unsigned LayoutThemeDefault::active_selection_background_color_ = 0xff1e90ff;
unsigned LayoutThemeDefault::active_selection_foreground_color_ = Color::kBlack;
unsigned LayoutThemeDefault::inactive_selection_background_color_ = 0xffc8c8c8;
unsigned LayoutThemeDefault::inactive_selection_foreground_color_ = 0xff323232;
base::TimeDelta LayoutThemeDefault::caret_blink_interval_;
LayoutThemeDefault::LayoutThemeDefault() : LayoutTheme(), painter_(*this) {
caret_blink_interval_ = LayoutTheme::CaretBlinkInterval();
}
LayoutThemeDefault::LayoutThemeDefault()
: LayoutTheme(),
caret_blink_interval_(LayoutTheme::CaretBlinkInterval()),
painter_(*this) {}
LayoutThemeDefault::~LayoutThemeDefault() = default;
......@@ -194,11 +188,10 @@ void LayoutThemeDefault::AdjustSliderThumbSize(ComputedStyle& style) const {
}
}
void LayoutThemeDefault::SetSelectionColors(
unsigned active_background_color,
unsigned active_foreground_color,
unsigned inactive_background_color,
unsigned inactive_foreground_color) {
void LayoutThemeDefault::SetSelectionColors(Color active_background_color,
Color active_foreground_color,
Color inactive_background_color,
Color inactive_foreground_color) {
active_selection_background_color_ = active_background_color;
active_selection_foreground_color_ = active_foreground_color;
inactive_selection_background_color_ = inactive_background_color;
......
......@@ -80,10 +80,10 @@ class CORE_EXPORT LayoutThemeDefault : public LayoutTheme {
// when hovered.
bool SupportsHover(const ComputedStyle&) const final;
void SetSelectionColors(unsigned active_background_color,
unsigned active_foreground_color,
unsigned inactive_background_color,
unsigned inactive_foreground_color) override;
void SetSelectionColors(Color active_background_color,
Color active_foreground_color,
Color inactive_background_color,
Color inactive_foreground_color) override;
Color PlatformFocusRingColor() const override;
// System fonts.
......@@ -144,12 +144,12 @@ class CORE_EXPORT LayoutThemeDefault : public LayoutTheme {
int MenuListInternalPadding(const ComputedStyle&, int padding) const;
static const RGBA32 kDefaultTapHighlightColor = 0x2e000000; // 18% black.
static base::TimeDelta caret_blink_interval_;
base::TimeDelta caret_blink_interval_;
static unsigned active_selection_background_color_;
static unsigned active_selection_foreground_color_;
static unsigned inactive_selection_background_color_;
static unsigned inactive_selection_foreground_color_;
Color active_selection_background_color_ = 0xff1e90ff;
Color active_selection_foreground_color_ = Color::kBlack;
Color inactive_selection_background_color_ = 0xffc8c8c8;
Color inactive_selection_foreground_color_ = 0xff323232;
ThemePainterDefault painter_;
// Cached values for crbug.com/673754.
......
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