Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckRequester.cpp

Issue 2747213002: Migrate WTF::Deque::last() to ::back() (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return; 200 return;
201 201
202 m_processingRequest->dispose(); 202 m_processingRequest->dispose();
203 m_processingRequest.clear(); 203 m_processingRequest.clear();
204 } 204 }
205 205
206 void SpellCheckRequester::enqueueRequest(SpellCheckRequest* request) { 206 void SpellCheckRequester::enqueueRequest(SpellCheckRequest* request) {
207 DCHECK(request); 207 DCHECK(request);
208 bool continuation = false; 208 bool continuation = false;
209 if (!m_requestQueue.isEmpty()) { 209 if (!m_requestQueue.isEmpty()) {
210 SpellCheckRequest* lastRequest = m_requestQueue.last(); 210 SpellCheckRequest* lastRequest = m_requestQueue.back();
211 // It's a continuation if the number of the last request got incremented in 211 // It's a continuation if the number of the last request got incremented in
212 // the new one and both apply to the same editable. 212 // the new one and both apply to the same editable.
213 continuation = 213 continuation =
214 request->rootEditableElement() == lastRequest->rootEditableElement() && 214 request->rootEditableElement() == lastRequest->rootEditableElement() &&
215 request->requestNumber() == lastRequest->requestNumber() + 1; 215 request->requestNumber() == lastRequest->requestNumber() + 1;
216 } 216 }
217 217
218 // Spellcheck requests for chunks of text in the same element should not 218 // Spellcheck requests for chunks of text in the same element should not
219 // overwrite each other. 219 // overwrite each other.
220 if (!continuation) { 220 if (!continuation) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 didCheck(sequence, results); 276 didCheck(sequence, results);
277 } 277 }
278 278
279 DEFINE_TRACE(SpellCheckRequester) { 279 DEFINE_TRACE(SpellCheckRequester) {
280 visitor->trace(m_frame); 280 visitor->trace(m_frame);
281 visitor->trace(m_processingRequest); 281 visitor->trace(m_processingRequest);
282 visitor->trace(m_requestQueue); 282 visitor->trace(m_requestQueue);
283 } 283 }
284 284
285 } // namespace blink 285 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698