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

Issue 2942013002: [omnibox] Constrain 'IsSelectAll()' to be more accurate (Closed)

Created:
3 years, 6 months ago by Kevin Bailey
Modified:
3 years, 6 months ago
CC:
chromium-reviews, tfarina, jdonnelly+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[omnibox] Constrain 'IsSelectAll()' to be more accurate Currently, 'IsSelectAll()' returns true for a range of (0,0) but the text is empty. This isn't correct, and a range with identical endpoints actually represents a cursor/caret position with nothing selected. Specifically, (0,0) is what the Omnibox code requests to 'home' the cursor. Returning true is causing a problem for 'OmniboxViewViews::Update()' which then thinks it should select all of the new text. BUG=729415 Review-Url: https://codereview.chromium.org/2942013002 Cr-Commit-Position: refs/heads/master@{#480450} Committed: https://chromium.googlesource.com/chromium/src/+/4033a5a4297ace7d7bf93cdc9b8ea35db4fa35da

Patch Set 1 #

Patch Set 2 : Fix browsertest and align Cocoa version #

Patch Set 3 : Missed a fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M chrome/browser/autocomplete/autocomplete_browsertest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/omnibox/omnibox_view_views.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (15 generated)
Kevin Bailey
Hi Peter, I tracked this inadvertent select-all down to this questionable 'IsSelectAll()'. During the course ...
3 years, 6 months ago (2017-06-15 16:01:40 UTC) #3
Peter Kasting
It's not obvious to me whether IsSelectAll() should be always-true or always-false when the text ...
3 years, 6 months ago (2017-06-15 21:32:00 UTC) #4
Kevin Bailey
Hi Rohit, Could you bless the Cocoa side of this? thx, krb
3 years, 6 months ago (2017-06-16 15:33:17 UTC) #12
rohitrao (ping after 24h)
mac/ lgtm
3 years, 6 months ago (2017-06-18 13:22:25 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2942013002/40001
3 years, 6 months ago (2017-06-19 14:27:46 UTC) #18
commit-bot: I haz the power
3 years, 6 months ago (2017-06-19 15:34:53 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/4033a5a4297ace7d7bf93cdc9b8e...

Powered by Google App Engine
This is Rietveld 408576698