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

Side by Side Diff: third_party/WebKit/Source/platform/text/SegmentedString.h

Issue 2508033004: Reduce unnecessary usage of TextCaseSensitivity::TextCaseInsensitive. (Closed)
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 enum LookAheadResult { 217 enum LookAheadResult {
218 DidNotMatch, 218 DidNotMatch,
219 DidMatch, 219 DidMatch,
220 NotEnoughCharacters, 220 NotEnoughCharacters,
221 }; 221 };
222 222
223 LookAheadResult lookAhead(const String& string) { 223 LookAheadResult lookAhead(const String& string) {
224 return lookAheadInline(string, TextCaseSensitive); 224 return lookAheadInline(string, TextCaseSensitive);
225 } 225 }
226 LookAheadResult lookAheadIgnoringCase(const String& string) { 226 LookAheadResult lookAheadIgnoringCase(const String& string) {
227 return lookAheadInline(string, TextCaseInsensitive); 227 return lookAheadInline(string, TextCaseASCIIInsensitive);
228 } 228 }
229 229
230 void advance() { 230 void advance() {
231 if (m_fastPathFlags & Use8BitAdvance) { 231 if (m_fastPathFlags & Use8BitAdvance) {
232 m_currentChar = m_currentString.incrementAndGetCurrentChar8(); 232 m_currentChar = m_currentString.incrementAndGetCurrentChar8();
233 decrementAndCheckLength(); 233 decrementAndCheckLength();
234 return; 234 return;
235 } 235 }
236 236
237 (this->*m_advanceFunc)(); 237 (this->*m_advanceFunc)();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 bool m_closed; 415 bool m_closed;
416 bool m_empty; 416 bool m_empty;
417 unsigned char m_fastPathFlags; 417 unsigned char m_fastPathFlags;
418 void (SegmentedString::*m_advanceFunc)(); 418 void (SegmentedString::*m_advanceFunc)();
419 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)(); 419 void (SegmentedString::*m_advanceAndUpdateLineNumberFunc)();
420 }; 420 };
421 421
422 } // namespace blink 422 } // namespace blink
423 423
424 #endif 424 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698