Commit 38a3aa58 authored by Kevin Bailey's avatar Kevin Bailey Committed by Commit Bot

[omnibox] Fix cursor position in RTL UI

We had a complicated test to see where to put the cursor, but it turns
out that it was unnecessary, and wrong in one case. This CL restores
its behavior.

Bug: 1019631
Change-Id: I18ed14d12dc55b3ac63c76eb4ed62e3f5624e8df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1889999
Commit-Queue: Kevin Bailey <krb@chromium.org>
Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710963}
parent 279a9c9d
...@@ -780,8 +780,8 @@ void OmniboxViewViews::OnTemporaryTextMaybeChanged( ...@@ -780,8 +780,8 @@ void OmniboxViewViews::OnTemporaryTextMaybeChanged(
if (save_original_selection) if (save_original_selection)
saved_temporary_selection_ = GetSelectedRange(); saved_temporary_selection_ = GetSelectedRange();
SetAccessibilityLabel(display_text, match); SetAccessibilityLabel(display_text, match);
int caret_pos = TextAndUIDirectionMatch() ? display_text.length() : 0; SetWindowTextAndCaretPos(display_text, display_text.length(), false,
SetWindowTextAndCaretPos(display_text, caret_pos, false, notify_text_changed); notify_text_changed);
} }
bool OmniboxViewViews::OnInlineAutocompleteTextMaybeChanged( bool OmniboxViewViews::OnInlineAutocompleteTextMaybeChanged(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment