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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 1862243006: [Mac] Prevent extension icon animation when window not visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 3f97173ebd586de502c3e41e5576aec843711d5f..dcd0a8fca9005dc0970cbbe640f52212aae61dc2 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -658,9 +658,10 @@ void ToolbarActionsBarBridge::ShowExtensionMessageBubble(
// Cocoa goes a little crazy if we try and change animations while adjusting
// child frames (i.e., the buttons). If the toolbar is already animating,
// just jump to the new frame. (This typically only happens if someone is
- // "spamming" a button to add/remove an action.)
+ // "spamming" a button to add/remove an action.) If the window isn't visible
+ // (for example it's in the process of being created), don't bother animating.
BOOL animate = !toolbarActionsBar_->suppress_animation() &&
- ![containerView_ isAnimating];
+ ![containerView_ isAnimating] && [[containerView_ window] isVisible];
[self updateContainerVisibility];
[containerView_ resizeToWidth:width
animate:animate];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698