Changeset 102231 in webkit
- Timestamp:
- Dec 7, 2011 4:34:02 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r102229 r102231 1 2011-12-07 Shinya Kawanaka <shinyak@google.com> 2 3 Internals should have a method to reutrn the max sequence number of spellcheck reqeust. 4 https://bugs.webkit.org/show_bug.cgi?id=73511 5 6 Reviewed by Hajime Morita. 7 8 Added tests to check internals.lastSpellCheckRequestSequence and internals.lastSpellCheckProcessedSequence. 9 10 * editing/spelling/spellcheck-sequencenum-expected.txt: Added. 11 * editing/spelling/spellcheck-sequencenum.html: Added. 12 * platform/gtk/Skipped: 13 * platform/qt/Skipped: 14 1 15 2011-12-07 Vsevolod Vlasov <vsevik@chromium.org> 2 16 -
trunk/LayoutTests/platform/gtk/Skipped
r102226 r102231 1221 1221 editing/spelling/spellcheck-paste.html 1222 1222 editing/spelling/spellcheck-queue.html 1223 editing/spelling/spellcheck-sequencenum.html 1223 1224 1224 1225 # For https://bugs.webkit.org/show_bug.cgi?id=50758 -
trunk/LayoutTests/platform/qt/Skipped
r102226 r102231 1011 1011 editing/spelling/spellcheck-paste.html 1012 1012 editing/spelling/spellcheck-queue.html 1013 editing/spelling/spellcheck-sequencenum.html 1013 1014 1014 1015 # [Qt][GTK] editing/spelling/spellcheck-async.html fails -
trunk/Source/WebCore/ChangeLog
r102225 r102231 1 2011-12-07 Shinya Kawanaka <shinyak@google.com> 2 3 Internals should have a method to reutrn the max sequence number of spellcheck reqeust. 4 https://bugs.webkit.org/show_bug.cgi?id=73511 5 6 Reviewed by Hajime Morita. 7 8 Internal state of SpellChecker should be able to be exposed for testing SpellChecker. 9 This patch will enable us to know asynchronous spellcheck has finished or not. 10 11 Test: editing/spelling/spellcheck-sequencenum.html 12 13 * editing/SpellChecker.cpp: 14 (WebCore::SpellChecker::SpellChecker): 15 (WebCore::SpellChecker::createRequest): 16 (WebCore::SpellChecker::didCheck): 17 * editing/SpellChecker.h: 18 (WebCore::SpellChecker::lastRequestSequence): 19 Interface to take SpellCheck sequence numbers. 20 (WebCore::SpellChecker::lastProcessedSequence): ditto. 21 * testing/Internals.cpp: 22 (WebCore::spellchecker): 23 (WebCore::Internals::lastSpellCheckRequestSequence): 24 (WebCore::Internals::lastSpellCheckProcessedSequence): 25 * testing/Internals.h: 26 * testing/Internals.idl: 27 1 28 2011-12-07 Ryosuke Niwa <rniwa@webkit.org> 2 29 -
trunk/Source/WebCore/editing/SpellChecker.cpp
r101978 r102231 73 73 SpellChecker::SpellChecker(Frame* frame) 74 74 : m_frame(frame) 75 , m_lastRequestedSequence(0) 75 , m_lastRequestSequence(0) 76 , m_lastProcessedSequence(0) 76 77 , m_timerToProcessQueuedRequest(this, &SpellChecker::timerFiredToProcessQueuedRequest) 77 78 { … … 98 99 return PassRefPtr<SpellCheckRequest>(); 99 100 100 return adoptRef(new SpellCheckRequest(++m_lastRequest edSequence, range, text, mask));101 return adoptRef(new SpellCheckRequest(++m_lastRequestSequence, range, text, mask)); 101 102 } 102 103 … … 199 200 { 200 201 ASSERT(m_processingRequest); 201 202 202 ASSERT(m_processingRequest->sequence() == sequence); 203 203 if (m_processingRequest->sequence() != sequence) { … … 235 235 } 236 236 237 if (m_lastProcessedSequence < sequence) 238 m_lastProcessedSequence = sequence; 239 237 240 m_processingRequest.clear(); 238 241 if (!m_requestQueue.isEmpty()) -
trunk/Source/WebCore/editing/SpellChecker.h
r101978 r102231 54 54 void didCheck(int sequence, const Vector<TextCheckingResult>&); 55 55 56 int lastRequestSequence() const 57 { 58 return m_lastRequestSequence; 59 } 60 61 int lastProcessedSequence() const 62 { 63 return m_lastProcessedSequence; 64 } 65 56 66 private: 57 67 class SpellCheckRequest; … … 66 76 67 77 Frame* m_frame; 68 int m_lastRequestedSequence; 78 int m_lastRequestSequence; 79 int m_lastProcessedSequence; 69 80 70 81 Timer<SpellChecker> m_timerToProcessQueuedRequest; -
trunk/Source/WebCore/testing/Internals.cpp
r102088 r102231 49 49 #include "ShadowContentElement.h" 50 50 #include "ShadowRoot.h" 51 #include "SpellChecker.h" 51 52 #include "TextIterator.h" 52 53 … … 93 94 } 94 95 96 static SpellChecker* spellchecker(Document* document) 97 { 98 if (!document || !document->frame() || !document->frame()->editor()) 99 return 0; 100 101 return document->frame()->editor()->spellChecker(); 102 } 103 95 104 const char* Internals::internalsId = "internals"; 96 105 … … 619 628 } 620 629 621 } 630 int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionCode& ec) 631 { 632 SpellChecker* checker = spellchecker(document); 633 634 if (!checker) { 635 ec = INVALID_ACCESS_ERR; 636 return -1; 637 } 638 639 return checker->lastRequestSequence(); 640 } 641 642 int Internals::lastSpellCheckProcessedSequence(Document* document, ExceptionCode& ec) 643 { 644 SpellChecker* checker = spellchecker(document); 645 646 if (!checker) { 647 ec = INVALID_ACCESS_ERR; 648 return -1; 649 } 650 651 return checker->lastProcessedSequence(); 652 } 653 654 } -
trunk/Source/WebCore/testing/Internals.h
r102088 r102231 111 111 bool unifiedTextCheckingEnabled(Document*, ExceptionCode&); 112 112 113 int lastSpellCheckRequestSequence(Document*, ExceptionCode&); 114 int lastSpellCheckProcessedSequence(Document*, ExceptionCode&); 115 113 116 static const char* internalsId; 114 117 -
trunk/Source/WebCore/testing/Internals.idl
r102088 r102231 82 82 void setUnifiedTextCheckingEnabled(in Document document, in boolean enabled) raises (DOMException); 83 83 boolean unifiedTextCheckingEnabled(in Document document) raises (DOMException); 84 85 long lastSpellCheckRequestSequence(in Document document) raises (DOMException); 86 long lastSpellCheckProcessedSequence(in Document document) raises (DOMException); 84 87 }; 85 88 }
Note: See TracChangeset
for help on using the changeset viewer.