From: morrita@google.com Date: Thu, 9 Feb 2012 05:23:21 +0000 (+0000) Subject: Replacement text should be available from the marker. X-Git-Tag: 070512121124~13373 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe85222808be32403acbe52282badd7c06d9745b;p=profile%2Fivi%2Fwebkit-efl.git Replacement text should be available from the marker. https://bugs.webkit.org/show_bug.cgi?id=77934 .: Reviewed by Kent Tamura. * Source/autotools/symbols.filter: Added an exporting symbol. Source/WebCore: Reviewed by Kent Tamura. On spellchecking, TextCheckingResult can contain a replacement text which is usable both for an automatic replacement and for showing a suggestion. But when marking a misspelled word ragarding to returned TextCheckingResult, Editor uses only the misspelled range data and discards the replacement value. Then it asks the same value again when showing suggestion/autocorrection. It would be great if the marker holds the replacement text and Editor can use it on suggesting a correction, without any re-request. This is especially true in the case when it needs IPC messaging for spellchecking: We can save one round-trip by this technique. Here is actual change: - Passed the replacement text to addMarker() for for misspelling markers. Note that this is done only for the unified checker path because legacy TextCheckerClient API doesn't provide such a replacement. - Added an Internals API to retrieve a description text on a marker. Test: editing/spelling/spelling-marker-description.html * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::markAndReplaceFor): * testing/Internals.cpp: (WebCore::Internals::markerAt): (WebCore): (WebCore::Internals::markerRangeForNode): (WebCore::Internals::markerDescriptionForNode): * testing/Internals.h: (WebCore): (Internals): * testing/Internals.idl: Source/WebKit/chromium: didFinishCheckingText() accidentally dropped the description text given from the backend. Fixed to copy it on the API-to-Core convertion. The test won't work without this fix. Reviewed by Kent Tamura. * src/WebTextCheckingCompletionImpl.cpp: (WebKit::toCoreResults): Source/WebKit/win: Reviewed by Kent Tamura. * WebKit.vcproj/WebKit_Cairo.def: * WebKit.vcproj/WebKit_Cairo_debug.def: Source/WebKit2: Reviewed by Kent Tamura. * win/WebKit2.def: * win/WebKit2CFLite.def: Tools: Made the mock requestCheckingOfText() implementation to return a replacement text for each misspelled word if available. Reviewed by Kent Tamura. * DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::finishLastTextCheck): LayoutTests: Reviewed by Kent Tamura. * editing/spelling/spelling-marker-description-expected.txt: Added. * editing/spelling/spelling-marker-description.html: Added. * platform/gtk/Skipped: * platform/mac/Skipped: * platform/qt/Skipped: * platform/win/Skipped: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107176 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/ChangeLog b/ChangeLog index 28ee8fa..73a12ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Reviewed by Kent Tamura. + + * Source/autotools/symbols.filter: Added an exporting symbol. + 2012-02-07 Gyuyoung Kim [CMAKE] Use *bin* and *lib* directories for executable and libraries. diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 830bcb4..36ce104 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,17 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Reviewed by Kent Tamura. + + * editing/spelling/spelling-marker-description-expected.txt: Added. + * editing/spelling/spelling-marker-description.html: Added. + * platform/gtk/Skipped: + * platform/mac/Skipped: + * platform/qt/Skipped: + * platform/win/Skipped: + 2012-02-08 Igor Oliveira Implement reverse animation direction diff --git a/LayoutTests/editing/spelling/spelling-marker-description-expected.txt b/LayoutTests/editing/spelling/spelling-marker-description-expected.txt new file mode 100644 index 0000000..770b4c9 --- /dev/null +++ b/LayoutTests/editing/spelling/spelling-marker-description-expected.txt @@ -0,0 +1,11 @@ +The spellchecker should store replacement text in each marker. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS markedText is "wellcome" +PASS markerDescription is "welcome" +PASS successfullyParsed is true + +TEST COMPLETE +wellcome. diff --git a/LayoutTests/editing/spelling/spelling-marker-description.html b/LayoutTests/editing/spelling/spelling-marker-description.html new file mode 100644 index 0000000..8164511 --- /dev/null +++ b/LayoutTests/editing/spelling/spelling-marker-description.html @@ -0,0 +1,68 @@ + + + + + + +
+
+
+ + + + + diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped index 1d5bfaf..dce8de4 100644 --- a/LayoutTests/platform/gtk/Skipped +++ b/LayoutTests/platform/gtk/Skipped @@ -124,6 +124,9 @@ editing/pasteboard/paste-text-008.html editing/undo/undo-smart-delete-reversed-selection.html editing/selection/directionality-after-undo-replace.html +# EditorClient::checkTextOfParagraph() is not implemented +editing/spelling/spelling-marker-description.html + # https://bugs.webkit.org/show_bug.cgi?id=64530 editing/selection/editable-html-element.html diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped index 9865730..22da73e 100644 --- a/LayoutTests/platform/mac/Skipped +++ b/LayoutTests/platform/mac/Skipped @@ -342,6 +342,10 @@ editing/pasteboard/data-transfer-items-image-png.html editing/pasteboard/data-transfer-items-drag-drop-file.html editing/pasteboard/data-transfer-items-drag-drop-string.html +# Replacement text for misspelling is not given from NSSpellChecker. +# https://bugs.webkit.org/show_bug.cgi?id=77934 +editing/spelling/spelling-marker-description.html + # Custom MIME type support in DataTransfer is not yet implemented. editing/pasteboard/clipboard-customData.html fast/events/drag-customData.html diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped index d8ae7a2..12ce674 100644 --- a/LayoutTests/platform/qt/Skipped +++ b/LayoutTests/platform/qt/Skipped @@ -736,6 +736,8 @@ editing/spelling/spellcheck-paste.html editing/spelling/spellcheck-queue.html editing/spelling/spellcheck-sequencenum.html editing/spelling/spellcheck-async-mutation.html +# EditorClient::checkTextOfParagraph() is not implemented +editing/spelling/spelling-marker-description.html # [Qt][GTK] editing/spelling/spellcheck-async.html fails # https://bugs.webkit.org/show_bug.cgi?id=73003 diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped index fd1000a..254c313 100644 --- a/LayoutTests/platform/win/Skipped +++ b/LayoutTests/platform/win/Skipped @@ -1057,6 +1057,9 @@ editing/spelling/markers.html # EditorClient::requestCheckingOfString() is not implemented editing/spelling/spellcheck-paste.html +# Replacement text for misspelling is not given. +# https://bugs.webkit.org/show_bug.cgi?id=77934 +editing/spelling/spelling-marker-description.html # IndexedDB is not yet enabled. storage/indexeddb diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 51c5a79..33f8368 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,45 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Reviewed by Kent Tamura. + + On spellchecking, TextCheckingResult can contain a replacement text + which is usable both for an automatic replacement and for showing a suggestion. + + But when marking a misspelled word ragarding to returned + TextCheckingResult, Editor uses only the misspelled range data and + discards the replacement value. Then it asks the same value again + when showing suggestion/autocorrection. + + It would be great if the marker holds the replacement text + and Editor can use it on suggesting a correction, without any re-request. + This is especially true in the case when it needs IPC messaging for spellchecking: + We can save one round-trip by this technique. + + Here is actual change: + + - Passed the replacement text to addMarker() for for misspelling markers. + Note that this is done only for the unified checker path because legacy + TextCheckerClient API doesn't provide such a replacement. + - Added an Internals API to retrieve a description text on a marker. + + Test: editing/spelling/spelling-marker-description.html + + * WebCore.exp.in: + * editing/Editor.cpp: + (WebCore::Editor::markAndReplaceFor): + * testing/Internals.cpp: + (WebCore::Internals::markerAt): + (WebCore): + (WebCore::Internals::markerRangeForNode): + (WebCore::Internals::markerDescriptionForNode): + * testing/Internals.h: + (WebCore): + (Internals): + * testing/Internals.idl: + 2012-02-08 Eric Seidel Remove more cruft now that HTMLIsIndexElement is gone diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in index ec27aec..d839c53 100644 --- a/Source/WebCore/WebCore.exp.in +++ b/Source/WebCore/WebCore.exp.in @@ -1246,6 +1246,7 @@ __ZNK7WebCore14DocumentLoader19originalRequestCopyEv __ZNK7WebCore14DocumentLoader21isLoadingMainResourceEv __ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv __ZNK7WebCore14DocumentLoader3urlEv +__ZNK7WebCore14DocumentMarker11descriptionEv __ZNK7WebCore14FrameSelection11currentFormEv __ZNK7WebCore14FrameSelection15copyTypingStyleEv __ZNK7WebCore14FrameSelection17isInPasswordFieldEv diff --git a/Source/WebCore/editing/Editor.cpp b/Source/WebCore/editing/Editor.cpp index 7fe95f7..97b1533 100644 --- a/Source/WebCore/editing/Editor.cpp +++ b/Source/WebCore/editing/Editor.cpp @@ -2090,7 +2090,7 @@ void Editor::markAndReplaceFor(PassRefPtr request, const Vect RefPtr misspellingRange = paragraph.subrange(resultLocation, resultLength); if (!m_spellingCorrector->isSpellingMarkerAllowed(misspellingRange)) continue; - misspellingRange->startContainer()->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling); + misspellingRange->startContainer()->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling, result->replacement); } else if (shouldMarkGrammar && result->type == TextCheckingTypeGrammar && paragraph.checkingRangeCovers(resultLocation, resultLength)) { ASSERT(resultLength > 0 && resultLocation >= 0); for (unsigned j = 0; j < result->details.size(); j++) { diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp index 1212f8d..06e34cd 100644 --- a/Source/WebCore/testing/Internals.cpp +++ b/Source/WebCore/testing/Internals.cpp @@ -281,7 +281,7 @@ unsigned Internals::markerCountForNode(Node* node, const String& markerType, Exc return node->document()->markers()->markersFor(node, markerTypes).size(); } -PassRefPtr Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) +DocumentMarker* Internals::markerAt(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) { if (!node) { ec = INVALID_ACCESS_ERR; @@ -297,7 +297,23 @@ PassRefPtr Internals::markerRangeForNode(Node* node, const String& marker Vector markers = node->document()->markers()->markersFor(node, markerTypes); if (markers.size() <= index) return 0; - return Range::create(node->document(), node, markers[index]->startOffset(), node, markers[index]->endOffset()); + return markers[index]; +} + +PassRefPtr Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) +{ + DocumentMarker* marker = markerAt(node, markerType, index, ec); + if (!marker) + return 0; + return Range::create(node->document(), node, marker->startOffset(), node, marker->endOffset()); +} + +String Internals::markerDescriptionForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) +{ + DocumentMarker* marker = markerAt(node, markerType, index, ec); + if (!marker) + return String(); + return marker->description(); } void Internals::setScrollViewPosition(Document* document, long x, long y, ExceptionCode& ec) diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h index 58d75d6..439dc75 100644 --- a/Source/WebCore/testing/Internals.h +++ b/Source/WebCore/testing/Internals.h @@ -36,6 +36,7 @@ namespace WebCore { class ClientRect; class Document; +class DocumentMarker; class Element; class InternalSettings; class Node; @@ -79,7 +80,8 @@ public: PassRefPtr boundingBox(Element*, ExceptionCode&); unsigned markerCountForNode(Node*, const String&, ExceptionCode&); - PassRefPtr markerRangeForNode(Node*, const String&, unsigned, ExceptionCode&); + PassRefPtr markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionCode&); + String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionCode&); void setScrollViewPosition(Document*, long x, long y, ExceptionCode&); @@ -113,6 +115,7 @@ public: private: explicit Internals(Document*); + DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionCode&); RefPtr m_settings; }; diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl index 54f3d55..9bf0575 100644 --- a/Source/WebCore/testing/Internals.idl +++ b/Source/WebCore/testing/Internals.idl @@ -53,6 +53,7 @@ module window { ClientRect boundingBox(in Element element) raises(DOMException); unsigned long markerCountForNode(in Node node, in DOMString markerType) raises(DOMException); Range markerRangeForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException); + DOMString markerDescriptionForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException); void setScrollViewPosition(in Document document, in long x, in long y) raises(DOMException); diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog index bb46cb3..a764b88 100644 --- a/Source/WebKit/chromium/ChangeLog +++ b/Source/WebKit/chromium/ChangeLog @@ -1,3 +1,17 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + didFinishCheckingText() accidentally dropped the description text + given from the backend. Fixed to copy it on the API-to-Core + convertion. The test won't work without this fix. + + Reviewed by Kent Tamura. + + * src/WebTextCheckingCompletionImpl.cpp: + (WebKit::toCoreResults): + 2012-02-08 Dmitry Lomov [V8][Chromium] Race between worker accessing WebDatabase and frame closing down. diff --git a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp index 0f59a93..0d6e4db 100644 --- a/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp +++ b/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp @@ -41,25 +41,11 @@ using namespace WebCore; namespace WebKit { -static TextCheckingType toCoreCheckingType(WebTextCheckingResult::Error error) -{ - if (error == WebTextCheckingResult::ErrorSpelling) - return TextCheckingTypeSpelling; - ASSERT(error == WebTextCheckingResult::ErrorGrammar); - return TextCheckingTypeGrammar; -} - static Vector toCoreResults(const WebVector& results) { Vector coreResults; - for (size_t i = 0; i < results.size(); ++i) { - TextCheckingResult coreResult; - coreResult.type = toCoreCheckingType(results[i].error); - coreResult.location = results[i].position; - coreResult.length = results[i].length; - coreResults.append(coreResult); - } - + for (size_t i = 0; i < results.size(); ++i) + coreResults.append(results[i]); return coreResults; } diff --git a/Source/WebKit/win/ChangeLog b/Source/WebKit/win/ChangeLog index d3e463a..32db318 100644 --- a/Source/WebKit/win/ChangeLog +++ b/Source/WebKit/win/ChangeLog @@ -1,3 +1,13 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Reviewed by Kent Tamura. + + * WebKit.vcproj/WebKit_Cairo.def: + * WebKit.vcproj/WebKit_Cairo_debug.def: + 2012-02-02 Jon Lee Clear shown notifications when context is no longer active diff --git a/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def b/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def index 8d35281..89b0a2a 100644 --- a/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def +++ b/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def @@ -110,6 +110,7 @@ EXPORTS ??0ClientRect@WebCore@@AAE@ABVIntRect@1@@Z ??0ClientRect@WebCore@@AAE@XZ ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z + ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ ?fastMalloc@WTF@@YAPAXI@Z ?fastZeroedMalloc@WTF@@YAPAXI@Z ?fastFree@WTF@@YAXPAX@Z diff --git a/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def b/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def index 5522672..1b1b72d 100644 --- a/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def +++ b/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def @@ -110,6 +110,7 @@ EXPORTS ??0ClientRect@WebCore@@AAE@ABVIntRect@1@@Z ??0ClientRect@WebCore@@AAE@XZ ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z + ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ ?fastMalloc@WTF@@YAPAXI@Z ?fastZeroedMalloc@WTF@@YAPAXI@Z ?fastFree@WTF@@YAXPAX@Z diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index c0cd8e4..af850d1 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,13 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Reviewed by Kent Tamura. + + * win/WebKit2.def: + * win/WebKit2CFLite.def: + 2012-02-08 Anders Carlsson Don't use the wheel event handler count to track if a page has horizontal scrollbars diff --git a/Source/WebKit2/win/WebKit2.def b/Source/WebKit2/win/WebKit2.def index 54785c4..76830e0 100644 --- a/Source/WebKit2/win/WebKit2.def +++ b/Source/WebKit2/win/WebKit2.def @@ -146,6 +146,7 @@ EXPORTS ??0FrameDestructionObserver@WebCore@@QAE@PAVFrame@1@@Z ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ + ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBE@Z ?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z diff --git a/Source/WebKit2/win/WebKit2CFLite.def b/Source/WebKit2/win/WebKit2CFLite.def index fa5cbf7..3a927c2 100644 --- a/Source/WebKit2/win/WebKit2CFLite.def +++ b/Source/WebKit2/win/WebKit2CFLite.def @@ -140,6 +140,7 @@ EXPORTS ??0FrameDestructionObserver@WebCore@@QAE@PAVFrame@1@@Z ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ + ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBE@Z ?addSlowCase@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PAVStringImpl@2@@Z diff --git a/Source/autotools/symbols.filter b/Source/autotools/symbols.filter index 8ec7fd9..f0cdc1a 100644 --- a/Source/autotools/symbols.filter +++ b/Source/autotools/symbols.filter @@ -83,6 +83,7 @@ _ZNK7WebCore8Document4pageEv; _ZNK7WebCore8Document8settingsEv; _ZNK7WebCore8Document4viewEv; _ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE; +_ZNK7WebCore14DocumentMarker11descriptionEv; _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE; _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb; _ZN7WebCore8Settings24setMockScrollbarsEnabledEb; diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 2958533..cfd0c65 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,16 @@ +2012-02-07 MORITA Hajime + + Replacement text should be available from the marker. + https://bugs.webkit.org/show_bug.cgi?id=77934 + + Made the mock requestCheckingOfText() implementation to return + a replacement text for each misspelled word if available. + + Reviewed by Kent Tamura. + + * DumpRenderTree/chromium/WebViewHost.cpp: + (WebViewHost::finishLastTextCheck): + 2012-02-08 Jesus Sanchez-Palencia [Qt][DRT] DumpRenderTreeQt should support --no-timeout and --timeout options diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp index 32b20db..befa3b7 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp @@ -471,7 +471,10 @@ void WebViewHost::finishLastTextCheck() m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength); if (!misspelledLength) break; - results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength)); + Vector suggestions; + m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions); + results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength, + suggestions.isEmpty() ? WebString() : suggestions[0])); text = text.substring(misspelledPosition + misspelledLength); offset += misspelledPosition + misspelledLength; }