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

Unified Diff: ui/base/ime/input_method_win.cc

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Other Unit Tests - Moved Inner Classes Outside Created 4 years, 11 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: ui/base/ime/input_method_win.cc
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index 56bbac1b3244b1618eeaa89001155b815223cdf6..6f0c815465f23237d23841c5bbf403387b426dfd 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -16,7 +16,7 @@
#include "ui/events/event_constants.h"
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/win/dpi.h"
+#include "ui/gfx/screen_win.h"
#include "ui/gfx/win/hwnd_util.h"
namespace ui {
@@ -199,7 +199,8 @@ void InputMethodWin::OnCaretBoundsChanged(const TextInputClient* client) {
// Tentatively assume that the returned value is DIP (Density Independent
// Pixel). See the comment in text_input_client.h and http://crbug.com/360334.
const gfx::Rect dip_screen_bounds(GetTextInputClient()->GetCaretBounds());
- const gfx::Rect screen_bounds = gfx::win::DIPToScreenRect(dip_screen_bounds);
+ const gfx::Rect screen_bounds = gfx::ScreenWin::DIPToScreenRect(
+ toplevel_window_handle_, dip_screen_bounds);
HWND attached_window = toplevel_window_handle_;
// TODO(ime): see comment in TextInputClient::GetCaretBounds(), this
@@ -572,7 +573,8 @@ LRESULT InputMethodWin::OnQueryCharPosition(IMECHARPOSITION* char_positon) {
return 0;
dip_rect = client->GetCaretBounds();
}
- const gfx::Rect rect = gfx::win::DIPToScreenRect(dip_rect);
+ const gfx::Rect rect =
+ gfx::ScreenWin::DIPToScreenRect(toplevel_window_handle_, dip_rect);
char_positon->pt.x = rect.x();
char_positon->pt.y = rect.y();
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/gfx/BUILD.gn » ('j') | ui/gfx/display.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698