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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 1855503002: Mac: Update the tooltip view tooltip when a tab's title changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160329-Mac-DeploymentTarget
Patch Set: Unit test.. Created 4 years, 9 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/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index abaa031aee3b81738d900df60bf1f7557eef18d6..250d5f3bc77fb574019d6cef6ac613ce42b0c8f5 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1221,9 +1221,11 @@ private:
title = l10n_util::GetStringUTF16(IDS_BROWSER_WINDOW_MAC_TAB_UNTITLED);
[tab setTitle:base::SysUTF16ToNSString(title)];
- const base::string16& toolTip = chrome::AssembleTabTooltipText(
- title, [self alertStateForContents:contents]);
- [tab setToolTip:base::SysUTF16ToNSString(toolTip)];
+ NSString* toolTip = base::SysUTF16ToNSString(chrome::AssembleTabTooltipText(
+ title, [self alertStateForContents:contents]));
+ [tab setToolTip:toolTip];
+ if ([tab tabView] == hoveredTab_)
+ [toolTipView_ setToolTip:toolTip];
}
// Called when a notification is received from the model to insert a new tab
@@ -1888,8 +1890,8 @@ private:
[toolTipView_ setFrame:[newHoveredTab frame]];
if (![toolTipView_ superview]) {
[tabStripView_ addSubview:toolTipView_
- positioned:NSWindowBelow
- relativeTo:nil];
+ positioned:NSWindowAbove
+ relativeTo:dragBlockingView_];
}
}
}

Powered by Google App Engine
This is Rietveld 408576698