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

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

Issue 2723053002: Use the correct case converter for |localName| and |tagName| (Closed)
Patch Set: Oops... 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 bool startsWith(UChar character) const { 154 bool startsWith(UChar character) const {
155 return m_string.startsWith(character); 155 return m_string.startsWith(character);
156 } 156 }
157 157
158 bool endsWith(const StringView& suffix, 158 bool endsWith(const StringView& suffix,
159 TextCaseSensitivity caseSensitivity = TextCaseSensitive) const { 159 TextCaseSensitivity caseSensitivity = TextCaseSensitive) const {
160 return m_string.endsWith(suffix, caseSensitivity); 160 return m_string.endsWith(suffix, caseSensitivity);
161 } 161 }
162 bool endsWith(UChar character) const { return m_string.endsWith(character); } 162 bool endsWith(UChar character) const { return m_string.endsWith(character); }
163 163
164 // Returns a lowercase/uppercase version of the string. These functions might 164 // Returns a lowercase version of the string. This function might
165 // convert non-ASCII characters to ASCII characters. For example, lower() for 165 // convert non-ASCII characters to ASCII characters. For example,
166 // U+212A is 'k', upper() for U+017F is 'S'. 166 // lower() for U+212A is 'k'.
167 // These functions are rarely used to implement web platform features. 167 // This function is rarely used to implement web platform features.
168 AtomicString lower() const; 168 AtomicString lower() const;
169 AtomicString upper() const { return AtomicString(impl()->upper()); }
170 169
171 // Returns a lowercase version of the string. This function converts only 170 // Returns a lowercase/uppercase version of the string.
172 // upper-case ASCII characters. 171 // These functions convert ASCII characters only.
173 AtomicString lowerASCII() const; 172 AtomicString lowerASCII() const;
173 AtomicString upperASCII() const;
174 174
175 int toInt(bool* ok = 0) const { return m_string.toInt(ok); } 175 int toInt(bool* ok = 0) const { return m_string.toInt(ok); }
176 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); } 176 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); }
177 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); } 177 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); }
178 178
179 static AtomicString number(int); 179 static AtomicString number(int);
180 static AtomicString number(unsigned); 180 static AtomicString number(unsigned);
181 static AtomicString number(long); 181 static AtomicString number(long);
182 static AtomicString number(unsigned long); 182 static AtomicString number(unsigned long);
183 static AtomicString number(long long); 183 static AtomicString number(long long);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 using WTF::AtomicString; 303 using WTF::AtomicString;
304 using WTF::nullAtom; 304 using WTF::nullAtom;
305 using WTF::emptyAtom; 305 using WTF::emptyAtom;
306 using WTF::starAtom; 306 using WTF::starAtom;
307 using WTF::xmlAtom; 307 using WTF::xmlAtom;
308 using WTF::xmlnsAtom; 308 using WTF::xmlnsAtom;
309 using WTF::xlinkAtom; 309 using WTF::xlinkAtom;
310 310
311 #include "wtf/text/StringConcatenate.h" 311 #include "wtf/text/StringConcatenate.h"
312 #endif // AtomicString_h 312 #endif // AtomicString_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.cpp ('k') | third_party/WebKit/Source/wtf/text/AtomicString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698