-
jberlin@webkit.org authored
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: http://svn.webkit.org/repository/webkit/trunk@83232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
756e20b2