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

Unified Diff: ui/views/cocoa/tooltip_manager_mac.mm

Issue 1777653002: Prepare ui/ module for compilation with OS X 10.7 deployment target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More compile errors. 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
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/cocoa/widget_owner_nswindow_adapter.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/cocoa/tooltip_manager_mac.mm
diff --git a/ui/views/cocoa/tooltip_manager_mac.mm b/ui/views/cocoa/tooltip_manager_mac.mm
index 3101ee13a6a076049d2f0c2a9e952dba066c68ec..99a1fb5d9069b5c8a61baa1efacb7d3389f90667 100644
--- a/ui/views/cocoa/tooltip_manager_mac.mm
+++ b/ui/views/cocoa/tooltip_manager_mac.mm
@@ -4,6 +4,7 @@
#include "ui/views/cocoa/tooltip_manager_mac.h"
+#include "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/gfx/font_list.h"
#import "ui/gfx/mac/coordinate_conversion.h"
#import "ui/views/cocoa/bridged_content_view.h"
@@ -39,7 +40,8 @@ void TooltipManagerMac::UpdateTooltip() {
NSWindow* window = widget_->ns_window();
BridgedContentView* view = widget_->ns_view();
- NSPoint nspoint = [window convertScreenToBase:[NSEvent mouseLocation]];
+ NSPoint nspoint =
+ ui::ConvertPointFromScreenToWindow(window, [NSEvent mouseLocation]);
// Note: flip in the view's frame, which matches the window's contentRect.
gfx::Point point(nspoint.x, NSHeight([view frame]) - nspoint.y);
[view updateTooltipIfRequiredAt:point];
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/cocoa/widget_owner_nswindow_adapter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698