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

Unified Diff: chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm

Issue 2692973002: [Mac] Fix for zoom decoration regression (Closed)
Patch Set: Created 3 years, 10 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/location_bar/zoom_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
index 8b577fd8d4a39d3e47bf48d76754efff6d56523c..7dec74f192e13e115af096d1b7c17f9bb0ad4595 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -40,6 +40,7 @@ bool ZoomDecoration::UpdateIfNecessary(zoom::ZoomController* zoom_controller,
return true;
}
+ BOOL old_visibility = IsVisible();
SetVisible(ShouldShowDecoration() && !zoom_controller->IsAtDefaultZoom());
base::string16 zoom_percent =
@@ -51,8 +52,10 @@ bool ZoomDecoration::UpdateIfNecessary(zoom::ZoomController* zoom_controller,
? @""
: l10n_util::GetNSStringF(IDS_TOOLTIP_ZOOM, zoom_percent);
- if ([tooltip_ isEqualToString:tooltip_string] && !default_zoom_changed)
+ if ([tooltip_ isEqualToString:tooltip_string] && !default_zoom_changed &&
+ old_visibility == IsVisible()) {
return false;
+ }
UpdateUI(zoom_controller, tooltip_string, location_bar_is_dark);
return true;
« 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