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

Unified Diff: ui/views/widget/tooltip_manager_win.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes Created 8 years, 2 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/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager_win.cc
diff --git a/ui/views/widget/tooltip_manager_win.cc b/ui/views/widget/tooltip_manager_win.cc
index 96886256145ce82ed40def37d21ab66155722e79..98891eadc61d8ed82a2707205d40952cd5c40938 100644
--- a/ui/views/widget/tooltip_manager_win.cc
+++ b/ui/views/widget/tooltip_manager_win.cc
@@ -366,7 +366,9 @@ void TooltipManagerWin::ShowKeyboardTooltip(View* focused_view) {
line_count * tooltip_height_ };
gfx::Rect monitor_bounds =
views::GetMonitorBoundsForRect(gfx::Rect(rect_bounds));
- rect_bounds = gfx::Rect(rect_bounds).AdjustToFit(monitor_bounds).ToRECT();
+ gfx::Rect fitted_bounds = gfx::Rect(rect_bounds);
+ fitted_bounds.AdjustToFit(monitor_bounds);
+ rect_bounds = fitted_bounds.ToRECT();
::SetWindowPos(keyboard_tooltip_hwnd_, NULL, rect_bounds.left,
rect_bounds.top, 0, 0,
SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOSIZE);
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698