New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 757028 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Highlight system color is a lighter blue than the color used for text selection

Reported by robertbcolton@gmail.com, Aug 18 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0

Steps to reproduce the problem:
1. Create two div elements with some text
2. Set one div elements color to HighlightText and its background-color to Highlight
3. Use the mouse to select text in the other div element, and observe the different selection color.

JSFiddle with reproducible: https://jsfiddle.net/g9kvoy1s/

What is the expected behavior?
The div with Highlight would have the same background-color for selected text as the div without it, which is the result we get in both Edge and Firefox.

What went wrong?
The div with Highlight has a lighter blue for the background of selected text than the default.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version:  Google Chrome	61.0.3163.49 (Official Build) beta (64-bit) (cohort: Beta)  Channel: n/a
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0
 
Cc: sandeepkumars@chromium.org
Components: Blink>Layout
Labels: M-62 Needs-Triage-M61
Status: Untriaged (was: Unconfirmed)
Tested the issue using #61.0.3163.49 on Win 10 and was able to reproduce the issue. Observed the highlight of the background is having less color than default focus.

This seems to be a Non-Regression issue as same behavior is seen since M45. Hence Untriaged to get more inputs from dev.

Please find the screenshot for the same.

No such behavior is observed in Mac and Linux

Thanks!!
Screenshot (22).png
119 KB View Download

Comment 2 by e...@chromium.org, Aug 22 2017

Components: -Blink>Layout Blink>CSS
On linux/cinamon the difference is even more noticeable with the highlight color being entirely different from the actual selection color.
Components: -Blink>CSS Blink>Editing>Selection
Looks to do with Selection, so assigning to a likely component.

Comment 4 by yosin@chromium.org, Aug 23 2017

Components: -Blink>Editing>Selection Blink>CSS
Rout to CSS team about interpretation of "HighlightText" and "HighlightColor".
Components: -Blink>CSS Blink>Editing>Selection
CSS System Colors were deprecated in CSS Colors 3 (see the updated section in https://www.w3.org/TR/CSS2/ui.html#system-colors). In CSS2, the intention is to "specify colors in a manner that integrates them into the operating system's graphic environment". 

Despite being deprecated, these values are still in use in the latest versions of Firefox and Edge on Windows 10, and both FF and Edge use identical colors to the system as per CSS2. So Chrome's behaviour here is an interop issue.

I don't know where in the code the color for text selection is assigned/generated, so I assigned to the component described as 'text selection in web content', hoping the folks who work on that would know :)

Comment 6 by yosin@chromium.org, Aug 24 2017

Status: WontFix (was: Untriaged)
Mark WontFix since "HighlightColor" and "HighlightText" are dreprecated according to
#c5.

Default selection colors are obtained from LayoutTheme::GetTheme().

As below:
Color LayoutObject::SelectionBackgroundColor() const {
...
  return GetFrame()->Selection().FrameIsFocusedAndActive()
             ? LayoutTheme::GetTheme().ActiveSelectionBackgroundColor()
             : LayoutTheme::GetTheme().InactiveSelectionBackgroundColor();
}

Sign in to add a comment