summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 18:29:52 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-23 18:29:52 +0000
commitf6f42607f926da1bb0534e6384260ebb23fce008 (patch)
tree8ca158e0a8b7632a1acc83999047b933d1f4a765
parentc526bbf21ba9f0d6ae16a1008813e2652a586965 (diff)
downloadchromium_src-f6f42607f926da1bb0534e6384260ebb23fce008.zip
chromium_src-f6f42607f926da1bb0534e6384260ebb23fce008.tar.gz
chromium_src-f6f42607f926da1bb0534e6384260ebb23fce008.tar.bz2
Fix zoom bubble issues
This CL fixes two issues with the zoom bubble: - tracking area wasn't working because the bubble was no longer key. Fix was not to use NSTrackingActiveInKeyWindow - zoom icon wasn't be hidden. Fix was to update decorations after calling SetVisible(false). BUG=284995 TEST=Zoomed into a page. Moved the mouse over the zoom bubble. Verified that it didn't close. Pressed reset and let the bubble close. Verified that the zoom icon was hidden. Review URL: https://chromiumcodereview.appspot.com/23620063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224754 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm4
2 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
index 3880b11..7273bb0 100644
--- a/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/zoom_bubble_controller.mm
@@ -97,7 +97,7 @@ void SetZoomBubbleAutoCloseDelayForTesting(NSTimeInterval time_interval) {
trackingArea_.reset([[CrTrackingArea alloc]
initWithRect:NSZeroRect
options:NSTrackingMouseEnteredAndExited |
- NSTrackingActiveInKeyWindow |
+ NSTrackingActiveAlways |
NSTrackingInVisibleRect
owner:self
userInfo:nil]);
diff --git a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
index d6a3fd2..469feae 100644
--- a/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm
@@ -70,8 +70,10 @@ void ZoomDecoration::ShowBubble(BOOL auto_close) {
// If the page is at default zoom then hiding the zoom decoration was
// suppressed while the bubble was open. Now that the bubble is closed
// the decoration can be hidden.
- if (IsAtDefaultZoom())
+ if (IsAtDefaultZoom() && IsVisible()) {
SetVisible(false);
+ owner_->OnDecorationsChanged();
+ }
};
bubble_ =
[[ZoomBubbleController alloc] initWithParentWindow:[field window]