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

Issue 213029: [Mac] Paste in Omnibox needs to initiate field editing correctly. (Closed)

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

Description

[Mac] Paste in Omnibox needs to initiate field editing correctly. We override -paste: to do Chrome-specific stuff. This circumvents certain Cocoa-standard setup which happens when user's edit text views, and elsewhere we depend on that setup being right. This changes our code to participate in that setup process. http://crbug.com/21301 TEST=Copy "raising arizona" to the clipboard. Put focus in the NTP (Omnibox field does not have focus ring). Click in Omnibox field and paste. Should now see autocomplete popup.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -14 lines) Patch
M chrome/browser/autocomplete/autocomplete_edit_view_mac.mm View 1 chunk +22 lines, -14 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Scott Hess - ex-Googler
Indeed, the delegate methods weren't being called in the right places.
11 years, 3 months ago (2009-09-18 20:24:27 UTC) #1
rohitrao (ping after 24h)
LGTM http://codereview.chromium.org/213029/diff/1/2 File chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (right): http://codereview.chromium.org/213029/diff/1/2#newcode613 Line 613: [editor didChangeText]; So this is what fires ...
11 years, 3 months ago (2009-09-18 20:38:25 UTC) #2
Scott Hess - ex-Googler
11 years, 3 months ago (2009-09-18 21:20:51 UTC) #3
http://codereview.chromium.org/213029/diff/1/2
File chrome/browser/autocomplete/autocomplete_edit_view_mac.mm (right):

http://codereview.chromium.org/213029/diff/1/2#newcode613
Line 613: [editor didChangeText];
On 2009/09/18 20:38:25, rohitrao wrote:
> So this is what fires off controlTextDidChange?

-didChangeText leads to -controlTextDidChange:, -shouldChangeText* leads to
-controlTextDidBeginEditing:.

The reason for not just pulling those implementations in-line is to handle how
things work if the user types, then pastes, or pastes, then types, or pastes
then pastes.  The later oeprations won't hit -controlTextDidBeginEditing:, but
will hit -controlTextDidChange:.

Powered by Google App Engine
This is Rietveld 408576698