summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 20:57:39 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 20:57:39 +0000
commit4d9c341c7ee9a63dae7de2637a6c8796834e3d7a (patch)
tree54f2467094fb4612e102235036abeca63ac91422 /chrome/browser/autocomplete
parenta6b0a99db7e0e3c7de88a4188427da418066886e (diff)
downloadchromium_src-4d9c341c7ee9a63dae7de2637a6c8796834e3d7a.zip
chromium_src-4d9c341c7ee9a63dae7de2637a6c8796834e3d7a.tar.gz
chromium_src-4d9c341c7ee9a63dae7de2637a6c8796834e3d7a.tar.bz2
Pasting successfully into a TextField should always trigger
OnContentsChanged on the controller. BUG=None TEST= 1) Navigate to google.com, copy the contents of the OmniBox (the URL) and paste it back into the OmniBox. The dropdown should appear. 2) Navigate to google.com, copy the word Privacy into the clipboard. Open the Find box, Paste into the Find bar. It should search. Close the Find bar. Reopen the Find bar. Paste again. It should search. Review URL: http://codereview.chromium.org/63014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index d8c88b0..c2ed753 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -102,7 +102,7 @@ class EditDropTarget : public BaseDropTarget {
// this is false regardless of whether the clipboard has a string.
bool drag_has_string_;
- DISALLOW_EVIL_CONSTRUCTORS(EditDropTarget);
+ DISALLOW_COPY_AND_ASSIGN(EditDropTarget);
};
// A helper method for determining a valid DROPEFFECT given the allowed
@@ -1565,6 +1565,10 @@ void AutocompleteEditViewWin::OnPaste() {
// different behaviors in such a case.
if (IsSelectAll())
model_->on_paste_replacing_all();
+ // Force a Paste operation to trigger the text_changed code in
+ // OnAfterPossibleChange(), even if identical contents are pasted into the
+ // text box.
+ text_before_change_.clear();
ReplaceSel(text.c_str(), true);
}
}