2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
* editing/spelling/script-tests/spellcheck-paste.js: Added.
* editing/spelling/spellcheck-paste.html: Added.
* editing/spelling/spellcheck-paste-expected.txt: Added.
* platform/chromium/test_expectations.txt:
* platform/gtk/Skipped:
* platform/mac-leopard/Skipped:
* platform/mac-tiger/Skipped:
* platform/mac-wk2/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
- Introduced SpellChecker class to encapsulate asynchronous spell
checker state: sequence id, requesting text and target node.
This is also the first step to decompose spell-check related
code to a separate class.
- Added EditorClient::isAsynchronousSpellCheckingEnabled()
to use async spellcheck API on the platform.
These APIs are touched by SpellChecker.
- Used SpellChecker to check a pasted test. Text to check is
collected from the subtree under the editingRoot.
- Added Setting::m_asynchronousSpellCheckingEnabled to control
async spell checking.
Test: editing/spelling/spellcheck-paste.html
* CMakeLists.txt:
* GNUmakefile.am:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DocumentMarkerController.cpp:
(WebCore::DocumentMarkerController::showMarkers):
(showDocumentMarkers):
* dom/DocumentMarkerController.h:
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::setOffsetInLeafNode):
* dom/PositionIterator.h:
* editing/Editor.cpp:
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::Editor):
(WebCore::findFirstMarkable):
(WebCore::Editor::selectionStartHasSpellingMarkerFor):
* editing/Editor.h:
(WebCore::Editor::spellChecker):
* editing/SpellChecker.cpp: Added.
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::~SpellChecker):
(WebCore::SpellChecker::initRequest):
(WebCore::SpellChecker::clearRequest):
(WebCore::SpellChecker::isAsynchronousEnabled):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::isBusy):
(WebCore::SpellChecker::isValid):
(WebCore::SpellChecker::isCheckable):
(WebCore::SpellChecker::requestCheckingFor):
(WebCore::forwardIterator):
(WebCore::SpellChecker::didCheck):
* editing/SpellChecker.h: Added.
(WebCore::SpellCheckingResult::SpellCheckingResult):
(WebCore::SpellCheckingResult::type):
(WebCore::SpellCheckingResult::location):
(WebCore::SpellCheckingResult::length):
* loader/EmptyClients.h:
(WebCore::EmptyEditorClient::requestCheckingOfString):
* page/EditorClient.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setAsynchronousSpellCheckingEnabled):
(WebCore::Settings::asynchronousSpellCheckingEnabled):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* src/EditorClientImpl.h:
(WebKit::EditorClientImpl::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/EditorClientEfl.h:
(WebCore::EditorClientEfl::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/EditorClientGtk.h:
(WebKit::EditorClient::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/EditorClientHaiku.h:
(WebCore::EditorClientHaiku::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added asynchronous spell checking API to WebEditorClient using
-[NSSpellChecker requestCheckingOfString].
Note that WebEditorSpellCheckResponder is a small class to receive
requested spell-checking result. Note that this feature is
disabled at default.
Also added [WebPreferences setAsynchronousSpellCheckingEnabled:] to
enable the feature from LayoutTestController.
* WebCoreSupport/WebEditorClient.h:
* WebCoreSupport/WebEditorClient.mm:
(-[WebEditorSpellCheckResponder initWithSender:WebCore::sequence:results:]):
(-[WebEditorSpellCheckResponder perform]):
(toCoreSpellingResult):
(-[WebEditorSpellCheckResponder WTF::WebCore::]):
(WebEditorClient::requestCheckingOfString):
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setAsynchronousSpellCheckingEnabled:]):
(-[WebPreferences asynchronousSpellCheckingEnabled]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChangedNotification:]):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/EditorClientQt.h:
(WebCore::EditorClientQt::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/WebEditorClient.h:
(WebEditorClient::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebCoreSupport/EditorClientWinCE.h:
(WebKit::EditorClient::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebKitSupport/EditorClientWx.h:
(WebCore::EditorClientWx::requestCheckingOfString):
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added a stub implememntation.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::requestCheckingOfString):
* WebProcess/WebCoreSupport/WebEditorClient.h:
2010-10-28 MORITA Hajime <morrita@google.com>
Reviewed by Ojan Vafai.
spellcheck does not check pasted text
https://bugs.webkit.org/show_bug.cgi?id=40092
Added LayoutTestController::setAsynchronousSpellCheckingEnabled()
to control the setting.
* DumpRenderTree/LayoutTestController.cpp:
(setAsynchronousSpellCheckingEnabledCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
* DumpRenderTree/chromium/LayoutTestController.h:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::setAsynchronousSpellCheckingEnabled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73886
268f45cc-cd09-0410-ab3c-
d52691b4dbfc