SpellCheckRequest needs to know the context where the spellcheck happened.
authorshinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 12:32:27 +0000 (12:32 +0000)
committershinyak@chromium.org <shinyak@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 12:32:27 +0000 (12:32 +0000)
commit9cd6d2e3d6fff4333013215cf8a8caef879de5d2
treead1dd4e8ac330c3f5d622a77b8070b57f43bca1e
parent00a4d360774a772cb28adeee537fdb1e2ef88c50
SpellCheckRequest needs to know the context where the spellcheck happened.
https://bugs.webkit.org/show_bug.cgi?id=79320

Reviewed by Hajime Morita.

Source/WebCore:

WebKit clients should be able to get the context how the spellcheck happended.
For example, WebKit clients may want to change the behavior by a spellcheck request is
invoked in typing or in pasting.

This patch added an enum in SpellCheckRequest so that WebKit clients can understand the context.

* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
* editing/SpellChecker.cpp:
(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellCheckRequest::create):
(WebCore::SpellChecker::invokeRequest):
* editing/SpellChecker.h:
(SpellCheckRequest):
(WebCore::SpellCheckRequest::textCheckingRequest):
(WebCore::SpellCheckRequest::processType):
* loader/EmptyClients.h:
(WebCore::EmptyTextCheckerClient::requestCheckingOfString):
* platform/text/TextCheckerClient.h:
(WebCore):
(TextCheckerClient):
* platform/text/TextChecking.h:
(TextCheckingRequest):
(WebCore::TextCheckingRequest::TextCheckingRequest):
(WebCore::TextCheckingRequest::setSequence):
(WebCore::TextCheckingRequest::sequence):
(WebCore::TextCheckingRequest::text):
(WebCore::TextCheckingRequest::mask):
(WebCore::TextCheckingRequest::processType):
(WebCore):

Source/WebKit/blackberry:

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::requestCheckingOfString):
* WebCoreSupport/EditorClientBlackBerry.h:
(EditorClientBlackBerry):

Source/WebKit/chromium:

* src/EditorClientImpl.cpp:
(WebKit::EditorClientImpl::requestCheckingOfString):
* src/EditorClientImpl.h:
(EditorClientImpl):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::requestTextChecking):

Source/WebKit/efl:

* WebCoreSupport/EditorClientEfl.h:
(WebCore::EditorClientEfl::requestCheckingOfString):

Source/WebKit/gtk:

* WebCoreSupport/TextCheckerClientGtk.h:
(WebKit::TextCheckerClientGtk::requestCheckingOfString):

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(WebEditorClient::requestCheckingOfString):

Source/WebKit/qt:

* WebCoreSupport/TextCheckerClientQt.h:
(WebCore::TextCheckerClientQt::requestCheckingOfString):

Source/WebKit/win:

* WebCoreSupport/WebEditorClient.h:
(WebEditorClient::requestCheckingOfString):
(WebEditorClient):

Source/WebKit/wince:

* WebCoreSupport/EditorClientWinCE.h:
(WebKit::EditorClientWinCE::requestCheckingOfString):

Source/WebKit/wx:

* WebKitSupport/EditorClientWx.h:
(WebCore::EditorClientWx::requestCheckingOfString):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::requestCheckingOfString):
* WebProcess/WebCoreSupport/WebEditorClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
Source/WebCore/ChangeLog
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/SpellChecker.cpp
Source/WebCore/editing/SpellChecker.h
Source/WebCore/loader/EmptyClients.h
Source/WebCore/platform/text/TextCheckerClient.h
Source/WebCore/platform/text/TextChecking.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/EditorClientBlackBerry.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/EditorClientImpl.cpp
Source/WebKit/chromium/src/EditorClientImpl.h
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/TextCheckerClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebEditorClient.h
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebEditorClient.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
Source/WebKit/wx/ChangeLog
Source/WebKit/wx/WebKitSupport/EditorClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h