Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Issue 2391253003: views: don't try to throb bookmark buttons (Closed)

Created:
4 years, 2 months ago by Elly Fong-Jones
Modified:
3 years, 8 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views: don't try to throb bookmark buttons BookmarkButton does not have a throb animation, so telling it to throb will cause it to repaint uselessly every 150ms. BUG=650115

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 3 (2 generated)
Elly Fong-Jones
4 years, 2 months ago (2016-10-05 16:18:07 UTC) #3
estade: ptal?

This fix is kind of a bandaid. The root issue here is that CustomButton has
throbbing support, but does not define its own throb animation (ie: its
OnPaint() does not pay attention to the throb state), but it *does*
SchedulePaint() in CustomButton::AnimationProgressed(). In theory, any subclass
that cares about animation state when painting should be responsible for
overriding AnimationProgressed() to call SchedulePaint() instead, but that seems
duplicative. Is there a good way for CustomButton to tell whether the subclass
cares about the animation? If not, should we add one?

Powered by Google App Engine
This is Rietveld 408576698