Fix bug where the cursor position would be computed wrongly when entering
keyword mode.
This is because we need to clear |is_keyword_hint_| to force the toggle into
keyword mode, but once this is done, the code in
OmniboxEditModel::StartAutocomplete() will assume we're showing the keyword UI,
and adjust the cursor position accordingly, which is a mistake. Fix this by
simply telling StartAutocomplete() not to adjust in the case where we're
entering keyword mode.
This could trigger DCHECKs when e.g. typing a keyword, getting the "press tab"
hint, clicking somewhere so the omnibox would lose focus and close the popup,
putting the cursor back at the end of the omnibox text, and hitting tab.
BUG=265949
TEST=Ensure the steps in the final paragraph above don't trigger a DCHECK in a debug build.
Review URL: https://codereview.chromium.org/
1096883003
Cr-Commit-Position: refs/heads/master@{#326135}