From 2de685cb184bca8520ae65d20bd8115805efbeac Mon Sep 17 00:00:00 2001 From: "rouslan@chromium.org" Date: Fri, 12 Apr 2013 16:15:02 +0000 Subject: Replace misspelled range when user chooses a spelling correction in Mac This patch replaces the misspelled range instead of selected text when user chooses a spelling correction from the right-click menu. Replacing selected text was a workaround, which was necessary because Mac used synchronous spellcheck. Synchronous spellcheck does not preserve misspelled range information on right-click. Mac now uses asynchronous spellcheck, which preserves the misspelled range information on right-click. BUG=177237 Review URL: https://chromiumcodereview.appspot.com/14005005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193947 0039d316-1c4b-4281-b951-d872f2087c98 --- content/browser/renderer_host/render_widget_host_impl.cc | 6 ------ 1 file changed, 6 deletions(-) (limited to 'content/browser') diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index eaabc71..fa74f6f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2191,13 +2191,7 @@ void RenderWidgetHostImpl::Replace(const string16& word) { } void RenderWidgetHostImpl::ReplaceMisspelling(const string16& word) { -#if defined(OS_MACOSX) - // TODO(rouslan): Use ViewMsg_ReplaceMisspelling on Mac after Mac implements - // asynchronous spell checking and enables unified text checking. - Send(new ViewMsg_Replace(routing_id_, word)); -#else Send(new ViewMsg_ReplaceMisspelling(routing_id_, word)); -#endif } void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) { -- cgit v1.1