WebKit2: Implement TextChecker on Windows
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 00:38:20 +0000 (00:38 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2011 00:38:20 +0000 (00:38 +0000)
commit07e19ec39d58051bda0485f1f8cb020a7d81a25e
tree9e0f433e38104ab779f64b49f5db88aba1768f75
parentb5d5d550f24dcdf03838a3df959286e0b393e019
WebKit2: Implement TextChecker on Windows
https://bugs.webkit.org/show_bug.cgi?id=57862

Reviewed by Brian Weinstein.

Part 4: Implement checkGrammarOfString.

* Scripts/webkit2/messages.py:
The generated files should include TextCheckerClient.h for WebCore::GrammarDetail.

* Shared/API/c/win/WKBaseWin.h:
* Shared/APIObject.h:
* UIProcess/API/C/win/WKAPICastWin.h:

* UIProcess/API/C/win/WKGrammarDetail.cpp: Added.
(WKGrammarDetailGetTypeID):
(WKGrammarDetailCreate):
* UIProcess/API/C/win/WKGrammarDetail.h: Added.

* UIProcess/API/C/win/WKTextChecker.h:
Add the checkGrammarOfString WKTextCheckerClient function.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::checkGrammarOfString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:

* UIProcess/TextChecker.h:
* UIProcess/win/TextCheckerWin.cpp:
(WebKit::TextChecker::checkGrammarOfString):
Call the TextCheckerClient.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkSpellingOfString):
Add a comment about this not being used on Mac.
(WebKit::TextChecker::checkGrammarOfString):
Ditto, and call notImplemented.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::checkGrammarOfString):
Call notImplemented.
* UIProcess/qt/TextCheckerQt.cpp:
(WebKit::TextChecker::checkGrammarOfString):
Ditto.

* UIProcess/win/WebGrammarDetail.cpp: Added.
(WebKit::WebGrammarDetail::create):
(WebKit::WebGrammarDetail::WebGrammarDetail):
Initialize the underlying WebCore::GrammarDetail.
* UIProcess/win/WebGrammarDetail.h: Added.
(WebKit::WebGrammarDetail::grammarDetail):
(WebKit::WebGrammarDetail::type):

* UIProcess/win/WebTextCheckerClient.cpp:
(WebKit::WebTextCheckerClient::checkGrammarOfString):
Populate the Vector of WebCore::GrammarDetails with the WebGrammarDetails.
* UIProcess/win/WebTextCheckerClient.h:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::checkSpellingOfString):
Use WTF::notFound as the initial value for resultLocation.
(WebKit::WebEditorClient::checkGrammarOfString):
Send a sync message to the UI Process (similar to checkSpellingOfString and checkTextOfParagraph).

* win/WebKit2.vcproj:
Add WKGrammarDetail.h/.cpp and WebGrammarDetail.h/.cpp.
* win/WebKit2Generated.make:
Copy over WKGrammarDetail.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/API/c/win/WKBaseWin.h
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h
Source/WebKit2/UIProcess/API/C/win/WKGrammarDetail.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/win/WKGrammarDetail.h [new file with mode: 0644]
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/WebGrammarDetail.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/win/WebGrammarDetail.h [new file with mode: 0644]
Source/WebKit2/UIProcess/win/WebTextCheckerClient.cpp
Source/WebKit2/UIProcess/win/WebTextCheckerClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/win/WebKit2.vcproj
Source/WebKit2/win/WebKit2Generated.make