Changeset 107176 in webkit
- Timestamp:
- Feb 8, 2012 9:23:21 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r107020 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Reviewed by Kent Tamura. 7 8 * Source/autotools/symbols.filter: Added an exporting symbol. 9 1 10 2012-02-07 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 11 -
trunk/LayoutTests/ChangeLog
r107162 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Reviewed by Kent Tamura. 7 8 * editing/spelling/spelling-marker-description-expected.txt: Added. 9 * editing/spelling/spelling-marker-description.html: Added. 10 * platform/gtk/Skipped: 11 * platform/mac/Skipped: 12 * platform/qt/Skipped: 13 * platform/win/Skipped: 14 1 15 2012-02-08 Igor Oliveira <igor.o@sisa.samsung.com> 2 16 -
trunk/LayoutTests/platform/gtk/Skipped
r107077 r107176 124 124 editing/undo/undo-smart-delete-reversed-selection.html 125 125 editing/selection/directionality-after-undo-replace.html 126 127 # EditorClient::checkTextOfParagraph() is not implemented 128 editing/spelling/spelling-marker-description.html 126 129 127 130 # https://bugs.webkit.org/show_bug.cgi?id=64530 -
trunk/LayoutTests/platform/mac/Skipped
r106632 r107176 343 343 editing/pasteboard/data-transfer-items-drag-drop-string.html 344 344 345 # Replacement text for misspelling is not given from NSSpellChecker. 346 # https://bugs.webkit.org/show_bug.cgi?id=77934 347 editing/spelling/spelling-marker-description.html 348 345 349 # Custom MIME type support in DataTransfer is not yet implemented. 346 350 editing/pasteboard/clipboard-customData.html -
trunk/LayoutTests/platform/qt/Skipped
r107104 r107176 737 737 editing/spelling/spellcheck-sequencenum.html 738 738 editing/spelling/spellcheck-async-mutation.html 739 # EditorClient::checkTextOfParagraph() is not implemented 740 editing/spelling/spelling-marker-description.html 739 741 740 742 # [Qt][GTK] editing/spelling/spellcheck-async.html fails -
trunk/LayoutTests/platform/win/Skipped
r106632 r107176 1058 1058 # EditorClient::requestCheckingOfString() is not implemented 1059 1059 editing/spelling/spellcheck-paste.html 1060 # Replacement text for misspelling is not given. 1061 # https://bugs.webkit.org/show_bug.cgi?id=77934 1062 editing/spelling/spelling-marker-description.html 1060 1063 1061 1064 # IndexedDB is not yet enabled. -
trunk/Source/WebCore/ChangeLog
r107175 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Reviewed by Kent Tamura. 7 8 On spellchecking, TextCheckingResult can contain a replacement text 9 which is usable both for an automatic replacement and for showing a suggestion. 10 11 But when marking a misspelled word ragarding to returned 12 TextCheckingResult, Editor uses only the misspelled range data and 13 discards the replacement value. Then it asks the same value again 14 when showing suggestion/autocorrection. 15 16 It would be great if the marker holds the replacement text 17 and Editor can use it on suggesting a correction, without any re-request. 18 This is especially true in the case when it needs IPC messaging for spellchecking: 19 We can save one round-trip by this technique. 20 21 Here is actual change: 22 23 - Passed the replacement text to addMarker() for for misspelling markers. 24 Note that this is done only for the unified checker path because legacy 25 TextCheckerClient API doesn't provide such a replacement. 26 - Added an Internals API to retrieve a description text on a marker. 27 28 Test: editing/spelling/spelling-marker-description.html 29 30 * WebCore.exp.in: 31 * editing/Editor.cpp: 32 (WebCore::Editor::markAndReplaceFor): 33 * testing/Internals.cpp: 34 (WebCore::Internals::markerAt): 35 (WebCore): 36 (WebCore::Internals::markerRangeForNode): 37 (WebCore::Internals::markerDescriptionForNode): 38 * testing/Internals.h: 39 (WebCore): 40 (Internals): 41 * testing/Internals.idl: 42 1 43 2012-02-08 Eric Seidel <eric@webkit.org> 2 44 -
trunk/Source/WebCore/WebCore.exp.in
r106977 r107176 1247 1247 __ZNK7WebCore14DocumentLoader28urlForHistoryReflectsFailureEv 1248 1248 __ZNK7WebCore14DocumentLoader3urlEv 1249 __ZNK7WebCore14DocumentMarker11descriptionEv 1249 1250 __ZNK7WebCore14FrameSelection11currentFormEv 1250 1251 __ZNK7WebCore14FrameSelection15copyTypingStyleEv -
trunk/Source/WebCore/editing/Editor.cpp
r106884 r107176 2091 2091 if (!m_spellingCorrector->isSpellingMarkerAllowed(misspellingRange)) 2092 2092 continue; 2093 misspellingRange->startContainer()->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling );2093 misspellingRange->startContainer()->document()->markers()->addMarker(misspellingRange.get(), DocumentMarker::Spelling, result->replacement); 2094 2094 } else if (shouldMarkGrammar && result->type == TextCheckingTypeGrammar && paragraph.checkingRangeCovers(resultLocation, resultLength)) { 2095 2095 ASSERT(resultLength > 0 && resultLocation >= 0); -
trunk/Source/WebCore/testing/Internals.cpp
r106839 r107176 282 282 } 283 283 284 PassRefPtr<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)284 DocumentMarker* Internals::markerAt(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) 285 285 { 286 286 if (!node) { … … 298 298 if (markers.size() <= index) 299 299 return 0; 300 return Range::create(node->document(), node, markers[index]->startOffset(), node, markers[index]->endOffset()); 300 return markers[index]; 301 } 302 303 PassRefPtr<Range> Internals::markerRangeForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) 304 { 305 DocumentMarker* marker = markerAt(node, markerType, index, ec); 306 if (!marker) 307 return 0; 308 return Range::create(node->document(), node, marker->startOffset(), node, marker->endOffset()); 309 } 310 311 String Internals::markerDescriptionForNode(Node* node, const String& markerType, unsigned index, ExceptionCode& ec) 312 { 313 DocumentMarker* marker = markerAt(node, markerType, index, ec); 314 if (!marker) 315 return String(); 316 return marker->description(); 301 317 } 302 318 -
trunk/Source/WebCore/testing/Internals.h
r106839 r107176 37 37 class ClientRect; 38 38 class Document; 39 class DocumentMarker; 39 40 class Element; 40 41 class InternalSettings; … … 80 81 81 82 unsigned markerCountForNode(Node*, const String&, ExceptionCode&); 82 PassRefPtr<Range> markerRangeForNode(Node*, const String&, unsigned, ExceptionCode&); 83 PassRefPtr<Range> markerRangeForNode(Node*, const String& markerType, unsigned index, ExceptionCode&); 84 String markerDescriptionForNode(Node*, const String& markerType, unsigned index, ExceptionCode&); 83 85 84 86 void setScrollViewPosition(Document*, long x, long y, ExceptionCode&); … … 114 116 private: 115 117 explicit Internals(Document*); 118 DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionCode&); 116 119 117 120 RefPtr<InternalSettings> m_settings; -
trunk/Source/WebCore/testing/Internals.idl
r106839 r107176 54 54 unsigned long markerCountForNode(in Node node, in DOMString markerType) raises(DOMException); 55 55 Range markerRangeForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException); 56 DOMString markerDescriptionForNode(in Node node, in DOMString markerType, in unsigned long index) raises(DOMException); 56 57 57 58 void setScrollViewPosition(in Document document, in long x, in long y) raises(DOMException); -
trunk/Source/WebKit/chromium/ChangeLog
r107174 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 didFinishCheckingText() accidentally dropped the description text 7 given from the backend. Fixed to copy it on the API-to-Core 8 convertion. The test won't work without this fix. 9 10 Reviewed by Kent Tamura. 11 12 * src/WebTextCheckingCompletionImpl.cpp: 13 (WebKit::toCoreResults): 14 1 15 2012-02-08 Dmitry Lomov <dslomov@chromium.org> 2 16 -
trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
r102044 r107176 42 42 namespace WebKit { 43 43 44 static TextCheckingType toCoreCheckingType(WebTextCheckingResult::Error error)45 {46 if (error == WebTextCheckingResult::ErrorSpelling)47 return TextCheckingTypeSpelling;48 ASSERT(error == WebTextCheckingResult::ErrorGrammar);49 return TextCheckingTypeGrammar;50 }51 52 44 static Vector<TextCheckingResult> toCoreResults(const WebVector<WebTextCheckingResult>& results) 53 45 { 54 46 Vector<TextCheckingResult> coreResults; 55 for (size_t i = 0; i < results.size(); ++i) { 56 TextCheckingResult coreResult; 57 coreResult.type = toCoreCheckingType(results[i].error); 58 coreResult.location = results[i].position; 59 coreResult.length = results[i].length; 60 coreResults.append(coreResult); 61 } 62 47 for (size_t i = 0; i < results.size(); ++i) 48 coreResults.append(results[i]); 63 49 return coreResults; 64 50 } -
trunk/Source/WebKit/win/ChangeLog
r106592 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Reviewed by Kent Tamura. 7 8 * WebKit.vcproj/WebKit_Cairo.def: 9 * WebKit.vcproj/WebKit_Cairo_debug.def: 10 1 11 2012-02-02 Jon Lee <jonlee@apple.com> 2 12 -
trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo.def
r92078 r107176 111 111 ??0ClientRect@WebCore@@AAE@XZ 112 112 ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z 113 ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ 113 114 ?fastMalloc@WTF@@YAPAXI@Z 114 115 ?fastZeroedMalloc@WTF@@YAPAXI@Z -
trunk/Source/WebKit/win/WebKit.vcproj/WebKit_Cairo_debug.def
r92078 r107176 111 111 ??0ClientRect@WebCore@@AAE@XZ 112 112 ?absoluteBoundingBoxRect@RenderObject@WebCore@@QAE?AVIntRect@2@_N@Z 113 ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ 113 114 ?fastMalloc@WTF@@YAPAXI@Z 114 115 ?fastZeroedMalloc@WTF@@YAPAXI@Z -
trunk/Source/WebKit2/ChangeLog
r107168 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Reviewed by Kent Tamura. 7 8 * win/WebKit2.def: 9 * win/WebKit2CFLite.def: 10 1 11 2012-02-08 Anders Carlsson <andersca@apple.com> 2 12 -
trunk/Source/WebKit2/win/WebKit2.def
r106907 r107176 147 147 ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z 148 148 ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ 149 ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ 149 150 ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z 150 151 ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBE@Z -
trunk/Source/WebKit2/win/WebKit2CFLite.def
r106907 r107176 141 141 ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z 142 142 ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ 143 ?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ 143 144 ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBD@Z 144 145 ?add@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBE@Z -
trunk/Source/autotools/symbols.filter
r106907 r107176 84 84 _ZNK7WebCore8Document4viewEv; 85 85 _ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE; 86 _ZNK7WebCore14DocumentMarker11descriptionEv; 86 87 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE; 87 88 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb; -
trunk/Tools/ChangeLog
r107171 r107176 1 2012-02-07 MORITA Hajime <morrita@google.com> 2 3 Replacement text should be available from the marker. 4 https://bugs.webkit.org/show_bug.cgi?id=77934 5 6 Made the mock requestCheckingOfText() implementation to return 7 a replacement text for each misspelled word if available. 8 9 Reviewed by Kent Tamura. 10 11 * DumpRenderTree/chromium/WebViewHost.cpp: 12 (WebViewHost::finishLastTextCheck): 13 1 14 2012-02-08 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> 2 15 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r106371 r107176 472 472 if (!misspelledLength) 473 473 break; 474 results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength)); 474 Vector<WebString> suggestions; 475 m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions); 476 results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength, 477 suggestions.isEmpty() ? WebString() : suggestions[0])); 475 478 text = text.substring(misspelledPosition + misspelledLength); 476 479 offset += misspelledPosition + misspelledLength;
Note: See TracChangeset
for help on using the changeset viewer.