Commit 8338c1a9 authored by Sam Sebree's avatar Sam Sebree Committed by Commit Bot

[Controls Refresh] Adds correct dark mode focus ring styling on Mac

This CL add correct styling for the dark mode focus ring on mac

Bug: 1096269
Change-Id: Ib0fe9c18470a2333f48eeee921c9a8c02ac92162
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2256153Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarYu Han <yuzhehan@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Sam Sebree <sasebree@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#782104}
parent 7811fd45
...@@ -441,8 +441,14 @@ void GraphicsContext::DrawFocusRing(const Vector<IntRect>& rects, ...@@ -441,8 +441,14 @@ void GraphicsContext::DrawFocusRing(const Vector<IntRect>& rects,
float min_border_width, float min_border_width,
const Color& color, const Color& color,
WebColorScheme color_scheme) { WebColorScheme color_scheme) {
#if defined(OS_MACOSX)
const Color& inner_color = color_scheme == WebColorScheme::kDark
? SkColorSetRGB(0x99, 0xC8, 0xFF)
: color;
#else
const Color& inner_color = const Color& inner_color =
color_scheme == WebColorScheme::kDark ? SK_ColorWHITE : color; color_scheme == WebColorScheme::kDark ? SK_ColorWHITE : color;
#endif
if (::features::IsFormControlsRefreshEnabled()) { if (::features::IsFormControlsRefreshEnabled()) {
// The focus ring is made of two borders which have a 2:1 ratio. // The focus ring is made of two borders which have a 2:1 ratio.
const float first_border_width = (width / 3) * 2; const float first_border_width = (width / 3) * 2;
......
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