Regression: Location and MIDI icon is not seen properly in incognito mode.
Reported by
dmascare...@etouch.net,
Mar 18 2016
|
|||||
Issue descriptionChrome Version:51.0.2682.0 (Official Build) 153a9028e5cb73e3c707b4884550499e2a08af5c-refs/heads/master@{#381839} 64 bit OS: Mac Pre-condition: Select 'Material' option for 'Material design in the browser's top chrome'. What steps will reproduce the problem? 1. Launch chrome and open Incognito window. 2. Navigate to https://adrifelt.github.io/demos/all-permissions.html and click on ‘Location’ button or ‘MIDI’ button 3. Click on ‘Allow’ button present in the bubble and observe the omnibox. Actual: 'Location' and 'MIDI' icon is not seen properly in incognito mode.(i.e Grey colour icon over grey background of omnibox) Expected: 'Location' and 'MIDI' icon should seen properly. This is regression issue, broken in ‘M 51’ and below is narrow bisect: https://chromium.googlesource.com/chromium/src/+log/4dba7838c14fff4e36c49045a8c4c2bf72b64b18..231c29739fa47b943eb277b7cff67d8c4b8636c3?pretty=fuller&n=100 Suspecting: r379889 ? Good build:51.0.2671.0 Bad build:51.0.2672.0 Note: Issue is not seen on Windows and Linux OS. Please help in reassigning if it is not related to your change
,
Mar 22 2016
Removing release block - this bug only affects users with Material Design switch flipped.
,
Apr 18 2016
,
May 4 2016
spqchan@ - this will hopefully not take much time to get up-to-speed on. Basically there are "decorations" (little icons) that appear in the omnibox textfield. Pre-Material Design they displayed PNGs but with the switch to MD they display icons that are created from vectors. In the old days you could set the image at construction time but with MD the omnibox textfield can be light or dark, based on being in Incognito mode. When the textfield is light the decoration is gray, when it's dark the decoration is white. You can't know what color to make it until the omnibox textfield gets added to the window, so the constructors typically no longer set the icon. There are a bunch of decorations I've already converted, like the Zoom decoration (FYI the Star decoration is special-cased so don't look at that one too much). It should be mostly clear what changes are needed to convert over to MD but let me know if you have any questions. Please add me to the cl when you're ready. Note that you can use https://permission.site/ to make these decorations visible (otherwise it can be hard finding a site that does so).
,
May 9 2016
It looks like my CL https://codereview.chromium.org/1955083003/ would fix this issue However, I noticed that while the color is setting the vector graphics to white, it's still darker than the star icon. Is that alright?
,
May 10 2016
I don't think that cl updates these icons. The location icon at the very least is not correct (see attached). There's a location_decoration in chrome/browser/ui/cocoa/location_bar/ - I suspect that's where it's drawn. I'm not sure where the others live.
,
May 10 2016
The CL actually does affect the icons, if you change the SkColor to blue in my CL it actually changes the icon colors. That's a good point on Location Decoration though, I'll look into it
,
May 10 2016
So it does - nevermind, and nevermind the icon screenshot (that's a vector icon with a Location name but I guess it's not for the location bar). It looks like the code is being clever. GetIcon() calls the routine DeriveDefaultIconColor() which takes a text color and generates what it deems an appropriate icon color. If you pass in pure black you'll get chrome icon grey. If you pass white you'll get a transparent white, but it's not matching up with the color of the bookmark star icon. I'm not sure why that is (either the star is using the wrong alpha or there's a color space mismatch) - please file a bug on that.
,
May 10 2016
Issue 610738 has been created I suspect it might be the bookmark star icon that's using the wrong alpha, based on the attached screenshot in the bug description
,
May 10 2016
It doesn't look like it. The spec from sgabriel@: Incognito mode: - Not bookmarked: Hollowed out start, #FFF 80% alpha. - Bookmarked: Filled start, #7BAAF7 (GB300) 100% alpha 80% alpha is 0xCC, which is what's in the star_decoration code. I wonder if DeriveDefaultIconColor() is returning 0xCC for the alpha.
,
May 10 2016
Ah I see, that makes sense. What bugs me is the fact that DeriveDefaultIconColor() exists. I tried a few things out and change SkColorSetA(SK_ColorWHITE, 0xCC) to SkColorSetA(SK_ColorWHITE, 0xFF). It looks like it's matching now.
,
May 10 2016
In that case, would it be good enough if I just pass in SkColorWHITE with 100% alpha to GetIcon()?
,
May 10 2016
It's very close, but it's not the same (Photoshop says the star is 0xE3 but the other icons are 0xD6). I'm testing things on my Retina machine and the difference is more noticeable. Can you check what DeriveDefaultIconColor() returns for an alpha value if you pass in SkColorSetA(SK_ColorWHITE, 0xFF)?
,
May 10 2016
Just checked, never mind it looks like the alpha stays the same. For 80%, it becomes 84% with DeriveDefaultIconColor().
,
May 10 2016
Can you figure out what the correct alpha value should be for color_utils::AlphaBlend() to get 0xCC out? We can just submit a cl that fixes it.
,
May 10 2016
Sounds good, I can do that. There is one thing I want to clarify first. If we're changing AlphaBlend(), what is the correct input and output? Are we changing the alpha value in DeriveDefaultIconColor() so that when we input 0xFF, it will output 0xCC? Also, it looks like there are other places that use this method so we'll need to make sure that we don't break anything.
,
May 10 2016
My thought was to change DeriveDefaultIconColor(), not AlphaBlend(). I had also assumed AlphaBlend() returns a color with an alpha channel < 0xFF but I no longer think that's true (it must be an opaque). 0x33 is 20% of 0xFF, so it must be that color_utils::AlphaBlend(SK_ColorBLACK, text_color, 0x33) is returning a color that is 80% text_color and 20% SK_ColorBLACK. That seems like it should be the same as painting the star icon with a white that is 80% opaque - the difference may be that in the DeriveDefaultIconColor() case the output is an opaque icon whereas by painting the star with an 80% opaque white the icon is a partially transparent icon. The transparency allows part of the background to show through, which makes the star brighter than the non-opaque icons. I need to get clarification from sgabriel@ on which approach is correct.
,
May 10 2016
Sorry, what I said was a bit confusing. I meant changing what values we feed into AlphaBlend(), not the method itself. Anyway, that sounds good. Let me know when you get an update for it!
,
May 10 2016
> Sorry, what I said was a bit confusing. Or I may have read it wrong.
,
May 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e77ca29c851bee6722db299074b3dc0a3ba3952 commit 9e77ca29c851bee6722db299074b3dc0a3ba3952 Author: spqchan <spqchan@chromium.org> Date: Thu May 12 18:43:03 2016 [Material Design] Update Website Setting Icons in Omnibox on OSX Update the icons to use vector graphics. The website setting icons include Javascript, cookies and images. BUG= 604446 , 596036 Review-Url: https://codereview.chromium.org/1955083003 Cr-Commit-Position: refs/heads/master@{#393316} [modify] https://crrev.com/9e77ca29c851bee6722db299074b3dc0a3ba3952/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm [modify] https://crrev.com/9e77ca29c851bee6722db299074b3dc0a3ba3952/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h [modify] https://crrev.com/9e77ca29c851bee6722db299074b3dc0a3ba3952/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm [modify] https://crrev.com/9e77ca29c851bee6722db299074b3dc0a3ba3952/chrome/browser/ui/content_settings/content_setting_image_model.cc [modify] https://crrev.com/9e77ca29c851bee6722db299074b3dc0a3ba3952/chrome/browser/ui/content_settings/content_setting_image_model.h
,
May 12 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ranjitkan@chromium.org
, Mar 18 2016