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

Side by Side Diff: chrome/renderer/spellchecker/spellcheck_worditerator.cc

Issue 357003: Move the spellchecker to the renderer.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rename Created 11 years, 1 month 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
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/browser/spellcheck_worditerator.cc:r69-2775
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/spellcheck_worditerator.h" 5 #include "chrome/renderer/spellchecker/spellcheck_worditerator.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/browser/spellchecker.h" 12 #include "chrome/renderer/spellchecker/spellchecker2.h"
13 13
14 #include "third_party/icu/public/common/unicode/normlzr.h" 14 #include "third_party/icu/public/common/unicode/normlzr.h"
15 #include "third_party/icu/public/common/unicode/schriter.h" 15 #include "third_party/icu/public/common/unicode/schriter.h"
16 #include "third_party/icu/public/common/unicode/uchar.h" 16 #include "third_party/icu/public/common/unicode/uchar.h"
17 #include "third_party/icu/public/common/unicode/uscript.h" 17 #include "third_party/icu/public/common/unicode/uscript.h"
18 #include "third_party/icu/public/common/unicode/uset.h" 18 #include "third_party/icu/public/common/unicode/uset.h"
19 #include "third_party/icu/public/i18n/unicode/ulocdata.h" 19 #include "third_party/icu/public/i18n/unicode/ulocdata.h"
20 20
21 SpellcheckCharAttribute::SpellcheckCharAttribute() { 21 SpellcheckCharAttribute::SpellcheckCharAttribute() {
22 InitializeScriptTable(); 22 InitializeScriptTable();
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // alternatives, but also write NFKC keeps accents of characters. 265 // alternatives, but also write NFKC keeps accents of characters.
266 // Therefore, NFKC seems to be the best option for hunspell. 266 // Therefore, NFKC seems to be the best option for hunspell.
267 icu::UnicodeString input(FALSE, &word_[input_start], input_length); 267 icu::UnicodeString input(FALSE, &word_[input_start], input_length);
268 UErrorCode status = U_ZERO_ERROR; 268 UErrorCode status = U_ZERO_ERROR;
269 icu::UnicodeString output; 269 icu::UnicodeString output;
270 icu::Normalizer::normalize(input, UNORM_NFKC, 0, output, status); 270 icu::Normalizer::normalize(input, UNORM_NFKC, 0, output, status);
271 if (U_SUCCESS(status)) 271 if (U_SUCCESS(status))
272 output_string->assign(output.getTerminatedBuffer()); 272 output_string->assign(output.getTerminatedBuffer());
273 return status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING; 273 return status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING;
274 } 274 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698