WebKit2: Implement TextChecker on Windows
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 21:19:22 +0000 (21:19 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 21:19:22 +0000 (21:19 +0000)
commitf83a006c69c39a18bab1ceb4ce8ba3be3fed9195
treefdb692b134e0baf0974de561c1a1a80d456233ce
parenta4de7393badca97d32faf0a09976c7ba3320e7dd
WebKit2: Implement TextChecker on Windows
https://bugs.webkit.org/show_bug.cgi?id=57862

Reviewed by Anders Carlsson.

Part 7: Implement getGuessesForWord, learnWord, and ignoreWord.

* UIProcess/API/C/win/WKTextChecker.cpp:
(WKTextCheckerChangeSpellingToWord):
* UIProcess/API/C/win/WKTextChecker.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::changeSpellingToWord):
Make this function const since it does not modify the WebPageProxy and making it const
allows WebTextChecker::changeSpellingToWord to take a const WebPageProxy.
(WebKit::WebPageProxy::learnWord):
* UIProcess/WebPageProxy.h:

* UIProcess/TextChecker.h:
* UIProcess/win/TextCheckerWin.cpp:
(WebKit::TextChecker::getGuessesForWord):
Ask the TextCheckerClient for the guesses.
(WebKit::TextChecker::learnWord):
Tell the TextCheckerClient.
(WebKit::TextChecker::ignoreWord):
Ditto.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::learnWord):
Add an unused param that is necessary for Windows.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::learnWord):
Ditto.
* UIProcess/qt/TextCheckerQt.cpp:
(WebKit::TextChecker::learnWord):
Ditto.

* UIProcess/win/WebTextChecker.cpp:
(WebKit::WebTextChecker::changeSpellingToWord):
Tell the page.
* UIProcess/win/WebTextChecker.h:

* UIProcess/win/WebTextCheckerClient.cpp:
(WebKit::WebTextCheckerClient::guessesForWord):
(WebKit::WebTextCheckerClient::learnWord):
(WebKit::WebTextCheckerClient::ignoreWord):
* UIProcess/win/WebTextCheckerClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/win/WKTextChecker.cpp
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/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/WebTextChecker.cpp
Source/WebKit2/UIProcess/win/WebTextChecker.h
Source/WebKit2/UIProcess/win/WebTextCheckerClient.cpp
Source/WebKit2/UIProcess/win/WebTextCheckerClient.h