New issue
Advanced search Search tips

Issue 889791 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Omnibox icon focus color does not match spec

Reported by avsha...@etouch.net, Sep 27

Issue description

Chrome Version : 70.0.3538.37 (Official Build) 53f287561c37d0074842843cca3b4ac3560a4459-refs/branch-heads/3538@{#693} 32/64 bit
OS : Windows(7, 8, 8.1 ,10), Linux(14.04 LTS)

Test URL : https://permission.site/

What steps will reproduce the problem?
1. Launch chrome, navigate to above URL, click on 'Location' button and 'Allow' the permission.
2. Press F6 key and then hit 'Tab' to bring focus on 'Location' icon in omnibox.
3. Observe the grey focus on 'Location' icon in omnibox.

Actual Result : Grey focus on permission icon is slightly faint than focus of other omnibox icons.

Expected Result : All permission icons and other omnibox icons should have similer grey focus.

This is a regression issue broken in ‘M-70’ and below is the bisect information.
Good Build : 70.0.3536.0 (Revision : 587137)
Bad Build : 70.0.3537.0 (Revision : 587302)

Chromium bisect URL:
https://chromium.googlesource.com/chromium/src/+log/6aa5a8a398d978aca7cb31ecf40afd764323d8da..4974bf6b40e914bc8c8e7d9fc805f7e857d9155e?pretty=fuller&n=10000

Suspect: r587280 ?

tommycli@ : Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner.

Note:
1. Unable to provide 'per-revision' bisect as it shows "Unable to find local data files" error message.
2. Tried on other machines but still getting the same error again.
3. Hence provided suspect through 'Chromium bisect'
4. This issue is not reproducible on Mac(10.12.6, 10.13.1, 10.14, 10.13.6) OS.

Thank you..!
 
Actual_Result.mp4
1.1 MB View Download
Expected_Result.mp4
792 KB View Download
Update:
--
Above issue is also reproducible in Canary #71.0.3562.0 on Windows(7,8,10) and Linux(14.04 LTS) OS.
icon_focus.png
9.5 KB View Download
Cc: pbos@chromium.org
Status: Available (was: Assigned)
+pbos

I've taken a look and they are all the same color.

However, they are lighter than the spec, which specifies GG900 @ 10% for hover, and GG900 @ 16% for press.

From what I can tell, this is because the color is derived from the native theme:

SkColor LocationBarView::GetIconInkDropColor() const {
  return GetNativeTheme()->GetSystemColor(
      ui::NativeTheme::kColorId_TextfieldDefaultColor);
}

This doesn't necessarily match the spec provided by designers.

Do we want to match the native theme, or the spec?
Cc: pkasting@chromium.org
I think we need to derive the color from the native theme, or we'll mismatch badly if the native theme provides something not-really-close-to-black. If they all match I think you can WontFix this.
Status: WontFix (was: Available)
+pbos: Thanks for the extra context. I agree with you that sticking with NativeTheme seems the most important.
Status: Assigned (was: WontFix)
Summary: Omnibox icon focus color does not match spec (was: Regression : Grey focus on permission icon is slightly faint than focus of other omnibox icons.)
You can have your cake and eat it too.

The right thing to do is to compute what the contrast ratio of GG900 @ 10%/16% would be with the default colors; compute the actual overlay color as either BlendTowardOppositeLuma(omnibox_background_color, SK_AlphaOPAQUE) or the native textfield color; then use color_utils::FindBlendValueForContrastRatio(omnibox_background_color, overlay_color, omnibox_background_color, desired_contrast, 0) to compute the correct alpha to use that matches the desired contrast.

Whether you want to use the textfield color route or the BlendTowardOppositeLuma() route here depends on what effect you want if, say, the native theme asks for red text.  Do you want all your omnibox ink drops to turn red?  Then use the textfield color.  Do you just want them to use greyscale contrast with the background regardless?  Then use the BlendTowardOppositeLuma() route.  Personally, I would go the BlendTowardOppositeLuma() route; I'm not convinced that the text color should also dictate the ink drop colors, and the color_utils call above should ensure that we still have good contrast.

Sign in to add a comment