Changeset 114605 in webkit
- Timestamp:
- Apr 18, 2012 8:51:56 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r114603 r114605 1 2012-04-18 Hironori Bono <hbono@chromium.org> 2 3 Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() 4 https://bugs.webkit.org/show_bug.cgi?id=83748 5 6 Reviewed by Ryosuke Niwa. 7 8 The current SpellChecker::didCheck() does not delete existing markers. It causes 9 a problem that it leaves misspelled markers when a spellchecker client finishes 10 checking text successfully. This change splits this function to didCheckSucceeded() 11 and didCheckCanceled() so the SpellChecker class can delete existing markers 12 when its client finishes checking text successfully. (We do not have to erase 13 existing markers when the client needs to cancel a text-check request.) 14 15 * platform/chromium/editing/spelling/delete-misspelled-word-expected.txt: Added. 16 * platform/chromium/editing/spelling/delete-misspelled-word.html: Added. 17 1 18 2012-04-18 Raymond Toy <rtoy@google.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r114604 r114605 1 2012-04-18 Hironori Bono <hbono@chromium.org> 2 3 Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() 4 https://bugs.webkit.org/show_bug.cgi?id=83748 5 6 Reviewed by Ryosuke Niwa. 7 8 The current SpellChecker::didCheck() does not delete existing markers. It causes 9 a problem that it leaves misspelled markers when a spellchecker client finishes 10 checking text successfully. This change splits this function to didCheckSucceeded() 11 and didCheckCanceled() so the SpellChecker class can delete existing markers 12 when its client finishes checking text successfully. (We do not have to erase 13 existing markers when the client needs to cancel a text-check request.) 14 15 Test: platform/chromium/editing/spelling/delete-misspelled-word.html 16 17 * WebCore.exp.in: Replaced SpellChecker::didCheck with SpellChecker::didCheckSucceeded. 18 * editing/SpellChecker.cpp: 19 (WebCore::SpellChecker::didCheckSucceeded): Added. 20 (WebCore): 21 (WebCore::SpellChecker::didCheckCanceled): Added. 22 * editing/SpellChecker.h: 23 (SpellChecker): Added didCheckSucceeded and didCheckCanceled. Also changed didCheck to a private function. 24 1 25 2012-04-16 James Robinson <jamesr@chromium.org> 2 26 -
trunk/Source/WebCore/WebCore.exp.in
r114278 r114605 280 280 __ZN7WebCore12SharedBufferC1Ev 281 281 __ZN7WebCore12SharedBufferD1Ev 282 __ZN7WebCore12SpellChecker 8didCheckEiRKN3WTF6VectorINS_18TextCheckingResultELm0EEE282 __ZN7WebCore12SpellChecker17didCheckSucceededEiRKN3WTF6VectorINS_18TextCheckingResultELm0EEE 283 283 __ZN7WebCore12TextEncodingC1ERKN3WTF6StringE 284 284 __ZN7WebCore12TextIterator11rangeLengthEPKNS_5RangeEb -
trunk/Source/WebCore/editing/SpellChecker.cpp
r113127 r114605 189 189 } 190 190 191 void SpellChecker::didCheckSucceeded(int sequence, const Vector<TextCheckingResult>& results) 192 { 193 if (m_processingRequest->sequence() == sequence) { 194 unsigned markers = 0; 195 if (m_processingRequest->mask() & TextCheckingTypeSpelling) 196 markers |= DocumentMarker::Spelling; 197 if (m_processingRequest->mask() & TextCheckingTypeGrammar) 198 markers |= DocumentMarker::Grammar; 199 if (markers) 200 m_frame->document()->markers()->removeMarkers(m_processingRequest->checkingRange().get(), markers); 201 } 202 didCheck(sequence, results); 203 } 204 205 void SpellChecker::didCheckCanceled(int sequence) 206 { 207 Vector<TextCheckingResult> results; 208 didCheck(sequence, results); 209 } 191 210 192 211 } // namespace WebCore -
trunk/Source/WebCore/editing/SpellChecker.h
r108772 r114605 82 82 83 83 void requestCheckingFor(PassRefPtr<SpellCheckRequest>); 84 void didCheck(int sequence, const Vector<TextCheckingResult>&); 84 void didCheckSucceeded(int sequence, const Vector<TextCheckingResult>&); 85 void didCheckCanceled(int sequence); 85 86 86 87 int lastRequestSequence() const … … 102 103 void invokeRequest(PassRefPtr<SpellCheckRequest>); 103 104 void enqueueRequest(PassRefPtr<SpellCheckRequest>); 105 void didCheck(int sequence, const Vector<TextCheckingResult>&); 104 106 105 107 Frame* m_frame; -
trunk/Source/WebKit/chromium/ChangeLog
r114604 r114605 1 2012-04-18 Hironori Bono <hbono@chromium.org> 2 3 Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() 4 https://bugs.webkit.org/show_bug.cgi?id=83748 5 6 Reviewed by Ryosuke Niwa. 7 8 This change adds a new API WebTextCheckingCompletion::didCancelCheckingText(), 9 which encapsulates SpellChecker::didCheckCanceled() and implements it so 10 Chromium can use it. 11 12 * public/WebTextCheckingCompletion.h: 13 (WebKit::WebTextCheckingCompletion::didCancelCheckingText): 14 * src/WebTextCheckingCompletionImpl.cpp: 15 (WebKit::WebTextCheckingCompletionImpl::didFinishCheckingText): 16 (WebKit): 17 (WebKit::WebTextCheckingCompletionImpl::didCancelCheckingText): 18 * src/WebTextCheckingCompletionImpl.h: 19 (WebTextCheckingCompletionImpl): 20 1 21 2012-04-16 James Robinson <jamesr@chromium.org> 2 22 -
trunk/Source/WebKit/chromium/public/WebTextCheckingCompletion.h
r101122 r114605 43 43 public: 44 44 virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&) = 0; 45 virtual void didCancelCheckingText() { }; 45 46 protected: 46 47 ~WebTextCheckingCompletion() { } -
trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.cpp
r107176 r114605 52 52 void WebTextCheckingCompletionImpl::didFinishCheckingText(const WebVector<WebTextCheckingResult>& results) 53 53 { 54 m_spellChecker->didCheck(m_identifier, toCoreResults(results)); 54 m_spellChecker->didCheckSucceeded(m_identifier, toCoreResults(results)); 55 delete this; 56 } 57 58 void WebTextCheckingCompletionImpl::didCancelCheckingText() 59 { 60 m_spellChecker->didCheckCanceled(m_identifier); 55 61 delete this; 56 62 } -
trunk/Source/WebKit/chromium/src/WebTextCheckingCompletionImpl.h
r95901 r114605 48 48 49 49 virtual void didFinishCheckingText(const WebVector<WebTextCheckingResult>&); 50 virtual void didCancelCheckingText(); 50 51 51 52 private: -
trunk/Source/WebKit/mac/ChangeLog
r114567 r114605 1 2012-04-18 Hironori Bono <hbono@chromium.org> 2 3 Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() 4 https://bugs.webkit.org/show_bug.cgi?id=83748 5 6 Reviewed by Ryosuke Niwa. 7 8 This change replaces a call for SpellChecker::didCheck() with one for 9 SpellChecker::didCheckSucceeded() because didCheck has been split into 10 didCheckSucceeded(0 and didCheckCanceled(). 11 12 * WebCoreSupport/WebEditorClient.mm: 13 (-[WebEditorSpellCheckResponder perform]): Replaced didCheck with didCheckSucceeded. 14 1 15 2012-04-18 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
r113340 r114605 942 942 - (void)perform 943 943 { 944 _sender->didCheck (_sequence, core(_results.get(), _types));944 _sender->didCheckSucceeded(_sequence, core(_results.get(), _types)); 945 945 } 946 946 -
trunk/Tools/ChangeLog
r114602 r114605 1 2012-04-18 Hironori Bono <hbono@chromium.org> 2 3 Split SpellChecker::didCheck() to SpellChecker::didCheckSucceeded() and SpellChecker::didCheckCanceled() 4 https://bugs.webkit.org/show_bug.cgi?id=83748 5 6 Reviewed by Ryosuke Niwa. 7 8 This change replaces a call for SpellChecker::didCheck() with one for 9 SpellChecker::didCheckCenceled() because didCheck() has been split into 10 didCheckSucceeded() and didCheckCanceled(). 11 12 * DumpRenderTree/chromium/WebViewHost.cpp: 13 (WebViewHost::requestCheckingOfText): Replaced didCheck with didCheckCanceled. 14 1 15 2012-04-18 Dirk Pranke <dpranke@chromium.org> 2 16 -
trunk/Tools/DumpRenderTree/chromium/WebViewHost.cpp
r113799 r114605 456 456 if (text.isEmpty()) { 457 457 if (completion) 458 completion->did FinishCheckingText(Vector<WebTextCheckingResult>());458 completion->didCancelCheckingText(); 459 459 return; 460 460 }
Note: See TracChangeset
for help on using the changeset viewer.