diff options
author | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 19:16:47 +0000 |
---|---|---|
committer | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-12 19:16:47 +0000 |
commit | 2365c64ad9e6b4621ca4fb9876178b1f47253296 (patch) | |
tree | a82ab3a6f69f8a323a2137508de6b7fab28f255d /chrome/browser/tab_contents | |
parent | 97eddfe766623115be4a6ef7831c740dcf10391f (diff) | |
download | chromium_src-2365c64ad9e6b4621ca4fb9876178b1f47253296.zip chromium_src-2365c64ad9e6b4621ca4fb9876178b1f47253296.tar.gz chromium_src-2365c64ad9e6b4621ca4fb9876178b1f47253296.tar.bz2 |
Replace the misspelled range within a selection to correct spelling.
This CL changes the spell check correction to replace the misspelled range
within a selection instead of replacing the whole selection. This change enables
spell check of words selected with surrounding whitespace or punctuation. Such
selection happens on a double-click of a word with a trailing underscore in
Windows, for example. This CL requires the change in https://webkit.org/b/108513.
BUG=167485,169659
Review URL: https://chromiumcodereview.appspot.com/12038037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181968 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/spelling_menu_observer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/spelling_menu_observer.cc b/chrome/browser/tab_contents/spelling_menu_observer.cc index 4481aca..a7022b1 100644 --- a/chrome/browser/tab_contents/spelling_menu_observer.cc +++ b/chrome/browser/tab_contents/spelling_menu_observer.cc @@ -216,7 +216,7 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) { if (command_id >= IDC_SPELLCHECK_SUGGESTION_0 && command_id <= IDC_SPELLCHECK_SUGGESTION_LAST) { - proxy_->GetRenderViewHost()->Replace( + proxy_->GetRenderViewHost()->ReplaceMisspelling( suggestions_[command_id - IDC_SPELLCHECK_SUGGESTION_0]); // GetSpellCheckHost() can return null when the suggested word is // provided by Web SpellCheck API. @@ -234,7 +234,7 @@ void SpellingMenuObserver::ExecuteCommand(int command_id) { // the misspelled word with the suggestion and add it to our custom-word // dictionary so this word is not marked as misspelled any longer. if (command_id == IDC_CONTENT_CONTEXT_SPELLING_SUGGESTION) { - proxy_->GetRenderViewHost()->Replace(result_); + proxy_->GetRenderViewHost()->ReplaceMisspelling(result_); misspelled_word_ = result_; } |