| Index: Source/core/editing/SpellCheckRequester.cpp
|
| diff --git a/Source/core/editing/SpellCheckRequester.cpp b/Source/core/editing/SpellCheckRequester.cpp
|
| index 4d34b8c7950049fc21dc33e748006c59f23ddc50..ad4509b9f538ced41b24c4a47dbaa7d6d862effe 100644
|
| --- a/Source/core/editing/SpellCheckRequester.cpp
|
| +++ b/Source/core/editing/SpellCheckRequester.cpp
|
| @@ -46,14 +46,12 @@ SpellCheckRequest::SpellCheckRequest(
|
| TextCheckingTypeMask mask,
|
| TextCheckingProcessType processType,
|
| const Vector<uint32_t>& documentMarkersInRange,
|
| - const Vector<unsigned>& documentMarkerOffsets,
|
| - int requestNumber)
|
| + const Vector<unsigned>& documentMarkerOffsets)
|
| : m_requester(0)
|
| , m_checkingRange(checkingRange)
|
| , m_paragraphRange(paragraphRange)
|
| , m_rootEditableElement(m_checkingRange->startContainer()->rootEditableElement())
|
| , m_requestData(unrequestedTextCheckingSequence, text, mask, processType, documentMarkersInRange, documentMarkerOffsets)
|
| - , m_requestNumber(requestNumber)
|
| {
|
| }
|
|
|
| @@ -62,7 +60,7 @@ SpellCheckRequest::~SpellCheckRequest()
|
| }
|
|
|
| // static
|
| -PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask textCheckingOptions, TextCheckingProcessType processType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange, int requestNubmer)
|
| +PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask textCheckingOptions, TextCheckingProcessType processType, PassRefPtr<Range> checkingRange, PassRefPtr<Range> paragraphRange)
|
| {
|
| ASSERT(checkingRange);
|
| ASSERT(paragraphRange);
|
| @@ -79,7 +77,7 @@ PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask tex
|
| offsets[i] = markers[i]->startOffset();
|
| }
|
|
|
| - return adoptRef(new SpellCheckRequest(checkingRange, paragraphRange, text, textCheckingOptions, processType, hashes, offsets, requestNubmer));
|
| + return adoptRef(new SpellCheckRequest(checkingRange, paragraphRange, text, textCheckingOptions, processType, hashes, offsets));
|
| }
|
|
|
| const TextCheckingRequestData& SpellCheckRequest::data() const
|
| @@ -209,24 +207,13 @@ void SpellCheckRequester::invokeRequest(PassRefPtr<SpellCheckRequest> request)
|
| void SpellCheckRequester::enqueueRequest(PassRefPtr<SpellCheckRequest> request)
|
| {
|
| ASSERT(request);
|
| - bool continuation = false;
|
| - if (!m_requestQueue.isEmpty()) {
|
| - RefPtr<SpellCheckRequest> lastRequest = m_requestQueue.last();
|
| - // It's a continuation if the number of the last request got incremented in the new one and
|
| - // both apply to the same editable.
|
| - continuation = request->rootEditableElement() == lastRequest->rootEditableElement()
|
| - && request->requestNumber() == lastRequest->requestNumber() + 1;
|
| - }
|
|
|
| - // Spellcheck requests for chunks of text in the same element should not overwrite each other.
|
| - if (!continuation) {
|
| - for (RequestQueue::iterator it = m_requestQueue.begin(); it != m_requestQueue.end(); ++it) {
|
| - if (request->rootEditableElement() != (*it)->rootEditableElement())
|
| - continue;
|
| + for (RequestQueue::iterator it = m_requestQueue.begin(); it != m_requestQueue.end(); ++it) {
|
| + if (request->rootEditableElement() != (*it)->rootEditableElement())
|
| + continue;
|
|
|
| - *it = request;
|
| - return;
|
| - }
|
| + *it = request;
|
| + return;
|
| }
|
|
|
| m_requestQueue.append(request);
|
|
|