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

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: 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/uppercase version of the string. These functions might
165 // convert non-ASCII characters to ASCII characters. For example, lower() for 165 // convert non-ASCII characters to ASCII characters. For example, lower() for
166 // U+212A is 'k', upper() for U+017F is 'S'. 166 // U+212A is 'k', upper() for U+017F is 'S'.
167 // These functions are rarely used to implement web platform features. 167 // These functions are rarely used to implement web platform features.
168 AtomicString lower() const; 168 AtomicString lower() const;
169 AtomicString upper() const { return AtomicString(impl()->upper()); } 169 AtomicString upper() const { return AtomicString(impl()->upper()); }
170 170
171 // Returns a lowercase version of the string. This function converts only 171 // Returns a lowercase/uppercase version of the string. This function converts
172 // upper-case ASCII characters. 172 // only upper/lower-case ASCII characters.
173 AtomicString lowerASCII() const; 173 AtomicString lowerASCII() const;
174 AtomicString upperASCII() const { return AtomicString(impl()->upperASCII()); }
Sunny 2017/03/01 08:59:25 Hi tkent, I'm not sure call impl() here will retur
tkent 2017/03/01 12:21:27 It should support null impl(). So implement it lik
174 175
175 int toInt(bool* ok = 0) const { return m_string.toInt(ok); } 176 int toInt(bool* ok = 0) const { return m_string.toInt(ok); }
176 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); } 177 double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); }
177 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); } 178 float toFloat(bool* ok = 0) const { return m_string.toFloat(ok); }
178 179
179 static AtomicString number(int); 180 static AtomicString number(int);
180 static AtomicString number(unsigned); 181 static AtomicString number(unsigned);
181 static AtomicString number(long); 182 static AtomicString number(long);
182 static AtomicString number(unsigned long); 183 static AtomicString number(unsigned long);
183 static AtomicString number(long long); 184 static AtomicString number(long long);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 using WTF::AtomicString; 304 using WTF::AtomicString;
304 using WTF::nullAtom; 305 using WTF::nullAtom;
305 using WTF::emptyAtom; 306 using WTF::emptyAtom;
306 using WTF::starAtom; 307 using WTF::starAtom;
307 using WTF::xmlAtom; 308 using WTF::xmlAtom;
308 using WTF::xmlnsAtom; 309 using WTF::xmlnsAtom;
309 using WTF::xlinkAtom; 310 using WTF::xlinkAtom;
310 311
311 #include "wtf/text/StringConcatenate.h" 312 #include "wtf/text/StringConcatenate.h"
312 #endif // AtomicString_h 313 #endif // AtomicString_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698