Diff
Modified: trunk/ChangeLog (107175 => 107176)
--- trunk/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,12 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
[CMAKE] Use *bin* and *lib* directories for executable and libraries.
Modified: trunk/LayoutTests/ChangeLog (107175 => 107176)
--- trunk/LayoutTests/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/LayoutTests/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,17 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
Implement reverse animation direction
Added: trunk/LayoutTests/editing/spelling/spelling-marker-description-expected.txt (0 => 107176)
--- trunk/LayoutTests/editing/spelling/spelling-marker-description-expected.txt (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-marker-description-expected.txt 2012-02-09 05:23:21 UTC (rev 107176)
@@ -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.
Property changes on: trunk/LayoutTests/editing/spelling/spelling-marker-description-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/editing/spelling/spelling-marker-description.html (0 => 107176)
--- trunk/LayoutTests/editing/spelling/spelling-marker-description.html (rev 0)
+++ trunk/LayoutTests/editing/spelling/spelling-marker-description.html 2012-02-09 05:23:21 UTC (rev 107176)
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<div id="container">
+ <div id="destination" contentEditable></div>
+</div>
+
+<script>
+
+function done()
+{
+ layoutTestController.setAsynchronousSpellCheckingEnabled(false);
+ internals.settings.setUnifiedTextCheckingEnabled(false);
+ finishJSTest()
+}
+
+function verify(nretry)
+{
+ if (!nretry) {
+ done();
+ return;
+ }
+
+ var texts = destination.childNodes;
+ for (var i = 0; i < texts.length; ++i) {
+ if (internals.markerCountForNode(texts[i], "spelling")) {
+ markedText = internals.markerRangeForNode(texts[i], "spelling", 0).toString();
+ markerDescription = internals.markerDescriptionForNode(texts[i], "spelling", 0);
+ break;
+ }
+ }
+
+ if (markedText) {
+ shouldBeEqualToString("markedText", "wellcome");
+ shouldBeEqualToString("markerDescription", "welcome");
+ done();
+ }
+
+ // Wait until the async spellchecking is done.
+ window.setTimeout(function() { verify(nretry - 1); }, 0);
+}
+
+function test()
+{
+ jsTestIsAsync = true;
+ internals.settings.setUnifiedTextCheckingEnabled(true);
+ layoutTestController.setAsynchronousSpellCheckingEnabled(true);
+
+ var sel = window.getSelection();
+ var destination = document.getElementById("destination");
+ destination.focus();
+ document.execCommand("InsertHTML", false, "wellcome");
+ document.execCommand("InsertText", false, ".");
+
+ window.setTimeout(function() { verify(10); }, 0);
+}
+
+description("The spellchecker should store replacement text in each marker.");
+if (window.internals)
+ test();
+
+</script>
+<script src=""
+</body>
+</html>
Property changes on: trunk/LayoutTests/editing/spelling/spelling-marker-description.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/LayoutTests/platform/gtk/Skipped (107175 => 107176)
--- trunk/LayoutTests/platform/gtk/Skipped 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/LayoutTests/platform/gtk/Skipped 2012-02-09 05:23:21 UTC (rev 107176)
@@ -124,6 +124,9 @@
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
Modified: trunk/LayoutTests/platform/mac/Skipped (107175 => 107176)
--- trunk/LayoutTests/platform/mac/Skipped 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/LayoutTests/platform/mac/Skipped 2012-02-09 05:23:21 UTC (rev 107176)
@@ -342,6 +342,10 @@
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
Modified: trunk/LayoutTests/platform/qt/Skipped (107175 => 107176)
--- trunk/LayoutTests/platform/qt/Skipped 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/LayoutTests/platform/qt/Skipped 2012-02-09 05:23:21 UTC (rev 107176)
@@ -736,6 +736,8 @@
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
Modified: trunk/LayoutTests/platform/win/Skipped (107175 => 107176)
--- trunk/LayoutTests/platform/win/Skipped 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/LayoutTests/platform/win/Skipped 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1057,6 +1057,9 @@
# 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
Modified: trunk/Source/WebCore/ChangeLog (107175 => 107176)
--- trunk/Source/WebCore/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,45 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
Remove more cruft now that HTMLIsIndexElement is gone
Modified: trunk/Source/WebCore/WebCore.exp.in (107175 => 107176)
--- trunk/Source/WebCore/WebCore.exp.in 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/WebCore.exp.in 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1246,6 +1246,7 @@
__ZNK7WebCore14DocumentLoader21isLoadingMainResourceEv
__ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv
__ZNK7WebCore14DocumentLoader3urlEv
+__ZNK7WebCore14DocumentMarker11descriptionEv
__ZNK7WebCore14FrameSelection11currentFormEv
__ZNK7WebCore14FrameSelection15copyTypingStyleEv
__ZNK7WebCore14FrameSelection17isInPasswordFieldEv
Modified: trunk/Source/WebCore/editing/Editor.cpp (107175 => 107176)
--- trunk/Source/WebCore/editing/Editor.cpp 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/editing/Editor.cpp 2012-02-09 05:23:21 UTC (rev 107176)
@@ -2090,7 +2090,7 @@
RefPtr<Range> 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++) {
Modified: trunk/Source/WebCore/testing/Internals.cpp (107175 => 107176)
--- trunk/Source/WebCore/testing/Internals.cpp 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/testing/Internals.cpp 2012-02-09 05:23:21 UTC (rev 107176)
@@ -281,7 +281,7 @@
return node->document()->markers()->markersFor(node, markerTypes).size();
}
-PassRefPtr<Range> 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,9 +297,25 @@
Vector<DocumentMarker*> 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<Range> 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)
{
if (!document || !document->view()) {
Modified: trunk/Source/WebCore/testing/Internals.h (107175 => 107176)
--- trunk/Source/WebCore/testing/Internals.h 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/testing/Internals.h 2012-02-09 05:23:21 UTC (rev 107176)
@@ -36,6 +36,7 @@
class ClientRect;
class Document;
+class DocumentMarker;
class Element;
class InternalSettings;
class Node;
@@ -79,7 +80,8 @@
PassRefPtr<ClientRect> boundingBox(Element*, ExceptionCode&);
unsigned markerCountForNode(Node*, const String&, ExceptionCode&);
- PassRefPtr<Range> markerRangeForNode(Node*, const String&, unsigned, ExceptionCode&);
+ PassRefPtr<Range> 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 @@
private:
explicit Internals(Document*);
+ DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionCode&);
RefPtr<InternalSettings> m_settings;
};
Modified: trunk/Source/WebCore/testing/Internals.idl (107175 => 107176)
--- trunk/Source/WebCore/testing/Internals.idl 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebCore/testing/Internals.idl 2012-02-09 05:23:21 UTC (rev 107176)
@@ -53,6 +53,7 @@
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);
Modified: trunk/Source/WebKit/chromium/ChangeLog (107175 => 107176)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,17 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
[V8][Chromium] Race between worker accessing WebDatabase and frame closing down.
Modified: trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp (107175 => 107176)
--- trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp 2012-02-09 05:23:21 UTC (rev 107176)
@@ -41,25 +41,11 @@
namespace WebKit {
-static TextCheckingType toCoreCheckingType(WebTextCheckingResult::Error error)
-{
- if (error == WebTextCheckingResult::ErrorSpelling)
- return TextCheckingTypeSpelling;
- ASSERT(error == WebTextCheckingResult::ErrorGrammar);
- return TextCheckingTypeGrammar;
-}
-
static Vector<TextCheckingResult> toCoreResults(const WebVector<WebTextCheckingResult>& results)
{
Vector<TextCheckingResult> 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;
}
Modified: trunk/Source/WebKit/win/ChangeLog (107175 => 107176)
--- trunk/Source/WebKit/win/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit/win/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,13 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
Clear shown notifications when context is no longer active
Modified: trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def (107175 => 107176)
--- trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def 2012-02-09 05:23:21 UTC (rev 107176)
@@ -110,6 +110,7 @@
??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
Modified: trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def (107175 => 107176)
--- trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def 2012-02-09 05:23:21 UTC (rev 107176)
@@ -110,6 +110,7 @@
??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
Modified: trunk/Source/WebKit2/ChangeLog (107175 => 107176)
--- trunk/Source/WebKit2/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit2/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,13 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
Don't use the wheel event handler count to track if a page has horizontal scrollbars
Modified: trunk/Source/WebKit2/win/WebKit2.def (107175 => 107176)
--- trunk/Source/WebKit2/win/WebKit2.def 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit2/win/WebKit2.def 2012-02-09 05:23:21 UTC (rev 107176)
@@ -146,6 +146,7 @@
??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
Modified: trunk/Source/WebKit2/win/WebKit2CFLite.def (107175 => 107176)
--- trunk/Source/WebKit2/win/WebKit2CFLite.def 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/WebKit2/win/WebKit2CFLite.def 2012-02-09 05:23:21 UTC (rev 107176)
@@ -140,6 +140,7 @@
??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
Modified: trunk/Source/autotools/symbols.filter (107175 => 107176)
--- trunk/Source/autotools/symbols.filter 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Source/autotools/symbols.filter 2012-02-09 05:23:21 UTC (rev 107176)
@@ -83,6 +83,7 @@
_ZNK7WebCore8Document8settingsEv;
_ZNK7WebCore8Document4viewEv;
_ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
+_ZNK7WebCore14DocumentMarker11descriptionEv;
_ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
_ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
_ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
Modified: trunk/Tools/ChangeLog (107175 => 107176)
--- trunk/Tools/ChangeLog 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Tools/ChangeLog 2012-02-09 05:23:21 UTC (rev 107176)
@@ -1,3 +1,16 @@
+2012-02-07 MORITA Hajime <[email protected]>
+
+ 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 <[email protected]>
[Qt][DRT] DumpRenderTreeQt should support --no-timeout and --timeout options
Modified: trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp (107175 => 107176)
--- trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-02-09 05:06:36 UTC (rev 107175)
+++ trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp 2012-02-09 05:23:21 UTC (rev 107176)
@@ -471,7 +471,10 @@
m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength);
if (!misspelledLength)
break;
- results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength));
+ Vector<WebString> 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;
}