[Form Controls Refresh] Fixes mac text selection color for dark mode.
Prior to this CL, the text selection color on Mac/dark mode is too dark. It doesn't provide enough of a contrast between the selected text and its background highlight color. The reason is that Chrome blends the Mac specific highlight color with white, Color::BlendWithWhite(). It adds a .6 alpha channel which results the color being too dark. The fix is to mimic Safari's logic[1] and apply a greater alpha value, making the alpha channel more transparent. Thus, the selection background color is lighter. [1] https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/rendering/RenderThemeMac.mm#L385 Bug: 1146379 Change-Id: Ib4d54f0b3dbe5c32038e10af65c644db2f4e8dc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525368 Commit-Queue: Yu Han <yuzhehan@chromium.org> Reviewed-by:Mason Freed <masonfreed@chromium.org> Cr-Commit-Position: refs/heads/master@{#825488}
Showing
6.7 KB
3.58 KB

3.58 KB
