New issue
Advanced search Search tips

Issue 813637 link

Starred by 10 users

Issue metadata

Status: WontFix
Owner:
Closed: Oct 8
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-05-03
OS: Mac
Pri: 2
Type: Feature



Sign in to add a comment

Mac Desktop - Prioritise and clip favicon, instead of hiding, when tab space decreases

Project Member Reported by edwardjung@chromium.org, Feb 19 2018

Issue description

Favicon prioritisation and clipping has been implemented for Views. This is the tracking bug for this feature to be implemented on the Mac.

https://bugs.chromium.org/p/chromium/issues/detail?id=722841

Spec for clipping - 1dp inset to the tab outline.


 
Screen Shot 2018-02-19 at 19.05.09.png
65.1 KB View Download
NextAction: 2018-04-01
Is there a specific milestone we're targeting for this or is it part of some other feature launch? Is Pri-3 the right priority? If so, this likely won't get attended to any time soon.
Labels: -Pri-3 M-66 Pri-2
It really depends on if you there are resources available to get this done. I don't know how complex the Mac implementation would be.

The views implementation is ready for M66. It would be nice to have the Mac implementation shipped at the same time or for M67 if that's too tight.

Comment 3 by meh...@chromium.org, Feb 20 2018

edwardjung@ I think you mean  issue 722841  in c#0 :-)
Description: Show this description
Re:#3 thanks mehmet
@edward @ellyjones Hello :) I have a prototype for this. Here's screenshot and CL you can test on your env. But As it's prototype and I'm not that good at Objective-C & Cocoa, I'm not sure this code quality is good enough. Maybe I need some very detailed code review to ship this.

https://chromium-review.googlesource.com/c/chromium/src/+/938875


Screen Shot 2018-02-28 at 1.29.56 AM.png
23.5 KB View Download
NextAction: 2018-05-03
Owner: ellyjo...@chromium.org
Status: Assigned (was: Untriaged)
#6: thanks for sending a patch! I'll take a look in detail on Monday since I'm travelling this week.
@SangWoo thanks for taking a stab at this. It looks pretty good. 

There's one thing I noticed and that is the favicon doesn't always seem to sit centre to the tab when the title is obscured. Sometimes it looks like an optical illusion because of the overlapping tabs. Other times the clipping is unbalanced (see screenshot).

The Views implementation looks more balanced.


 
Screen Shot 2018-03-01 at 2.35.22 PM.png
17.9 KB View Download
@edward I believe that's because I floored x coordinate of favicon. I've just updated CL. Please check it out again :)
Great work, looking much better!
Project Member

Comment 11 by bugdroid1@chromium.org, Mar 7 2018

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

commit a5e2fb1d4a9f883be1901715fae45f82b13eb1cc
Author: sangwoo.ko <sangwoo108@gmail.com>
Date: Wed Mar 07 04:21:07 2018

Show favicon even if there's no enough space

In this case, we will do:
1. Align favicon ceter.
2. Clip favicon to the tab's shape with 1 DIP padding.

In order to do this, a mask layer is set to icon view.
When there's a attention icon, tab shaped mask and
circular mask will be combined and then set.

Bug:  813637 
Change-Id: Idbadfcec44ef61d8a2213df4a87b533885e18a25
Reviewed-on: https://chromium-review.googlesource.com/938875
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: SangWoo Ko <sangwoo108@gmail.com>
Cr-Commit-Position: refs/heads/master@{#541323}
[modify] https://crrev.com/a5e2fb1d4a9f883be1901715fae45f82b13eb1cc/chrome/browser/ui/cocoa/tabs/tab_controller.mm
[modify] https://crrev.com/a5e2fb1d4a9f883be1901715fae45f82b13eb1cc/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
[modify] https://crrev.com/a5e2fb1d4a9f883be1901715fae45f82b13eb1cc/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/a5e2fb1d4a9f883be1901715fae45f82b13eb1cc/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/a5e2fb1d4a9f883be1901715fae45f82b13eb1cc/chrome/browser/ui/tabs/tab_utils.cc

Cc: sangwoo...@gmail.com
Status: Fixed (was: Assigned)
👍🏽Great work Sang Woo! There's going to be a lot of happy Mac users out there.
Happy to hear that :) I was able to ship this thanks to @elly. I hope there's a chance like this again.
The NextAction date has arrived: 2018-05-03
Project Member

Comment 15 by bugdroid1@chromium.org, Jun 16 2018

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

commit 145528f08509a441a139664d14117c15c042bfae
Author: Erik Chen <erikchen@chromium.org>
Date: Sat Jun 16 05:08:05 2018

Revert "Show favicon even if there's no enough space"

This reverts commit a5e2fb1d4a9f883be1901715fae45f82b13eb1cc.

Reason for revert: Causes massive memory leaks when the logic is triggered. See https://bugs.chromium.org/p/chromium/issues/detail?id=851506#c26

Original change's description:
> Show favicon even if there's no enough space
>
> In this case, we will do:
> 1. Align favicon ceter.
> 2. Clip favicon to the tab's shape with 1 DIP padding.
>
> In order to do this, a mask layer is set to icon view.
> When there's a attention icon, tab shaped mask and
> circular mask will be combined and then set.
>
> Bug:  813637 
> Change-Id: Idbadfcec44ef61d8a2213df4a87b533885e18a25
> Reviewed-on: https://chromium-review.googlesource.com/938875
> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
> Commit-Queue: SangWoo Ko <sangwoo108@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#541323}

TBR=ellyjones@chromium.org,sangwoo108@gmail.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  813637 , 851506
Change-Id: I0712eeb68e84db335ead345c4aa6e39600a85c4b
Reviewed-on: https://chromium-review.googlesource.com/1103677
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567872}
[modify] https://crrev.com/145528f08509a441a139664d14117c15c042bfae/chrome/browser/ui/cocoa/tabs/tab_controller.mm
[modify] https://crrev.com/145528f08509a441a139664d14117c15c042bfae/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
[modify] https://crrev.com/145528f08509a441a139664d14117c15c042bfae/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/145528f08509a441a139664d14117c15c042bfae/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/145528f08509a441a139664d14117c15c042bfae/chrome/browser/ui/tabs/tab_utils.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 18 2018

Labels: merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22b0d127435ddc9073f7599a186e863e0f9cdd9e

commit 22b0d127435ddc9073f7599a186e863e0f9cdd9e
Author: Erik Chen <erikchen@chromium.org>
Date: Mon Jun 18 15:38:05 2018

[Merge to 3440] Revert "Show favicon even if there's no enough space"

This reverts commit a5e2fb1d4a9f883be1901715fae45f82b13eb1cc.

Reason for revert: Causes massive memory leaks when the logic is triggered. See https://bugs.chromium.org/p/chromium/issues/detail?id=851506#c26

Original change's description:
> Show favicon even if there's no enough space
>
> In this case, we will do:
> 1. Align favicon ceter.
> 2. Clip favicon to the tab's shape with 1 DIP padding.
>
> In order to do this, a mask layer is set to icon view.
> When there's a attention icon, tab shaped mask and
> circular mask will be combined and then set.
>
> Bug:  813637 
> Change-Id: Idbadfcec44ef61d8a2213df4a87b533885e18a25
> Reviewed-on: https://chromium-review.googlesource.com/938875
> Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
> Commit-Queue: SangWoo Ko <sangwoo108@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#541323}

TBR=ellyjones@chromium.org,sangwoo108@gmail.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  813637 , 851506
Change-Id: I0712eeb68e84db335ead345c4aa6e39600a85c4b
Reviewed-on: https://chromium-review.googlesource.com/1103677
Commit-Queue: Erik Chen <erikchen@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#567872}(cherry picked from commit 145528f08509a441a139664d14117c15c042bfae)
Reviewed-on: https://chromium-review.googlesource.com/1104597
Cr-Commit-Position: refs/branch-heads/3440@{#394}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/22b0d127435ddc9073f7599a186e863e0f9cdd9e/chrome/browser/ui/cocoa/tabs/tab_controller.mm
[modify] https://crrev.com/22b0d127435ddc9073f7599a186e863e0f9cdd9e/chrome/browser/ui/cocoa/tabs/tab_controller_unittest.mm
[modify] https://crrev.com/22b0d127435ddc9073f7599a186e863e0f9cdd9e/chrome/browser/ui/cocoa/tabs/tab_view.h
[modify] https://crrev.com/22b0d127435ddc9073f7599a186e863e0f9cdd9e/chrome/browser/ui/cocoa/tabs/tab_view.mm
[modify] https://crrev.com/22b0d127435ddc9073f7599a186e863e0f9cdd9e/chrome/browser/ui/tabs/tab_utils.cc

Status: Available (was: Fixed)
The patch I made was reverted as it caused memory leak. Sorry for the trouble.
Status: Assigned (was: Available)
Labels: Hotlist-ConOps
Yes, it's weird, it was working AWESOME for a few weeks, and then it suddenly disappeared; I'm available to test.
Status: WontFix (was: Assigned)
mac-views seems to be released. I think this issue is not valid anymore. Please feel free to reopen this if it's still valid.

Sign in to add a comment