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

Issue 656553 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression : ‘Close’ (x) button on download shelf is not visible after applying the ‘Core’ theme.

Reported by yfulgaon...@etouch.net, Oct 17 2016

Issue description

Chrome Version : 56.0.2891.0 db45a537654c59feee0308a5643cff514ea6446e-refs/heads/master@{#425529} 64-bit
OS : Mac (10.10.5, 10.11.4)

URL : https://chrome.google.com/webstore/detail/core/gkhcgfdghbiidgeccbldhfceleibkkpe?utm_source=chrome-ntp-icon

What steps will reproduce the problem?
1. Launch chrome and add a theme from above URL.
2. Now open NTP, hit ‘Cmd + S’ key and save the current page. (Download shelf is seen at the bottom of page)
3. Observe the ‘Close’ (x) button on download shelf at bottom right corner.

Actual : ‘Close’ (x) button on download shelf is not visible after applying the ‘Core’ theme.
Expected : ‘Close’ (x) button on download shelf should be seen properly (in white color) after applying the ‘Core’ theme.

This is a regression issue broken in ‘M-54’, below is the Manual Regression range and will soon update bisect info.
Good build : 54.0.2796.0
Bad build : 54.0.2797.0

Note : This is Mac OS specific issue and the same is working fine on Windows and Linux OS.
 
Act_Exp_Theme.png
42.8 KB View Download
Actual_theme.mov
8.0 MB Download
Expected_theme.mov
8.6 MB Download
Owner: spqc...@chromium.org
Status: Assigned (was: Unconfirmed)
Narrow Bisect info :
https://chromium.googlesource.com/chromium/src/+log/25eb0c4c830433108f6f33ad25dc6f7c24b91ec2..41a77c34088b2f8e79197c5f7b52002ed90279c3?pretty=fuller&n=10000

Suspecting : r405612 from Narrow Bisect

@spqchan : Please take a look.

Note : After applying the ‘Core’ theme, ‘Close’ (x) button is not directly visible to the user; but while hovering on ‘X’ button it is visible (in Red color).
Cc: sdy@chromium.org
+sdy who is working on download shelf. 
Still able to reproduce the issue on Mac 10.11.6 using chrome latest version 	56.0.2922.0.

spqchan@ could you please look into this issue.


I will look at this once I have the chance
Just to update, still able to reproduce this issue on Mac 10.12.2 using latest canary #57.0.2970.0.

spqchan@ - Gentle Ping...!!

Could you please have a look into this issue.

Thanks...!!

Comment 6 by sdy@chromium.org, Jan 9 2017

Cc: -sdy@chromium.org spqc...@chromium.org
Owner: sdy@chromium.org
Just to update, still able to reproduce this issue on Mac 10.12.2 using latest canary #57.0.2983.0.

sdy@ - Gentle Ping...!!

Could you please have a look into this issue.

Thanks...!!
Just to update, still able to reproduce this issue on Mac 10.12.2 using latest canary #58.0.2990.0	

sdy@, Could you please have a look into this issue.

Comment 9 by sdy@chromium.org, Feb 2 2017

Status: Started (was: Assigned)
In the CQ:
https://codereview.chromium.org/2668393003/

Comment 10 by sdy@chromium.org, Feb 2 2017

Status: Fixed (was: Started)
The change has landed as 524a361c86c23bb4f5384c1738f786532a296e46, I'm not sure where bugdroid is today. Please report back if this fixed/not fixed in the next Canary.
Project Member

Comment 11 by bugdroid1@chromium.org, Feb 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/524a361c86c23bb4f5384c1738f786532a296e46

commit 524a361c86c23bb4f5384c1738f786532a296e46
Author: sdy <sdy@chromium.org>
Date: Thu Feb 02 20:04:33 2017

Fix using theme colors for the download shelf's close button.

The theme world is messy:

- ThemeProvider encapsulates some state like incognito status, but not
  other state like whether the active or inactive version of a color
  should be used (e.g. COLOR_TAB_TEXT vs. COLOR_BACKGROUND_TAB_TEXT).

- A browser window always(?) has a ThemeProvider, but since some views
  try to access theme information when they're not in a window, there
  are null checks all over.

- Some views listen for theme callbacks. Others, like HoverCloseButton,
  expect to be told to redraw when the theme changes.

- -[TabView iconColor] modifies a theme color by tweaking its alpha and
  wants its children to use it. It also returns a hard-coded color that
  isn't in the theme at all for "dark" themes. This isn't really
  supported by the theme system.

The issue that this CL fixes was the result of HoverCloseButton
expecting to be a child of a TabView and falling back to a default
color. This fix doesn't really change that dependency, but it lets
anyone set the color instead of assuming a TabView parent. It will still
use a default color if nobody tells it otherwise, since it doesn't look
at the theme itself.

A more complex solution would let HoverCloseButton pull a color from the
theme but allow that color to be overridden (by TabView), but that
doesn't seem worth it. I'd be a fan of rethinking details of how we deal
with themes to make issues like this harder to come by.

BUG= 656553 

Review-Url: https://codereview.chromium.org/2668393003
Cr-Commit-Position: refs/heads/master@{#447826}

[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/app/nibs/DownloadShelf.xib
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.h
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/hover_close_button.h
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/hover_close_button.mm
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/524a361c86c23bb4f5384c1738f786532a296e46/chrome/browser/ui/cocoa/tabs/tab_view.mm

Comment 12 by sdy@chromium.org, Feb 8 2017

Labels: -M-56 M-57 Merge-Request-57
Project Member

Comment 13 by sheriffbot@chromium.org, Feb 8 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 14 by bugdroid1@chromium.org, Feb 8 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973

commit 9adf7c095e768a3ab1e0b3aed26379ff5c3f8973
Author: Sidney San Martín <sdy@chromium.org>
Date: Wed Feb 08 03:06:22 2017

Fix using theme colors for the download shelf's close button.

The theme world is messy:

- ThemeProvider encapsulates some state like incognito status, but not
  other state like whether the active or inactive version of a color
  should be used (e.g. COLOR_TAB_TEXT vs. COLOR_BACKGROUND_TAB_TEXT).

- A browser window always(?) has a ThemeProvider, but since some views
  try to access theme information when they're not in a window, there
  are null checks all over.

- Some views listen for theme callbacks. Others, like HoverCloseButton,
  expect to be told to redraw when the theme changes.

- -[TabView iconColor] modifies a theme color by tweaking its alpha and
  wants its children to use it. It also returns a hard-coded color that
  isn't in the theme at all for "dark" themes. This isn't really
  supported by the theme system.

The issue that this CL fixes was the result of HoverCloseButton
expecting to be a child of a TabView and falling back to a default
color. This fix doesn't really change that dependency, but it lets
anyone set the color instead of assuming a TabView parent. It will still
use a default color if nobody tells it otherwise, since it doesn't look
at the theme itself.

A more complex solution would let HoverCloseButton pull a color from the
theme but allow that color to be overridden (by TabView), but that
doesn't seem worth it. I'd be a fan of rethinking details of how we deal
with themes to make issues like this harder to come by.

BUG= 656553 

Review-Url: https://codereview.chromium.org/2668393003
Cr-Commit-Position: refs/heads/master@{#447826}
(cherry picked from commit 524a361c86c23bb4f5384c1738f786532a296e46)

Review-Url: https://codereview.chromium.org/2687633002 .
Cr-Commit-Position: refs/branch-heads/2987@{#379}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/app/nibs/DownloadShelf.xib
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.h
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/hover_close_button.h
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/hover_close_button.mm
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/9adf7c095e768a3ab1e0b3aed26379ff5c3f8973/chrome/browser/ui/cocoa/tabs/tab_view.mm

Labels: TE-Verified-57.0.2987.54 TE-Verified-M57
Verified the fix on Mac 10.12.2 using Chrome beta version #57.0.2987.54 as per the comment #0.

Observed that "Close" (x) button on download shelf is seen properly (in white color) after applying the ‘Core’ theme as expected.

Hence, the fix is working as expected.

Attaching the screencast for reference

Adding the verified labels.

Thanks...!!
656553.mp4
685 KB View Download

Sign in to add a comment