Chromium Code Reviews| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 if (m_timerToProcessQueuedRequest.isActive() || m_processingRequest) { | 184 if (m_timerToProcessQueuedRequest.isActive() || m_processingRequest) { |
| 185 enqueueRequest(request); | 185 enqueueRequest(request); |
| 186 return; | 186 return; |
| 187 } | 187 } |
| 188 | 188 |
| 189 invokeRequest(request); | 189 invokeRequest(request); |
| 190 } | 190 } |
| 191 | 191 |
| 192 void SpellChecker::cancelCheck() | 192 void SpellChecker::cancelCheck() |
| 193 { | 193 { |
| 194 if (!m_requestQueue.isEmpty()) | |
| 195 m_requestQueue.clear(); | |
|
tony
2013/07/31 20:59:29
I don't understand this change. Why are we no lon
| |
| 196 if (m_processingRequest) | 194 if (m_processingRequest) |
| 197 m_processingRequest->didCancel(); | 195 m_processingRequest->didCancel(); |
| 198 } | 196 } |
| 199 | 197 |
| 200 void SpellChecker::invokeRequest(PassRefPtr<SpellCheckRequest> request) | 198 void SpellChecker::invokeRequest(PassRefPtr<SpellCheckRequest> request) |
| 201 { | 199 { |
| 202 ASSERT(!m_processingRequest); | 200 ASSERT(!m_processingRequest); |
| 203 if (!client()) | 201 if (!client()) |
| 204 return; | 202 return; |
| 205 m_processingRequest = request; | 203 m_processingRequest = request; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 didCheck(sequence, results); | 253 didCheck(sequence, results); |
| 256 } | 254 } |
| 257 | 255 |
| 258 void SpellChecker::didCheckCancel(int sequence) | 256 void SpellChecker::didCheckCancel(int sequence) |
| 259 { | 257 { |
| 260 Vector<TextCheckingResult> results; | 258 Vector<TextCheckingResult> results; |
| 261 didCheck(sequence, results); | 259 didCheck(sequence, results); |
| 262 } | 260 } |
| 263 | 261 |
| 264 } // namespace WebCore | 262 } // namespace WebCore |
| OLD | NEW |