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

Issue 159105: [Mac] Detect control-key changes in autocomplete field. (Closed)

Created:
11 years, 5 months ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
Reviewers:
John Grabowski
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

[Mac] Detect control-key changes in autocomplete field. http://crbug.com/10934 TEST=Type 'something', and press Control. Autocomplete should show www.something.com at the top. If that's what you'd get anyhow, try a different word. Control-enter should take you there.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add some comments on how messages flow around. #

Patch Set 3 : More comments about Control handling. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -1 line) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_mac.h View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_mac.mm View 1 2 4 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field.mm View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/autocomplete_text_field_unittest.mm View 1 4 chunks +53 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Scott Hess - ex-Googler
11 years, 5 months ago (2009-07-20 23:11:25 UTC) #1
John Grabowski
LGTM Looks like more magic of the Omnibox. Might be nice to add a pointer ...
11 years, 5 months ago (2009-07-20 23:58:38 UTC) #2
Scott Hess - ex-Googler
11 years, 5 months ago (2009-07-21 17:22:45 UTC) #3
> Looks like more magic of the Omnibox.  Might be nice to add a
> pointer to the doc which defines the behavior you are implementing.

What I've got are the bug, and autocomplete_edit.cc, and reverse engineering. 
I'll add some commentary to our code.

http://codereview.chromium.org/159105/diff/1/3
File chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (right):

http://codereview.chromium.org/159105/diff/1/3#newcode646
Line 646: - (BOOL)control:(NSControl*)control
On 2009/07/20 23:58:38, John Grabowski wrote:
> Where is this guy called from?
> Is this an impl of a well-defined interface?

NSControl defines it to let the delegate handle -doCommandBySelector: stuff
rather than having to subclass.  Either the field editor delegates to the field
or it just lets -doCommandBySelector: flow up the responder chain.

Powered by Google App Engine
This is Rietveld 408576698