New issue
Advanced search Search tips

Issue 848016 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Changing ideal bounds while tab bounds are animating causes glitches

Project Member Reported by pkasting@chromium.org, May 30 2018

Issue description

This is tricky to repro without slowing down animations internally.

(1) Add enough tabs that inactive tabs are narrower than active ones
(2) Select one or more tabs, drag to the right edge of the strip, let go so they snap back into position
(3) While this animation is occurring, change the ideal bounds of the tabs by hitting ctrl-1 to select the first tab in the strip (or any other tab; the tab selected doesn't matter as long as the bounds change)

At this point the animating tabs continue to animate to their current target bounds, but the rest of the tabs get new bounds, so the tabs end up drawn overlapping until e.g. the strip is resized or some other action updates all the tab bounds.

+CC sangwoo108 who's done work on other tab bounds layout glitches and might care about this.
 
Owner: sangwoo108@chromium.org
Maybe it's because dragging() state of tabs is reset when animation caused by dragging ends. If dragging() returns true, newly created ideal_bounds() won't be set in AnimateToIdelaBounds(). Let me see what we can do.

(right now, I'm having trouble with build. Maybe it'll take a few days. If anyone else want to take this, please feel free to do this :))
I know we can't clear the dragging bit while that animation back is happening or something bad happens (but I forget what).
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 8 2018

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

commit a0d1989ee45f551651ad4f5f6189114da4c906b4
Author: sangwoo.ko <sangwoo108@chromium.org>
Date: Fri Jun 08 06:07:01 2018

Reset animation for dragged tabs.

When dragging ends, an animation for tabs runs.
If ideal bounds for tabs changes when the animation is running,
We should restart animation with newly calculated bounds.

Bug:  848016 
Change-Id: I1b5fff8d3bcd02fbe2d39f847c77e9c5df3c01c2
Reviewed-on: https://chromium-review.googlesource.com/1084521
Commit-Queue: Sang Woo Ko <sangwoo108@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565567}
[modify] https://crrev.com/a0d1989ee45f551651ad4f5f6189114da4c906b4/chrome/browser/ui/views/tabs/tab_strip.cc
[modify] https://crrev.com/a0d1989ee45f551651ad4f5f6189114da4c906b4/chrome/browser/ui/views/tabs/tab_strip_unittest.cc

Status: Fixed (was: Started)
FYI, the bad thing from #2 is that new tab button can be painted atop previously dragged tabs when we clear the dragging bit during or before the animation.

Sign in to add a comment