Commit 1a4de419 authored by John Smith's avatar John Smith Committed by Commit Bot

Make Mac accent colors display in tabs/toolbar in incognito theme

The issue was that previously, the tabs/toolbar area used the
NativeThemeDarkAura for colors, which was not OS accent aware. This was
replaced by a forced-to-dark version of the platform's native theme. On
Mac, I added a check to maintain the old behavior that skipped the
accent colors because there was an issue with how the light/dark theme
was applied on Mac. This was since fixed, so we can remove this check
and use the accent colors in incognito. This also makes the color
behavior more consistent between regular dark mode and incognito.

Bug: 1049360
Change-Id: If9a40955391b3c6d9603c66d4eedb99afb0af752
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2337575Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Commit-Queue: Joan Barnett <johnsm@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#796480}
parent 3c9922f3
......@@ -160,8 +160,6 @@ class NATIVE_THEME_EXPORT NativeThemeMac : public NativeThemeBase {
std::unique_ptr<NativeTheme::ColorSchemeNativeThemeObserver>
color_scheme_observer_;
bool should_only_use_dark_colors_;
DISALLOW_COPY_AND_ASSIGN(NativeThemeMac);
};
......
......@@ -168,8 +168,7 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id,
// once NativeTheme.cc handles kColorProviderReirection and
// kPlatformHighContrast both being on.
if ((base::FeatureList::IsEnabled(features::kColorProviderRedirection) &&
color_scheme != ColorScheme::kPlatformHighContrast) ||
should_only_use_dark_colors_)
color_scheme != ColorScheme::kPlatformHighContrast))
return NativeTheme::GetSystemColor(color_id, color_scheme);
if (UsesHighContrastColors()) {
......@@ -577,8 +576,7 @@ void NativeThemeMac::PaintMenuItemBackground(
NativeThemeMac::NativeThemeMac(bool configure_web_instance,
bool should_only_use_dark_colors)
: NativeThemeBase(should_only_use_dark_colors),
should_only_use_dark_colors_(should_only_use_dark_colors) {
: NativeThemeBase(should_only_use_dark_colors) {
if (!should_only_use_dark_colors)
InitializeDarkModeStateAndObserver();
......
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