| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 return; | 233 return; |
| 234 } | 234 } |
| 235 | 235 |
| 236 m_frame.spellChecker().markAndReplaceFor(m_processingRequest, results); | 236 m_frame.spellChecker().markAndReplaceFor(m_processingRequest, results); |
| 237 | 237 |
| 238 if (m_lastProcessedSequence < sequence) | 238 if (m_lastProcessedSequence < sequence) |
| 239 m_lastProcessedSequence = sequence; | 239 m_lastProcessedSequence = sequence; |
| 240 | 240 |
| 241 m_processingRequest.clear(); | 241 m_processingRequest.clear(); |
| 242 if (!m_requestQueue.isEmpty()) | 242 if (!m_requestQueue.isEmpty()) |
| 243 m_timerToProcessQueuedRequest.startOneShot(0); | 243 m_timerToProcessQueuedRequest.startOneShot(0, FROM_HERE); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void SpellCheckRequester::didCheckSucceed(int sequence, const Vector<TextCheckin
gResult>& results) | 246 void SpellCheckRequester::didCheckSucceed(int sequence, const Vector<TextCheckin
gResult>& results) |
| 247 { | 247 { |
| 248 TextCheckingRequestData requestData = m_processingRequest->data(); | 248 TextCheckingRequestData requestData = m_processingRequest->data(); |
| 249 if (requestData.sequence() == sequence) { | 249 if (requestData.sequence() == sequence) { |
| 250 DocumentMarker::MarkerTypes markers = DocumentMarker::SpellCheckClientMa
rkers(); | 250 DocumentMarker::MarkerTypes markers = DocumentMarker::SpellCheckClientMa
rkers(); |
| 251 if (!requestData.maskContains(TextCheckingTypeSpelling)) | 251 if (!requestData.maskContains(TextCheckingTypeSpelling)) |
| 252 markers.remove(DocumentMarker::Spelling); | 252 markers.remove(DocumentMarker::Spelling); |
| 253 if (!requestData.maskContains(TextCheckingTypeGrammar)) | 253 if (!requestData.maskContains(TextCheckingTypeGrammar)) |
| 254 markers.remove(DocumentMarker::Grammar); | 254 markers.remove(DocumentMarker::Grammar); |
| 255 m_frame.document()->markers().removeMarkers(m_processingRequest->checkin
gRange().get(), markers); | 255 m_frame.document()->markers().removeMarkers(m_processingRequest->checkin
gRange().get(), markers); |
| 256 } | 256 } |
| 257 didCheck(sequence, results); | 257 didCheck(sequence, results); |
| 258 } | 258 } |
| 259 | 259 |
| 260 void SpellCheckRequester::didCheckCancel(int sequence) | 260 void SpellCheckRequester::didCheckCancel(int sequence) |
| 261 { | 261 { |
| 262 Vector<TextCheckingResult> results; | 262 Vector<TextCheckingResult> results; |
| 263 didCheck(sequence, results); | 263 didCheck(sequence, results); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace WebCore | 266 } // namespace WebCore |
| OLD | NEW |