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

Side by Side Diff: third_party/WebKit/Source/wtf/text/StringImpl.h

Issue 2373983006: reflow comments in wtf/text (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights
4 * reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 5 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * 6 *
6 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
10 * 11 *
11 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 TextCaseASCIIInsensitive, 53 TextCaseASCIIInsensitive,
53 TextCaseInsensitive 54 TextCaseInsensitive
54 }; 55 };
55 56
56 enum StripBehavior { StripExtraWhiteSpace, DoNotStripWhiteSpace }; 57 enum StripBehavior { StripExtraWhiteSpace, DoNotStripWhiteSpace };
57 58
58 typedef bool (*CharacterMatchFunctionPtr)(UChar); 59 typedef bool (*CharacterMatchFunctionPtr)(UChar);
59 typedef bool (*IsWhiteSpaceFunctionPtr)(UChar); 60 typedef bool (*IsWhiteSpaceFunctionPtr)(UChar);
60 typedef HashMap<unsigned, StringImpl*, AlreadyHashed> StaticStringsTable; 61 typedef HashMap<unsigned, StringImpl*, AlreadyHashed> StaticStringsTable;
61 62
62 // Define STRING_STATS to turn on run time statistics of string sizes and memory usage 63 // Define STRING_STATS to turn on run time statistics of string sizes and memory
64 // usage
63 #undef STRING_STATS 65 #undef STRING_STATS
64 66
65 #ifdef STRING_STATS 67 #ifdef STRING_STATS
66 struct StringStats { 68 struct StringStats {
67 inline void add8BitString(unsigned length) { 69 inline void add8BitString(unsigned length) {
68 ++m_totalNumberStrings; 70 ++m_totalNumberStrings;
69 ++m_number8BitStrings; 71 ++m_number8BitStrings;
70 m_total8BitData += length; 72 m_total8BitData += length;
71 } 73 }
72 74
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 double toDouble(bool* ok = 0); 345 double toDouble(bool* ok = 0);
344 float toFloat(bool* ok = 0); 346 float toFloat(bool* ok = 0);
345 347
346 PassRefPtr<StringImpl> lower(); 348 PassRefPtr<StringImpl> lower();
347 PassRefPtr<StringImpl> lowerASCII(); 349 PassRefPtr<StringImpl> lowerASCII();
348 PassRefPtr<StringImpl> upper(); 350 PassRefPtr<StringImpl> upper();
349 PassRefPtr<StringImpl> lower(const AtomicString& localeIdentifier); 351 PassRefPtr<StringImpl> lower(const AtomicString& localeIdentifier);
350 PassRefPtr<StringImpl> upper(const AtomicString& localeIdentifier); 352 PassRefPtr<StringImpl> upper(const AtomicString& localeIdentifier);
351 353
352 PassRefPtr<StringImpl> fill(UChar); 354 PassRefPtr<StringImpl> fill(UChar);
353 // FIXME: Do we need fill(char) or can we just do the right thing if UChar is ASCII? 355 // FIXME: Do we need fill(char) or can we just do the right thing if UChar is
356 // ASCII?
354 PassRefPtr<StringImpl> foldCase(); 357 PassRefPtr<StringImpl> foldCase();
355 358
356 PassRefPtr<StringImpl> truncate(unsigned length); 359 PassRefPtr<StringImpl> truncate(unsigned length);
357 360
358 PassRefPtr<StringImpl> stripWhiteSpace(); 361 PassRefPtr<StringImpl> stripWhiteSpace();
359 PassRefPtr<StringImpl> stripWhiteSpace(IsWhiteSpaceFunctionPtr); 362 PassRefPtr<StringImpl> stripWhiteSpace(IsWhiteSpaceFunctionPtr);
360 PassRefPtr<StringImpl> simplifyWhiteSpace( 363 PassRefPtr<StringImpl> simplifyWhiteSpace(
361 StripBehavior = StripExtraWhiteSpace); 364 StripBehavior = StripExtraWhiteSpace);
362 PassRefPtr<StringImpl> simplifyWhiteSpace( 365 PassRefPtr<StringImpl> simplifyWhiteSpace(
363 IsWhiteSpaceFunctionPtr, 366 IsWhiteSpaceFunctionPtr,
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 using WTF::TextCaseASCIIInsensitive; 833 using WTF::TextCaseASCIIInsensitive;
831 using WTF::TextCaseInsensitive; 834 using WTF::TextCaseInsensitive;
832 using WTF::TextCaseSensitive; 835 using WTF::TextCaseSensitive;
833 using WTF::TextCaseSensitivity; 836 using WTF::TextCaseSensitivity;
834 using WTF::equal; 837 using WTF::equal;
835 using WTF::equalNonNull; 838 using WTF::equalNonNull;
836 using WTF::lengthOfNullTerminatedString; 839 using WTF::lengthOfNullTerminatedString;
837 using WTF::reverseFind; 840 using WTF::reverseFind;
838 841
839 #endif 842 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698