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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2593323002: Use the physical-pixel space for native IME on linux platform. (Closed)
Patch Set: Created 4 years 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
« ui/base/ime/text_input_client.h ('K') | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 1de38cc04e5358d0757c2ed5a3036a766b8d10c5..0297b2c1840fac9b8dc1e016a60f63599cdd5a98 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1322,6 +1322,11 @@ bool Textfield::CanComposeInline() const {
return true;
}
+float Textfield::GetScaleFactor() const {
+ return display::Screen::GetScreen()->GetDisplayNearestWindow(
+ GetWidget()->GetNativeWindow()).device_scale_factor();
+}
+
gfx::Rect Textfield::GetCaretBounds() const {
gfx::Rect rect = GetRenderText()->GetUpdatedCursorBounds();
ConvertRectToScreen(this, &rect);
« ui/base/ime/text_input_client.h ('K') | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698