New issue
Advanced search Search tips

Issue 876595 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Hovered non-selected tabs paint in front of selected tabs

Project Member Reported by pkasting@chromium.org, Aug 22

Issue description

https://chromium-review.googlesource.com/c/chromium/src/+/1165689 introduced a regression: hovered non-selected tabs now paint in front of selected tabs.

I wonder if we should refactor TabStrip::PaintChildren() fairly significantly.  Imagine sticking all the children in a container, sorting the container using a custom predicate where e.g. "active > inactive, selected > unselected, hovered > unhovered, later in strip > earlier", then simply painting the whole container in order.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 28

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

commit 458760cd41faf53e75d8a3b864710dd634fb6ba7
Author: Allen Bauer <kylixrd@chromium.org>
Date: Tue Aug 28 18:25:22 2018

Reorder selected tab painting to be on top of hovered tabs.

Consolidated the selected and hovered tabs into the same list. This list
is then sorted based on their hover-animation state, selected state, and
if the mouse is hovering the tab. This eliminated the second hovered_tabs
list and hovered_tab variable.

All 5 states are now managed together and painted in the following order:
 o Unselected with hover animating
 o Unselected with mouse hovered
 o Selected with no hover animations
 o Selected with hover animating
 o Selected with mouse hovered

The unselected with no hover animations tabs are painted in the first pass
and are not in this consolidated list.

Bug:  876595 
Change-Id: Ib77a7161485a08321f0f27e06f162263eaa891f0
Reviewed-on: https://chromium-review.googlesource.com/1188433
Commit-Queue: Allen Bauer <kylixrd@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586793}
[modify] https://crrev.com/458760cd41faf53e75d8a3b864710dd634fb6ba7/chrome/browser/ui/views/tabs/tab_strip.cc

Status: Fixed (was: Assigned)

Sign in to add a comment