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

Unified Diff: ui/views/ime/input_method_base.cc

Issue 14668011: Merge 199665 "Return caret bounds in local coordinates from GetC..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/ime/input_method_base.cc
===================================================================
--- ui/views/ime/input_method_base.cc (revision 199681)
+++ ui/views/ime/input_method_base.cc (working copy)
@@ -86,7 +86,11 @@
if (!client || client->GetTextInputType() == ui::TEXT_INPUT_TYPE_NONE)
return false;
- *rect = GetFocusedView()->ConvertRectToWidget(client->GetCaretBounds());
+ gfx::Rect caret_bounds = client->GetCaretBounds();
+ gfx::Point caret_origin = caret_bounds.origin();
+ View::ConvertPointFromScreen(GetFocusedView(), &caret_origin);
+ caret_bounds.set_origin(caret_origin);
+ *rect = GetFocusedView()->ConvertRectToWidget(caret_bounds);
// Convert coordinates if the focused view is inside a child Widget.
if (GetFocusedView()->GetWidget() != widget_)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698