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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2845593002: Updates Zoom bubble layout and adds +/- buttons (Closed)
Patch Set: Updates Zoom bubble layout and adds +/- buttons (comments) Created 3 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 284f8672adcee772b35cd6d0e4879e2190544d6c..cb11482a00ad1c30938e716471742118aac47949 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -320,9 +320,15 @@ void LocationBarView::ZoomChangedForActiveTab(bool can_show_bubble) {
}
WebContents* web_contents = GetWebContents();
- if (can_show_bubble && zoom_view_->visible() && web_contents)
+ // Zoom bubble may be present without its corresponding decoration
+ // |zoom_view_| such as when using + or - buttons in the bubble to
+ // set the zoom to 100%. When either is visible, show or update the
+ // bubble contents.
+ if (can_show_bubble && web_contents &&
+ (zoom_view_->visible() || ZoomBubbleView::GetZoomBubble())) {
ZoomBubbleView::ShowBubble(web_contents, gfx::Point(),
ZoomBubbleView::AUTOMATIC);
+ }
}
void LocationBarView::SetStarToggled(bool on) {

Powered by Google App Engine
This is Rietveld 408576698