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

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

Issue 2709633003: Fix: Cursor of Omnibox stays in LTR mode after setting to RTL mode (Closed)
Patch Set: address comments Created 3 years, 10 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 | ui/views/controls/textfield/textfield_test_api.h » ('j') | 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 c50993256ba4c96cfbec6f059531700185dc95d3..01a666be628b77420bc5d76c902de3877e681d9f 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -1924,7 +1924,9 @@ void Textfield::UpdateAfterChange(bool text_changed, bool cursor_changed) {
}
void Textfield::UpdateCursorView() {
- cursor_view_.SetBoundsRect(GetRenderText()->GetUpdatedCursorBounds());
+ gfx::Rect location(GetRenderText()->GetUpdatedCursorBounds());
+ location.set_x(GetMirroredXForRect(location));
+ cursor_view_.SetBoundsRect(location);
}
void Textfield::PaintTextAndCursor(gfx::Canvas* canvas) {
« no previous file with comments | « no previous file | ui/views/controls/textfield/textfield_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698