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

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

Issue 2688603003: [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 5dfac1d8332ab4a89490558a70a8a38bbd91568e..35aded4deb17a31eaccb49243bcf916fcff7edaf 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -39,6 +39,7 @@ bool ZoomDecoration::UpdateIfNecessary(zoom::ZoomController* zoom_controller,
return true;
}
+ BOOL old_visibility = IsVisible();
SetVisible(ShouldShowDecoration() && !zoom_controller->IsAtDefaultZoom());
base::string16 zoom_percent =
@@ -50,8 +51,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