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

Unified Diff: chrome/browser/ui/gtk/browser_toolbar_gtk.cc

Issue 10892002: GTK: Do not depend on the notification observer order... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: just call UpdateZoomControls instead Created 8 years, 3 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/gtk/browser_toolbar_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/browser_toolbar_gtk.cc (revision 155004)
+++ chrome/browser/ui/gtk/browser_toolbar_gtk.cc (working copy)
@@ -410,6 +410,14 @@
is_wrench_menu_model_valid_ = false;
gtk_widget_queue_draw(wrench_menu_button_->widget());
} else if (type == content::NOTIFICATION_ZOOM_LEVEL_CHANGED) {
+ // Since BrowserToolbarGtk create a new |wrench_menu_model_| in
+ // RebuildWrenchMenu(), the ordering of the observers of
+ // NOTIFICATION_ZOOM_LEVEL_CHANGED can change, and result in subtle bugs
+ // like http://crbug.com/118823. Rather than depending on the ordering
+ // of the notification observers, always update the WrenchMenuModel before
+ // updating the WrenchMenu.
+ wrench_menu_model_->UpdateZoomControls();
+
// If our zoom level changed, we need to tell the menu to update its state,
// since the menu could still be open.
wrench_menu_->UpdateMenu();
« 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