[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
morrita at google.com
morrita at google.com
Wed Dec 22 18:29:52 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7a18feed2c4a4642cfa403e2468b0d6c08fd633e
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Dec 13 06:06:19 2010 +0000
2010-10-28 MORITA Hajime <morrita at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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: http://svn.webkit.org/repository/webkit/trunk@73886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 1124bf0..b098c84 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-12 Sam Weinig <sam at webkit.org>
Update WebKit2 skipped list.
diff --git a/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js b/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
new file mode 100644
index 0000000..013d2b0
--- /dev/null
+++ b/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js
@@ -0,0 +1,98 @@
+
+description('For Bug 40092: Spell checking for pasted text.');
+
+layoutTestController.waitUntilDone();
+
+var testRoot = document.createElement("div");
+document.body.insertBefore(testRoot, document.body.firstChild);
+
+var testTextArea = document.createElement("textarea");
+testRoot.appendChild(testTextArea);
+
+var testInput = document.createElement("input");
+testInput.setAttribute("type", "text");
+testRoot.appendChild(testInput);
+
+var testEditable = document.createElement("div");
+testEditable.setAttribute("contentEditable", "true");
+testRoot.appendChild(testEditable);
+
+var testSourcePlain = document.createElement("div");
+testSourcePlain.innerHTML = "foo bar";
+testRoot.appendChild(testSourcePlain);
+
+var testSourceDecorated = document.createElement("div");
+testSourceDecorated.innerHTML = "fo<b>o ba</b>r";
+testRoot.appendChild(testSourceDecorated);
+
+var sel = window.getSelection();
+
+var tests = [];
+
+function done()
+{
+ var next = tests.shift();
+ if (next)
+ return window.setTimeout(next, 0);
+ testRoot.style.display = "none";
+ layoutTestController.notifyDone();
+}
+
+function verifyMarker(node, expectedMarked)
+{
+ if (node instanceof HTMLInputElement || node instanceof HTMLTextAreaElement) {
+ node.focus();
+ } else {
+ sel.selectAllChildren(node);
+ }
+ return layoutTestController.hasSpellingMarker(expectedMarked[0], expectedMarked[1]);
+}
+
+function pasteAndVerify(source, dest, expectedMarked)
+{
+ sel.selectAllChildren(source);
+ document.execCommand("Copy");
+ if (dest instanceof HTMLInputElement || dest instanceof HTMLTextAreaElement) {
+ dest.value = "";
+ dest.focus();
+ } else {
+ dest.innerHTML = "";
+ sel.selectAllChildren(dest);
+ }
+ document.execCommand("Paste");
+
+ var nretry = 10;
+ var nsleep = 1;
+ function trial() {
+ var verified = verifyMarker(dest, expectedMarked);
+ if (verified) {
+ testPassed(dest.tagName + " has a marker on '" + source.innerHTML + "'");
+ done();
+ return;
+ }
+
+ nretry--;
+ if (0 == nretry) {
+ testFailed(dest.tagName + " should have a marker on for '" + source.innerHTML + "'");
+ done();
+ return;
+ }
+
+ nsleep *= 2;
+ window.setTimeout(trial, nsleep);
+ };
+ trial();
+};
+
+if (window.layoutTestController)
+ layoutTestController.setAsynchronousSpellCheckingEnabled(true);
+
+tests.push(function() { pasteAndVerify(testSourcePlain, testInput, [0, 3]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testInput, [0, 3]); });
+tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [0, 3]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [0, 3]); });
+tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [0, 3]); });
+tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [0, 2]); }); // To check "fo" part of foo.
+done();
+
+var successfullyParsed = true;
diff --git a/LayoutTests/editing/spelling/spellcheck-paste-expected.txt b/LayoutTests/editing/spelling/spellcheck-paste-expected.txt
new file mode 100644
index 0000000..ee3a873
--- /dev/null
+++ b/LayoutTests/editing/spelling/spellcheck-paste-expected.txt
@@ -0,0 +1,15 @@
+For Bug 40092: Spell checking for pasted text.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+PASS INPUT has a marker on 'foo bar'
+PASS INPUT has a marker on 'fo<b>o ba</b>r'
+PASS TEXTAREA has a marker on 'foo bar'
+PASS TEXTAREA has a marker on 'fo<b>o ba</b>r'
+PASS DIV has a marker on 'foo bar'
+PASS DIV has a marker on 'fo<b>o ba</b>r'
+
diff --git a/LayoutTests/editing/spelling/spellcheck-paste.html b/LayoutTests/editing/spelling/spellcheck-paste.html
new file mode 100644
index 0000000..2baba0c
--- /dev/null
+++ b/LayoutTests/editing/spelling/spellcheck-paste.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/js-test-selection-shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/spellcheck-paste.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index e66cd77..c2fc693 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2485,6 +2485,9 @@ BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble07.html = IMAGE
BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble08.html = IMAGE
BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble09.html = IMAGE
+// Need to implement EditorClient::requestCheckingOfString()
+BUGWK41423 : editing/spelling/spellcheck-paste.html = TIMEOUT
+
// Flaky tests.
BUG44345 LINUX : svg/zoom/text/zoom-hixie-mixed-009.xml = IMAGE PASS
BUG44346 LINUX : svg/zoom/page/zoom-hixie-mixed-009.xml = IMAGE PASS
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 1acdccd..2b45241 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -964,6 +964,14 @@ editing/selection/unrendered-004.html
editing/selection/unrendered-005.html
editing/selection/unrendered-space.html
editing/selection/word-granularity.html
+editing/spelling/inline_spelling_markers.html
+editing/spelling/spellcheck-attribute.html
+editing/spelling/spelling-hasspellingmarker.html
+editing/spelling/spelling-backspace-between-lines.html
+editing/spelling/spelling-linebreak.html
+editing/spelling/spelling-attribute-change.html
+editing/spelling/spelling-attribute-at-child.html
+editing/spelling/spellcheck-paste.html
editing/style/5065910.html
editing/style/apple-style-editable-mix.html
editing/style/block-style-001.html
diff --git a/LayoutTests/platform/mac-leopard/Skipped b/LayoutTests/platform/mac-leopard/Skipped
index c466413..3c14cab 100644
--- a/LayoutTests/platform/mac-leopard/Skipped
+++ b/LayoutTests/platform/mac-leopard/Skipped
@@ -88,6 +88,9 @@ fast/text/hyphenate-locale.html
# See https://bugs.webkit.org/show_bug.cgi?id=35271
http/tests/media/video-seekable-stall.html
+# Available 10.6 or later
+editing/spelling/spellcheck-paste.html
+
# Disable tests which started failing after r66961
# Failures look like an underlying platform issue
# https://bugs.webkit.org/show_bug.cgi?id=45546
diff --git a/LayoutTests/platform/mac-tiger/Skipped b/LayoutTests/platform/mac-tiger/Skipped
index a2bad9f..24f3250 100644
--- a/LayoutTests/platform/mac-tiger/Skipped
+++ b/LayoutTests/platform/mac-tiger/Skipped
@@ -209,6 +209,9 @@ fast/harness/show-modal-dialog.html
# Loading fails on Tiger with error -1012 after asking NSURLConnection to continue without credentials.
http/tests/misc/401-alternative-content.php
+# Available only 10.6 or later
+editing/spelling/spellcheck-paste.html
+
# Disable spelling tests for autocorrection panel
platform/mac/editing/spelling/autocorrection-contraction.html
platform/mac/editing/spelling/autocorrection-delete.html
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 3190c11..81b9e71 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -173,6 +173,7 @@ editing/selection/triple-click-in-pre.html
editing/selection/user-drag-element-and-user-select-none.html
editing/selection/word-granularity.html
editing/spelling/context-menu-suggestions.html
+editing/spelling/spellcheck-paste.html
editing/undo/undo-deleteWord.html
editing/undo/undo-smart-delete-reversed-selection.html
editing/undo/undo-smart-delete-word.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 04bec9e..c3d8f38 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -2090,6 +2090,9 @@ editing/spelling/spelling-backspace-between-lines.html
editing/spelling/spelling-attribute-change.html
editing/spelling/spelling-attribute-at-child.html
+# EditorClient::requestCheckingOfString() is not implemented
+editing/spelling/spellcheck-paste.html
+
# ============================================================================= #
# failing editing/style tests
# ============================================================================= #
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index f706563..9c0403a 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -945,6 +945,9 @@ editing/spelling/spelling-backspace-between-lines.html
editing/spelling/spelling-contenteditable.html
editing/spelling/spelling-textarea.html
+# EditorClient::requestCheckingOfString() is not implemented
+editing/spelling/spellcheck-paste.html
+
# IndexedDB is not yet enabled.
storage/indexeddb
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 419888e..2b0ee30 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -951,6 +951,7 @@ SET(WebCore_SOURCES
editing/SelectionController.cpp
editing/SetNodeAttributeCommand.cpp
editing/SmartReplace.cpp
+ editing/SpellChecker.cpp
editing/SplitElementCommand.cpp
editing/SplitTextNodeCommand.cpp
editing/SplitTextNodeContainingElementCommand.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1d6af42..b90da4f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,72 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-09 Antonio Gomes <agomes at rim.com>
Reviewed by Daniel Bates.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index cc121c9..4d95df7 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1423,6 +1423,8 @@ webcore_sources += \
WebCore/editing/SmartReplace.cpp \
WebCore/editing/SmartReplace.h \
WebCore/editing/SmartReplaceICU.cpp \
+ WebCore/editing/SpellChecker.cpp \
+ WebCore/editing/SpellChecker.h \
WebCore/editing/SplitElementCommand.cpp \
WebCore/editing/SplitElementCommand.h \
WebCore/editing/SplitTextNodeCommand.cpp \
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 45632d2..bb0d892 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -518,6 +518,7 @@ __ZN7WebCore23ReplaceSelectionCommandC1EPNS_8DocumentEN3WTF10PassRefPtrINS_16Doc
__ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE
__ZN7WebCore23overrideDefaultLanguageERKN3WTF6StringE
__ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv
+__ZN7WebCore24DocumentMarkerController14markersForNodeEPNS_4NodeE
__ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker10MarkerTypeE
__ZN7WebCore24DocumentMarkerController14markersForNodeEPNS_4NodeE
__ZN7WebCore24DocumentMarkerController23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
@@ -922,6 +923,7 @@ __ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
__ZN7WebCore9pageCacheEv
__ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorE
__ZN7WebCore9toElementEN3JSC7JSValueE
+__ZN7WebCore12SpellChecker8didCheckEiRKN3WTF6VectorINS_19SpellCheckingResultELm0EEE
__ZNK3JSC8Bindings10RootObject12globalObjectEv
__ZNK3WTF6String14createCFStringEv
__ZNK7WebCore10Credential11persistenceEv
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 0f7c7db..ba9d627 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1475,6 +1475,8 @@
'editing/SmartReplace.h',
'editing/SmartReplaceCF.cpp',
'editing/SmartReplaceICU.cpp',
+ 'editing/SpellChecker.cpp',
+ 'editing/SpellChecker.h',
'editing/SplitElementCommand.cpp',
'editing/SplitElementCommand.h',
'editing/SplitTextNodeCommand.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 7e97904..01bea1e 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -831,6 +831,7 @@ SOURCES += \
editing/SelectionController.cpp \
editing/SetNodeAttributeCommand.cpp \
editing/SmartReplaceICU.cpp \
+ editing/SpellChecker.cpp \
editing/SplitElementCommand.cpp \
editing/SplitTextNodeCommand.cpp \
editing/SplitTextNodeContainingElementCommand.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 348242d..a1bdc33 100755
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
@@ -49270,6 +49271,62 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\editing\SpellChecker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_LTCG|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\editing\SpellChecker.h"
+ >
+ </File>
+ <File
RelativePath="..\editing\SplitElementCommand.cpp"
>
<FileConfiguration
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index b4d6aa0..e6d0cd0 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -3112,6 +3112,8 @@
A77979280D6B9E64003851B9 /* JSImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A77979240D6B9E64003851B9 /* JSImageData.cpp */; };
A77979290D6B9E64003851B9 /* JSImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = A77979250D6B9E64003851B9 /* JSImageData.h */; };
A784941B0B5FE507001E237A /* Clipboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A784941A0B5FE507001E237A /* Clipboard.cpp */; };
+ A78FE13B12366B1000ACE8D0 /* SpellChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A78FE13912366B1000ACE8D0 /* SpellChecker.cpp */; };
+ A78FE13C12366B1000ACE8D0 /* SpellChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = A78FE13A12366B1000ACE8D0 /* SpellChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
A795463E0B5C4C80007B438F /* DragDataMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A795463D0B5C4C80007B438F /* DragDataMac.mm */; };
A79546430B5C4CB4007B438F /* DragData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A79546420B5C4CB4007B438F /* DragData.cpp */; };
A7AA66D611C5ED6A001D8C8C /* RenderIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7AA66D411C5ED6A001D8C8C /* RenderIndicator.cpp */; };
@@ -9439,6 +9441,8 @@
A77979240D6B9E64003851B9 /* JSImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSImageData.cpp; sourceTree = "<group>"; };
A77979250D6B9E64003851B9 /* JSImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSImageData.h; sourceTree = "<group>"; };
A784941A0B5FE507001E237A /* Clipboard.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Clipboard.cpp; sourceTree = "<group>"; };
+ A78FE13912366B1000ACE8D0 /* SpellChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpellChecker.cpp; sourceTree = "<group>"; };
+ A78FE13A12366B1000ACE8D0 /* SpellChecker.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = SpellChecker.h; sourceTree = "<group>"; };
A795463D0B5C4C80007B438F /* DragDataMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DragDataMac.mm; sourceTree = "<group>"; };
A79546420B5C4CB4007B438F /* DragData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DragData.cpp; sourceTree = "<group>"; };
A7AA66D411C5ED6A001D8C8C /* RenderIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderIndicator.cpp; sourceTree = "<group>"; };
@@ -15104,6 +15108,8 @@
4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */,
4B6FA6F20C39E48C00087011 /* SmartReplace.h */,
4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */,
+ A78FE13912366B1000ACE8D0 /* SpellChecker.cpp */,
+ A78FE13A12366B1000ACE8D0 /* SpellChecker.h */,
93309DC2099E64910056E581 /* SplitElementCommand.cpp */,
93309DC3099E64910056E581 /* SplitElementCommand.h */,
93309DC4099E64910056E581 /* SplitTextNodeCommand.cpp */,
@@ -21584,6 +21590,7 @@
75415AFD12958D5E003AD669 /* SpeechInputEvent.h in Headers */,
7578F92011E4E32800D933C5 /* SpeechInputListener.h in Headers */,
75415B0012958D5E003AD669 /* SpeechInputResultList.h in Headers */,
+ A78FE13C12366B1000ACE8D0 /* SpellChecker.h in Headers */,
93309E12099E64920056E581 /* SplitElementCommand.h in Headers */,
93309E14099E64920056E581 /* SplitTextNodeCommand.h in Headers */,
93309E16099E64920056E581 /* SplitTextNodeContainingElementCommand.h in Headers */,
@@ -24350,6 +24357,7 @@
75415C28129A9920003AD669 /* SpeechInputEvent.cpp in Sources */,
758978EC127090D60076D5A9 /* SpeechInputResult.cpp in Sources */,
75415C29129A9920003AD669 /* SpeechInputResultList.cpp in Sources */,
+ A78FE13B12366B1000ACE8D0 /* SpellChecker.cpp in Sources */,
93309E11099E64920056E581 /* SplitElementCommand.cpp in Sources */,
93309E13099E64920056E581 /* SplitTextNodeCommand.cpp in Sources */,
93309E15099E64920056E581 /* SplitTextNodeContainingElementCommand.cpp in Sources */,
diff --git a/WebCore/dom/DocumentMarkerController.cpp b/WebCore/dom/DocumentMarkerController.cpp
index 3b7abcc..5f88631 100644
--- a/WebCore/dom/DocumentMarkerController.cpp
+++ b/WebCore/dom/DocumentMarkerController.cpp
@@ -567,4 +567,31 @@ bool DocumentMarkerController::hasMarkers(Range* range, DocumentMarker::MarkerTy
return false;
}
+#ifndef NDEBUG
+void DocumentMarkerController::showMarkers() const
+{
+ fprintf(stderr, "%d nodes have markers:\n", m_markers.size());
+ MarkerMap::const_iterator end = m_markers.end();
+ for (MarkerMap::const_iterator nodeIterator = m_markers.begin(); nodeIterator != end; ++nodeIterator) {
+ Node* node = nodeIterator->first.get();
+ fprintf(stderr, "%p", node);
+ MarkerMapVectorPair* vectorPair = nodeIterator->second;
+ Vector<DocumentMarker>& markers = vectorPair->first;
+ unsigned markerCount = markers.size();
+ for (unsigned markerIndex = 0; markerIndex < markerCount; ++markerIndex)
+ fprintf(stderr, " %d:[%d:%d](%d)", markers[markerIndex].type, markers[markerIndex].startOffset, markers[markerIndex].endOffset, markers[markerIndex].activeMatch);
+ fprintf(stderr, "\n");
+ }
+}
+#endif
+
} // namespace WebCore
+
+
+#ifndef NDEBUG
+void showDocumentMarkers(const WebCore::DocumentMarkerController* controller)
+{
+ if (controller)
+ controller->showMarkers();
+}
+#endif
diff --git a/WebCore/dom/DocumentMarkerController.h b/WebCore/dom/DocumentMarkerController.h
index 96fb7f3..83177fc 100644
--- a/WebCore/dom/DocumentMarkerController.h
+++ b/WebCore/dom/DocumentMarkerController.h
@@ -62,6 +62,10 @@ public:
Vector<DocumentMarker> markersForNode(Node*);
Vector<IntRect> renderedRectsForMarkers(DocumentMarker::MarkerType = DocumentMarker::AllMarkers);
+#ifndef NDEBUG
+ void showMarkers() const;
+#endif
+
private:
typedef std::pair<Vector<DocumentMarker>, Vector<IntRect> > MarkerMapVectorPair;
typedef HashMap<RefPtr<Node>, MarkerMapVectorPair*> MarkerMap;
@@ -71,4 +75,8 @@ private:
} // namespace WebCore
+#ifndef NDEBUG
+void showDocumentMarkers(const WebCore::DocumentMarkerController*);
+#endif
+
#endif // DocumentMarkerController_h
diff --git a/WebCore/dom/PositionIterator.cpp b/WebCore/dom/PositionIterator.cpp
index 767e705..5de9d9d 100644
--- a/WebCore/dom/PositionIterator.cpp
+++ b/WebCore/dom/PositionIterator.cpp
@@ -98,6 +98,13 @@ void PositionIterator::decrement()
}
}
+void PositionIterator::setOffsetInLeafNode(int offset)
+{
+ ASSERT(!m_anchorNode->hasChildNodes());
+ ASSERT(0 <= offset && offset <= lastOffsetForEditing(m_anchorNode));
+ m_offsetInAnchor = offset;
+}
+
bool PositionIterator::atStart() const
{
if (!m_anchorNode)
diff --git a/WebCore/dom/PositionIterator.h b/WebCore/dom/PositionIterator.h
index 7af8977..08329bb 100644
--- a/WebCore/dom/PositionIterator.h
+++ b/WebCore/dom/PositionIterator.h
@@ -56,6 +56,7 @@ public:
Node* node() const { return m_anchorNode; }
int offsetInLeafNode() const { return m_offsetInAnchor; }
+ void setOffsetInLeafNode(int offset);
bool atStart() const;
bool atEnd() const;
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index 2b22651..5b61f1c 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -67,9 +67,11 @@
#include "RemoveFormatCommand.h"
#include "RenderBlock.h"
#include "RenderPart.h"
+#include "RenderTextControl.h"
#include "ReplaceSelectionCommand.h"
#include "Settings.h"
#include "Sound.h"
+#include "SpellChecker.h"
#include "Text.h"
#include "TextEvent.h"
#include "TextIterator.h"
@@ -423,6 +425,10 @@ void Editor::replaceSelectionWithFragment(PassRefPtr<DocumentFragment> fragment,
applyCommand(ReplaceSelectionCommand::create(m_frame->document(), fragment, selectReplacement, smartReplace, matchStyle));
revealSelectionAfterEditingOperation();
+
+ Node* nodeToCheck = m_frame->selection()->rootEditableElement();
+ if (m_spellChecker->canCheckAsynchronously(nodeToCheck))
+ m_spellChecker->requestCheckingFor(nodeToCheck);
}
void Editor::replaceSelectionWithText(const String& text, bool selectReplacement, bool smartReplace)
@@ -1140,6 +1146,7 @@ Editor::Editor(Frame* frame)
// This is off by default, since most editors want this behavior (this matches IE but not FF).
, m_shouldStyleWithCSS(false)
, m_killRing(adoptPtr(new KillRing))
+ , m_spellChecker(new SpellChecker(frame, frame->page() ? frame->page()->editorClient() : 0))
, m_correctionPanelTimer(this, &Editor::correctionPanelTimerFired)
, m_areMarkedTextMatchesHighlighted(false)
{
@@ -3476,12 +3483,29 @@ void Editor::respondToChangedSelection(const VisibleSelection& oldSelection, boo
respondToChangedSelection(oldSelection);
}
+static Node* findFirstMarkable(Node* node)
+{
+ while (node) {
+ if (!node->renderer())
+ return 0;
+ if (node->renderer()->isText())
+ return node;
+ if (node->renderer()->isTextControl())
+ node = toRenderTextControl(node->renderer())->visiblePositionForIndex(1).deepEquivalent().node();
+ else if (node->firstChild())
+ node = node->firstChild();
+ else
+ node = node->nextSibling();
+ }
+
+ return 0;
+}
+
bool Editor::selectionStartHasSpellingMarkerFor(int from, int length) const
{
- Node* node = m_frame->selection()->start().node();
- if (!node || !node->renderer())
+ Node* node = findFirstMarkable(m_frame->selection()->start().node());
+ if (!node)
return false;
- ASSERT(node->renderer()->isText());
unsigned int startOffset = static_cast<unsigned int>(from);
unsigned int endOffset = static_cast<unsigned int>(from + length);
diff --git a/WebCore/editing/Editor.h b/WebCore/editing/Editor.h
index 0e4f2ba..581a279 100644
--- a/WebCore/editing/Editor.h
+++ b/WebCore/editing/Editor.h
@@ -55,6 +55,7 @@ class HitTestResult;
class KillRing;
class Pasteboard;
class SimpleFontData;
+class SpellChecker;
class Text;
class TextEvent;
@@ -300,6 +301,7 @@ public:
VisibleSelection selectionForCommand(Event*);
KillRing* killRing() const { return m_killRing.get(); }
+ SpellChecker* spellChecker() const { return m_spellChecker.get(); }
EditingBehavior behavior() const;
@@ -385,6 +387,7 @@ private:
bool m_shouldStyleWithCSS;
OwnPtr<KillRing> m_killRing;
CorrectionPanelInfo m_correctionPanelInfo;
+ OwnPtr<SpellChecker> m_spellChecker;
Timer<Editor> m_correctionPanelTimer;
bool m_correctionPanelIsDismissedByEditor;
VisibleSelection m_mark;
diff --git a/WebCore/editing/SpellChecker.cpp b/WebCore/editing/SpellChecker.cpp
new file mode 100644
index 0000000..1807474
--- /dev/null
+++ b/WebCore/editing/SpellChecker.cpp
@@ -0,0 +1,176 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "SpellChecker.h"
+
+#include "Document.h"
+#include "DocumentMarkerController.h"
+#include "EditorClient.h"
+#include "Frame.h"
+#include "HTMLInputElement.h"
+#include "HTMLTextAreaElement.h"
+#include "Node.h"
+#include "PositionIterator.h"
+#include "Range.h"
+#include "RenderObject.h"
+#include "Settings.h"
+#include "TextIterator.h"
+#include "htmlediting.h"
+
+namespace WebCore {
+
+SpellChecker::SpellChecker(Frame* frame, EditorClient* client)
+ : m_frame(frame)
+ , m_client(client)
+ , m_requestSequence(0)
+{
+}
+
+SpellChecker::~SpellChecker()
+{
+}
+
+bool SpellChecker::initRequest(Node* node)
+{
+ ASSERT(canCheckAsynchronously(node));
+
+ String text = node->textContent();
+ if (!text.length())
+ return false;
+
+ m_requestNode = node;
+ m_requestText = text;
+ m_requestSequence++;
+
+ return true;
+}
+
+void SpellChecker::clearRequest()
+{
+ m_requestNode.clear();
+ m_requestText = String();
+}
+
+bool SpellChecker::isAsynchronousEnabled() const
+{
+ return m_frame->settings() && m_frame->settings()->asynchronousSpellCheckingEnabled();
+}
+
+bool SpellChecker::canCheckAsynchronously(Node* node) const
+{
+ return isCheckable(node) && isAsynchronousEnabled() && !isBusy();
+}
+
+bool SpellChecker::isBusy() const
+{
+ return m_requestNode.get();
+}
+
+bool SpellChecker::isValid(int sequence) const
+{
+ return m_requestNode.get() && m_requestText.length() && m_requestSequence == sequence;
+}
+
+bool SpellChecker::isCheckable(Node* node) const
+{
+ return node && node->renderer();
+}
+
+void SpellChecker::requestCheckingFor(Node* node)
+{
+ ASSERT(canCheckAsynchronously(node));
+
+ if (!initRequest(node))
+ return;
+ m_client->requestCheckingOfString(this, m_requestSequence, m_requestText);
+}
+
+static bool forwardIterator(PositionIterator& iterator, int distance)
+{
+ int remaining = distance;
+ while (!iterator.atEnd()) {
+ if (iterator.node()->isCharacterDataNode()) {
+ int length = lastOffsetForEditing(iterator.node());
+ int last = length - iterator.offsetInLeafNode();
+ if (remaining < last) {
+ iterator.setOffsetInLeafNode(iterator.offsetInLeafNode() + remaining);
+ return true;
+ }
+
+ remaining -= last;
+ iterator.setOffsetInLeafNode(iterator.offsetInLeafNode() + last);
+ }
+
+ iterator.increment();
+ }
+
+ return false;
+}
+
+void SpellChecker::didCheck(int sequence, const Vector<SpellCheckingResult>& results)
+{
+ if (!isValid(sequence))
+ return;
+
+ if (!m_requestNode->renderer()) {
+ clearRequest();
+ return;
+ }
+
+ int startOffset = 0;
+ PositionIterator start = Position(m_requestNode, 0);
+ for (size_t i = 0; i < results.size(); ++i) {
+ if (results[i].type() != DocumentMarker::Spelling && results[i].type() != DocumentMarker::Grammar)
+ continue;
+
+ // To avoid moving the position backward, we assume the given results are sorted with
+ // startOffset as the ones returned by [NSSpellChecker requestCheckingOfString:].
+ ASSERT(startOffset <= results[i].location());
+ if (!forwardIterator(start, results[i].location() - startOffset))
+ break;
+ PositionIterator end = start;
+ if (!forwardIterator(end, results[i].length()))
+ break;
+
+ // Users or JavaScript applications may change text while a spell-checker checks its
+ // spellings in the background. To avoid adding markers to the words modified by users or
+ // JavaScript applications, retrieve the words in the specified region and compare them with
+ // the original ones.
+ RefPtr<Range> range = Range::create(m_requestNode->document(), start, end);
+ // FIXME: Use textContent() compatible string conversion.
+ String destination = range->text();
+ String source = m_requestText.substring(results[i].location(), results[i].length());
+ if (destination == source)
+ m_requestNode->document()->markers()->addMarker(range.get(), results[i].type());
+
+ startOffset = results[i].location();
+ }
+
+ clearRequest();
+}
+
+
+} // namespace WebCore
diff --git a/WebCore/editing/SpellChecker.h b/WebCore/editing/SpellChecker.h
new file mode 100644
index 0000000..6922f0e
--- /dev/null
+++ b/WebCore/editing/SpellChecker.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SpellChecker_h
+#define SpellChecker_h
+
+#include "Document.h"
+#include <wtf/Noncopyable.h>
+
+namespace WebCore {
+
+class EditorClient;
+class Frame;
+
+class SpellCheckingResult {
+public:
+ explicit SpellCheckingResult(DocumentMarker::MarkerType type = DocumentMarker::Spelling, int location = 0, int length = 0)
+ : m_type(type)
+ , m_location(location)
+ , m_length(length)
+ {
+ }
+
+ DocumentMarker::MarkerType type() const { return m_type; }
+ int location() const { return m_location; }
+ int length() const { return m_length; }
+
+private:
+ DocumentMarker::MarkerType m_type;
+ int m_location;
+ int m_length;
+};
+
+class SpellChecker : public Noncopyable {
+public:
+ explicit SpellChecker(Frame*, EditorClient*);
+ ~SpellChecker();
+
+ bool isAsynchronousEnabled() const;
+ bool canCheckAsynchronously(Node*) const;
+ bool isBusy() const;
+ bool isValid(int sequence) const;
+ bool isCheckable(Node*) const;
+ void requestCheckingFor(Node*);
+ void didCheck(int sequence, const Vector<SpellCheckingResult>&);
+
+private:
+ bool initRequest(Node*);
+ void clearRequest();
+
+ Frame* m_frame;
+ EditorClient* m_client;
+
+ RefPtr<Node> m_requestNode;
+ String m_requestText;
+ int m_requestSequence;
+};
+
+} // namespace WebCore
+
+#endif // SpellChecker_h
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index d3884f5..b0f18fa 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -491,8 +491,7 @@ public:
virtual void getGuessesForWord(const String&, const String&, Vector<String>&) { }
virtual void willSetInputMethodState() { }
virtual void setInputMethodState(bool) { }
-
-
+ virtual void requestCheckingOfString(SpellChecker*, int, const String&) { }
};
#if ENABLE(CONTEXT_MENUS)
diff --git a/WebCore/page/EditorClient.h b/WebCore/page/EditorClient.h
index 64d19a4..1ec0c7e 100644
--- a/WebCore/page/EditorClient.h
+++ b/WebCore/page/EditorClient.h
@@ -66,6 +66,7 @@ class HTMLElement;
class KeyboardEvent;
class Node;
class Range;
+class SpellChecker;
class VisibleSelection;
class VisiblePosition;
@@ -203,6 +204,7 @@ public:
virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses) = 0;
virtual void willSetInputMethodState() = 0;
virtual void setInputMethodState(bool enabled) = 0;
+ virtual void requestCheckingOfString(SpellChecker*, int, const String&) = 0;
};
}
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 7dc103b..fc18224 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -164,6 +164,7 @@ Settings::Settings(Page* page)
#if ENABLE(FULLSCREEN_API)
, m_fullScreenAPIEnabled(false)
#endif
+ , m_asynchronousSpellCheckingEnabled(false)
, m_memoryInfoEnabled(false)
, m_interactiveFormValidation(false)
, m_usePreHTML5ParserQuirks(false)
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 04b126a..f4630de 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -331,6 +331,9 @@ namespace WebCore {
bool fullScreenEnabled() const { return m_fullScreenAPIEnabled; }
#endif
+ void setAsynchronousSpellCheckingEnabled(bool flag) { m_asynchronousSpellCheckingEnabled = flag; }
+ bool asynchronousSpellCheckingEnabled() const { return m_asynchronousSpellCheckingEnabled; }
+
void setMemoryInfoEnabled(bool flag) { m_memoryInfoEnabled = flag; }
bool memoryInfoEnabled() const { return m_memoryInfoEnabled; }
@@ -438,6 +441,7 @@ namespace WebCore {
#if ENABLE(FULLSCREEN_API)
bool m_fullScreenAPIEnabled : 1;
#endif
+ bool m_asynchronousSpellCheckingEnabled: 1;
bool m_memoryInfoEnabled: 1;
bool m_interactiveFormValidation: 1;
bool m_usePreHTML5ParserQuirks: 1;
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 5ffbfbb..27e695e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-10 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/chromium/src/EditorClientImpl.h b/WebKit/chromium/src/EditorClientImpl.h
index a194399..9dbd6af 100644
--- a/WebKit/chromium/src/EditorClientImpl.h
+++ b/WebKit/chromium/src/EditorClientImpl.h
@@ -111,6 +111,7 @@ public:
WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
// Shows the form autofill popup for |node| if it is an HTMLInputElement and
// it is empty. This is called when you press the up or down arrow in a
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 827cfbc..91c9327 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-09 Alex Bredariol Grilo <abgrilo at profusion.mobi>
Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/WebCoreSupport/EditorClientEfl.h b/WebKit/efl/WebCoreSupport/EditorClientEfl.h
index b108ab6..e25b1e6 100644
--- a/WebKit/efl/WebCoreSupport/EditorClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/EditorClientEfl.h
@@ -113,6 +113,7 @@ public:
virtual void getGuessesForWord(const String& word, const String& context, WTF::Vector<String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
private:
Evas_Object *m_view;
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index d996b3e..67ccc9f 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-12 Xan Lopez <xlopez at igalia.com>
Rubber-stamped by Martin Robinson.
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 22543c6..f2db1d9 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -132,6 +132,7 @@ namespace WebKit {
virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
private:
WebKitWebView* m_webView;
diff --git a/WebKit/haiku/ChangeLog b/WebKit/haiku/ChangeLog
index 65a83f9..0c689bc 100644
--- a/WebKit/haiku/ChangeLog
+++ b/WebKit/haiku/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-01 Jia Pu <jpu at apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
index cfde51c..ca270e9 100644
--- a/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
+++ b/WebKit/haiku/WebCoreSupport/EditorClientHaiku.h
@@ -110,6 +110,7 @@ namespace WebCore {
virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(SpellChecker*, int, const String&) {}
bool isEditing() const;
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 5f936a4..0da82a6 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,35 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-09 Anders Carlsson <andersca at apple.com>
Fix a bug uncovered by clang++.
@@ -2272,6 +2304,32 @@
2010-09-08 MORITA Hajime <morrita at google.com>
+ Reviewed by Ojan Vafai.
+
+ spellcheck does not check pasted text
+ https://bugs.webkit.org/show_bug.cgi?id=40092
+
+ Implemented async spell-check APIs on WebEditorClient.
+ The implementations are using [NSSpellChecker requestCheckingOfString]
+ which is available only on Mac OS 10.6 or later.
+
+ Note that [NSSpellChecker requestCheckingOfString] could invoke
+ the callback block on on of their worker thread, so we need to
+ return the result to the main thread where WebCore is running.
+ For that purpose, we made WebEditorSpellCheckResponder class.
+
+ Test: editing/spelling/spellcheck-pasted-text-001.html
+
+ * WebCoreSupport/WebEditorClient.h:
+ * WebCoreSupport/WebEditorClient.mm:
+ (WebEditorClient::isAsynchronousSpellCheckingEnabled): Added.
+ (-[WebEditorSpellCheckResponder initWithSender:WebCore::sequence:results:]): Added.
+ (-[WebEditorSpellCheckResponder perform]): Added.
+ (WebEditorClient::requestCheckingOfString): Added.
+ * WebView/WebFramePrivate.h:
+
+2010-09-08 MORITA Hajime <morrita at google.com>
+
Reviewed by Tony Chang.
spelling underline gets lost on backspace
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.h b/WebKit/mac/WebCoreSupport/WebEditorClient.h
index 8b6e3f9..8a54ca9 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.h
@@ -132,6 +132,7 @@ public:
virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&);
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, const WTF::Vector<WTF::String>& alternativeReplacementStrings, WebCore::Editor*);
virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel);
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index 455aa9a..d3b38de 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -63,6 +63,7 @@
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/PlatformKeyboardEvent.h>
#import <WebCore/PlatformString.h>
+#import <WebCore/SpellChecker.h>
#import <WebCore/UserTypingGestureIndicator.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <runtime/InitializeThreading.h>
@@ -990,3 +991,73 @@ void WebEditorClient::willSetInputMethodState()
void WebEditorClient::setInputMethodState(bool)
{
}
+
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ at interface WebEditorSpellCheckResponder : NSObject
+{
+ WebCore::SpellChecker* _sender;
+ int _sequence;
+ RetainPtr<NSArray> _results;
+}
+- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence results:(NSArray*)results;
+- (void)perform;
+- (WTF::Vector<WebCore::SpellCheckingResult>) _coreResults;
+ at end
+
+ at implementation WebEditorSpellCheckResponder
+- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence results:(NSArray*)results
+{
+ self = [super init];
+ if (!self)
+ return nil;
+ _sender = sender;
+ _sequence = sequence;
+ _results = results;
+ return self;
+}
+
+- (void)perform
+{
+ _sender->didCheck(_sequence, [self _coreResults]);
+}
+
+static SpellCheckingResult toCoreSpellingResult(NSTextCheckingResult* result)
+{
+ NSTextCheckingType type = [result resultType];
+ NSRange range = [result range];
+ DocumentMarker::MarkerType coreType;
+ if (type & NSTextCheckingTypeSpelling)
+ coreType = DocumentMarker::Spelling;
+ else if (type & NSTextCheckingTypeGrammar)
+ coreType = DocumentMarker::Grammar;
+ else
+ coreType = DocumentMarker::AllMarkers;
+
+ return SpellCheckingResult(coreType, range.location, range.length);
+}
+
+- (WTF::Vector<WebCore::SpellCheckingResult>)_coreResults
+{
+ WTF::Vector<WebCore::SpellCheckingResult> coreResults;
+ coreResults.reserveCapacity([_results.get() count]);
+ for (NSTextCheckingResult* result in _results.get())
+ coreResults.append(toCoreSpellingResult(result));
+ return coreResults;
+}
+
+ at end
+#endif
+
+void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker* sender, int sequence, const String& text)
+{
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ NSRange range = NSMakeRange(0, text.length());
+ NSRunLoop* currentLoop = [NSRunLoop currentRunLoop];
+ [[NSSpellChecker sharedSpellChecker] requestCheckingOfString:text range:range types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0
+ completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) {
+ [currentLoop performSelector:@selector(perform)
+ target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence results:results] autorelease]
+ argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]];
+ }];
+#endif
+}
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 5c6b530..93f83fc 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -99,6 +99,7 @@
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
#define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled"
+#define WebKitAsynchronousSpellCheckingEnabledPreferenceKey @"WebKitAsynchronousSpellCheckingEnabled"
#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
#define WebKitHyperlinkAuditingEnabledPreferenceKey @"WebKitHyperlinkAuditingEnabled"
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index e084425..3817d4a 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -367,6 +367,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitSpatialNavigationEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitAsynchronousSpellCheckingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitHyperlinkAuditingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitUsePreHTML5ParserQuirksKey,
@@ -1393,6 +1394,16 @@ static NSString *classIBCreatorID = nil;
return [self _boolValueForKey:WebKitFullScreenEnabledPreferenceKey];
}
+- (void)setAsynchronousSpellCheckingEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitAsynchronousSpellCheckingEnabledPreferenceKey];
+}
+
+- (BOOL)asynchronousSpellCheckingEnabled
+{
+ return [self _boolValueForKey:WebKitAsynchronousSpellCheckingEnabledPreferenceKey];
+}
+
+ (void)setWebKitLinkTimeVersion:(int)version
{
setWebKitLinkTimeVersion(version);
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 2ee07d7..89b6288 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -221,6 +221,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (void)setFullScreenEnabled:(BOOL)flag;
- (BOOL)fullScreenEnabled;
+- (void)setAsynchronousSpellCheckingEnabled:(BOOL)flag;
+- (BOOL)asynchronousSpellCheckingEnabled;
+
- (void)setUsePreHTML5ParserQuirks:(BOOL)flag;
- (BOOL)usePreHTML5ParserQuirks;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 527b563..ee62f61 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1505,6 +1505,10 @@ static bool fastDocumentTeardownEnabled()
#if ENABLE(FULLSCREEN_API)
settings->setFullScreenEnabled([preferences fullScreenEnabled]);
#endif
+#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
+ // Asynchronous spell checking API is available for 10.6 or later.
+ settings->setAsynchronousSpellCheckingEnabled([preferences asynchronousSpellCheckingEnabled]);
+#endif
settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
settings->setHyperlinkAuditingEnabled([preferences hyperlinkAuditingEnabled]);
settings->setUsePreHTML5ParserQuirks([self _needsPreHTML5ParserQuirks]);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index fef2d75..ed8201f 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-11 Yi Shen <yi.4.shen at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.h b/WebKit/qt/WebCoreSupport/EditorClientQt.h
index defa8bb..1e410e6 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.h
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.h
@@ -107,6 +107,7 @@ public:
virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(SpellChecker*, int, const String&) {}
bool isEditing() const;
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index c2a111e..d4ceb67 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-10 Chris Fleizach <cfleizach at apple.com>
Reviewed by Darin Adler.
diff --git a/WebKit/win/WebCoreSupport/WebEditorClient.h b/WebKit/win/WebCoreSupport/WebEditorClient.h
index f0b78ba..358a365 100644
--- a/WebKit/win/WebCoreSupport/WebEditorClient.h
+++ b/WebKit/win/WebCoreSupport/WebEditorClient.h
@@ -111,6 +111,7 @@ public:
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
private:
WebView* m_webView;
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index 31f5543..741e527 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-07 Martin Robinson <mrobinson at igalia.com>
Unreviewed, rolling out r73392.
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
index fd3dd10..8db8c16 100644
--- a/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.h
@@ -100,6 +100,7 @@ public:
virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
private:
WebView* m_webView;
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index ae7f240..975468a 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-07 Martin Robinson <mrobinson at igalia.com>
Unreviewed, rolling out r73392.
diff --git a/WebKit/wx/WebKitSupport/EditorClientWx.h b/WebKit/wx/WebKitSupport/EditorClientWx.h
index 35a95ab..7dbee31 100644
--- a/WebKit/wx/WebKitSupport/EditorClientWx.h
+++ b/WebKit/wx/WebKitSupport/EditorClientWx.h
@@ -112,6 +112,7 @@ public:
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
private:
Page* m_page;
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2370c8c..758a7fe 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-28 MORITA Hajime <morrita at 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-12-12 Brian Weinstein <bweinstein at apple.com>
Reviewed by Tim Hatcher.
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
index 9fa9b00..563e248 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
@@ -410,4 +410,9 @@ void WebEditorClient::setInputMethodState(bool)
notImplemented();
}
+void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&)
+{
+ notImplemented();
+}
+
} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h b/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
index ccdaf43..1e340dd 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
+++ b/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h
@@ -133,6 +133,7 @@ private:
virtual void getGuessesForWord(const String& word, const String& context, Vector<String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&);
#if PLATFORM(MAC) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings, WebCore::Editor*);
virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 20df9be..62f30ae 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,35 @@
+2010-10-28 MORITA Hajime <morrita at 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):
+
2010-12-12 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index 5bbd3f6..2270160 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -1518,6 +1518,16 @@ static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSO
return JSValueMakeUndefined(context);
}
+static JSValueRef setAsynchronousSpellCheckingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setAsynchronousSpellCheckingEnabled(JSValueToBoolean(context, arguments[0]));
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -2035,6 +2045,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setJavaScriptCanAccessClipboard", setJavaScriptCanAccessClipboardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "setAsynchronousSpellCheckingEnabled", setAsynchronousSpellCheckingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "testRepaint", testRepaintCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index e39c939..21d6add 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -271,6 +271,7 @@ public:
bool geolocationPermission() const { return m_geolocationPermission; }
void setDeveloperExtrasEnabled(bool);
+ void setAsynchronousSpellCheckingEnabled(bool);
void showWebInspector();
void closeWebInspector();
void setTimelineProfilingEnabled(bool enabled);
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index d252c63..e3af738 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -170,6 +170,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect);
bindMethod("setWindowIsKey", &LayoutTestController::setWindowIsKey);
bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled);
+ bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
@@ -623,6 +624,11 @@ void LayoutTestController::setAlwaysAcceptCookies(const CppArgumentList& argumen
result->setNull();
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(const CppArgumentList&, CppVariant*)
+{
+ // FIXME: Implement this.
+}
+
void LayoutTestController::showWebInspector(const CppArgumentList&, CppVariant* result)
{
m_shell->showDevTools();
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index 03affa3..13d1447 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -152,6 +152,9 @@ public:
// Changes the cookie policy from the default to allow all cookies.
void setAlwaysAcceptCookies(const CppArgumentList&, CppVariant*);
+ // Changes asynchronous spellchecking flag on the settings.
+ void setAsynchronousSpellCheckingEnabled(const CppArgumentList&, CppVariant*);
+
// Shows DevTools window.
void showWebInspector(const CppArgumentList&, CppVariant*);
void closeWebInspector(const CppArgumentList&, CppVariant*);
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 7380d75..33a3727 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -732,6 +732,11 @@ void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)
g_object_set(webSettings, "enable-developer-extras", enabled, NULL);
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+{
+ // FIXME: Implement this.
+}
+
void LayoutTestController::showWebInspector()
{
WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index c08aee5..5cf60ef 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -461,6 +461,7 @@ static void resetDefaultsToConsistentValues()
[preferences setAcceleratedCompositingEnabled:YES];
[preferences setWebGLEnabled:NO];
[preferences setUsePreHTML5ParserQuirks:NO];
+ [preferences setAsynchronousSpellCheckingEnabled:NO];
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain];
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index 5df941d..b0be44f 100644
--- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -746,6 +746,11 @@ void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)
[[[mainFrame webView] preferences] setDeveloperExtrasEnabled:enabled];
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool enabled)
+{
+ [[[mainFrame webView] preferences] setAsynchronousSpellCheckingEnabled:enabled];
+}
+
void LayoutTestController::showWebInspector()
{
[[[mainFrame webView] inspector] show:nil];
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 2d00c3e..b8cc9be 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -384,6 +384,11 @@ void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)
m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enabled);
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+{
+ // FIXME: Implement this.
+}
+
void LayoutTestController::showWebInspector()
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 5fddef1..0048a7e 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -140,6 +140,7 @@ public slots:
QString decodeHostName(const QString& host);
void dumpSelectionRect() const {}
void setDeveloperExtrasEnabled(bool);
+ void setAsynchronousSpellCheckingEnabled(bool);
void showWebInspector();
void closeWebInspector();
void evaluateInWebInspector(long callId, const QString& script);
diff --git a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index edb0517..2c4a52d 100644
--- a/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -1174,6 +1174,11 @@ void LayoutTestController::setDeveloperExtrasEnabled(bool enabled)
prefsPrivate->setDeveloperExtrasEnabled(enabled);
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+{
+ // FIXME: Implement this.
+}
+
void LayoutTestController::showWebInspector()
{
COMPtr<IWebView> webView;
diff --git a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
index 714a4c4..32b5f7e 100644
--- a/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
+++ b/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
@@ -534,6 +534,11 @@ JSRetainPtr<JSStringRef> LayoutTestController::pageSizeAndMarginsInPixels(int pa
return 0;
}
+void LayoutTestController::setAsynchronousSpellCheckingEnabled(bool)
+{
+ // FIXME: Implement this.
+}
+
bool LayoutTestController::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
{
// FIXME: Implement
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list