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

Side by Side Diff: Source/core/editing/SpellCheckRequester.cpp

Issue 289323003: Move markerlists to Oilpan heap and remove finalizer from DocumentMarkerController (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/SpellChecker.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // static 61 // static
62 PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask tex tCheckingOptions, TextCheckingProcessType processType, PassRefPtrWillBeRawPtr<Ra nge> checkingRange, PassRefPtrWillBeRawPtr<Range> paragraphRange, int requestNum ber) 62 PassRefPtr<SpellCheckRequest> SpellCheckRequest::create(TextCheckingTypeMask tex tCheckingOptions, TextCheckingProcessType processType, PassRefPtrWillBeRawPtr<Ra nge> checkingRange, PassRefPtrWillBeRawPtr<Range> paragraphRange, int requestNum ber)
63 { 63 {
64 ASSERT(checkingRange); 64 ASSERT(checkingRange);
65 ASSERT(paragraphRange); 65 ASSERT(paragraphRange);
66 66
67 String text = checkingRange->text(); 67 String text = checkingRange->text();
68 if (!text.length()) 68 if (!text.length())
69 return PassRefPtr<SpellCheckRequest>(); 69 return PassRefPtr<SpellCheckRequest>();
70 70
71 const Vector<DocumentMarker*>& markers = checkingRange->ownerDocument().mark ers().markersInRange(checkingRange.get(), DocumentMarker::SpellCheckClientMarker s()); 71 const WillBeHeapVector<DocumentMarker*>& markers = checkingRange->ownerDocum ent().markers().markersInRange(checkingRange.get(), DocumentMarker::SpellCheckCl ientMarkers());
72 Vector<uint32_t> hashes(markers.size()); 72 Vector<uint32_t> hashes(markers.size());
73 Vector<unsigned> offsets(markers.size()); 73 Vector<unsigned> offsets(markers.size());
74 for (size_t i = 0; i < markers.size(); i++) { 74 for (size_t i = 0; i < markers.size(); i++) {
75 hashes[i] = markers[i]->hash(); 75 hashes[i] = markers[i]->hash();
76 offsets[i] = markers[i]->startOffset(); 76 offsets[i] = markers[i]->startOffset();
77 } 77 }
78 78
79 return adoptRef(new SpellCheckRequest(checkingRange, paragraphRange, text, t extCheckingOptions, processType, hashes, offsets, requestNumber)); 79 return adoptRef(new SpellCheckRequest(checkingRange, paragraphRange, text, t extCheckingOptions, processType, hashes, offsets, requestNumber));
80 } 80 }
81 81
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/editing/CompositeEditCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698