diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 16:28:56 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-02 16:28:56 +0000 |
commit | c49085c7704d4a3544756b2387608ee2c12531e0 (patch) | |
tree | 022ca15c05ad6073a1e285ff6123dd1fbcd1ce4f /webkit/api | |
parent | 8eec12e3f5281dfc04a4cf8867f31bae547edc45 (diff) | |
download | chromium_src-c49085c7704d4a3544756b2387608ee2c12531e0.zip chromium_src-c49085c7704d4a3544756b2387608ee2c12531e0.tar.gz chromium_src-c49085c7704d4a3544756b2387608ee2c12531e0.tar.bz2 |
Restore plumbing for the spelling panel on Mac.
It turns out this is reached through a very awkward code path. We send an IPC
to the renderer so that it can call WebFrame::executeCommand passing it the
"ToggleSpellingPanel" command. That is intercepted in our code--in
WebFrameImpl--and results in calling a method on Editor that just turns around
and calls EditorClient. EditorClient is again our code, which just pokes the
embedder via WebViewClient to get it to send an IPC back to the browser so that
it can show the spelling panel.
I would have just short-circuited all of this plumbing if it weren't for the
side-effect that this code has of triggering an update to the spelling panel.
That way it can show the correct word. I think that could be done a simpler
way, but for now, I'm content to just restore the way things were.
R=pinkerton
BUG=23543
TEST=manual test: right click on a misspelled word and select the option on
Mac Chrome to show the spelling panel. you should see it appear :)
Review URL: http://codereview.chromium.org/246071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api')
-rw-r--r-- | webkit/api/public/WebViewClient.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/api/public/WebViewClient.h b/webkit/api/public/WebViewClient.h index fa1c987..b4e8a47 100644 --- a/webkit/api/public/WebViewClient.h +++ b/webkit/api/public/WebViewClient.h @@ -141,6 +141,9 @@ namespace WebKit { // replacement is found, then an empty string is returned. virtual WebString autoCorrectWord(const WebString& misspelledWord) = 0; + // Show or hide the spelling UI. + virtual void showSpellingUI(bool show) = 0; + // Update the spelling UI with the given word. virtual void updateSpellingUIWithMisspelledWord(const WebString& word) = 0; |