WebKit2: Implement TextChecker on Windows
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 18:01:19 +0000 (18:01 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Apr 2011 18:01:19 +0000 (18:01 +0000)
commitf6c5c336ccfc15f80d802c9960d42d66cca6487d
treeaf987aba8137dddc39279ddd973d6e73b5e8efa1
parenta7dc1e9c71815c7a4cd3ac559d570e13efc74f52
WebKit2: Implement TextChecker on Windows
https://bugs.webkit.org/show_bug.cgi?id=57862

Reviewed by Adam Roben.

Part 3: Implement checkSpellingOfString

In WebCore, checkTextOfParagraph is only defined and used on platforms where
WTF_USE_UNIFIED_TEXT_CHECKING is defined (which right now is only non-Leopard and non-Tiger
Mac builds).

On other platforms, checkSpellingOfString and checkGrammarOfString (coming in a separate
patch in an attempt to keep things easier to review) are used.

* UIProcess/API/C/win/WKTextChecker.h:
* UIProcess/TextChecker.h:
Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
checkSpellingOfString.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::checkTextOfParagraph):
Surround this by #if USE(UNIFIED_TEXT_CHECKING).
(WebKit::WebPageProxy::checkSpellingOfString):
Call through to the client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
checkSpellingOfString.

* UIProcess/win/TextCheckerWin.cpp:
(WebKit::TextChecker::checkSpellingOfString):
Call through to the WebTextCheckerClient.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
Surround this by #if USE(UNIFIED_TEXT_CHECKING) for clarity.
(WebKit::TextChecker::checkSpellingOfString):
Add a call to notImplemented.
* UIProcess/qt/TextCheckerQt.cpp:
(WebKit::TextChecker::checkSpellingOfString):
Ditto, and remove the implementation for checkTextOfParagraph.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::checkSpellingOfString):
Ditto.

* UIProcess/win/WebTextCheckerClient.cpp:
(WebKit::WebTextCheckerClient::checkSpellingOfString):
* UIProcess/win/WebTextCheckerClient.h:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::checkSpellingOfString):
Send a sync message to the UI Process (similar to the sync message used for
checkTextOfParagraph).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/win/WKTextChecker.h
Source/WebKit2/UIProcess/TextChecker.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp
Source/WebKit2/UIProcess/mac/TextCheckerMac.mm
Source/WebKit2/UIProcess/qt/TextCheckerQt.cpp
Source/WebKit2/UIProcess/win/TextCheckerWin.cpp
Source/WebKit2/UIProcess/win/WebTextCheckerClient.cpp
Source/WebKit2/UIProcess/win/WebTextCheckerClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp