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

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

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, 2007, 2008, 2013 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 4 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
5 * Copyright (C) 2012 Google Inc. All rights reserved. 5 * Copyright (C) 2012 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * 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.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 AtomicString AtomicString::lowerASCII() const { 80 AtomicString AtomicString::lowerASCII() const {
81 StringImpl* impl = this->impl(); 81 StringImpl* impl = this->impl();
82 if (UNLIKELY(!impl)) 82 if (UNLIKELY(!impl))
83 return *this; 83 return *this;
84 RefPtr<StringImpl> newImpl = impl->lowerASCII(); 84 RefPtr<StringImpl> newImpl = impl->lowerASCII();
85 if (LIKELY(newImpl == impl)) 85 if (LIKELY(newImpl == impl))
86 return *this; 86 return *this;
87 return AtomicString(newImpl.release()); 87 return AtomicString(newImpl.release());
88 } 88 }
89 89
90 AtomicString AtomicString::upperASCII() const {
91 StringImpl* impl = this->impl();
92 if (UNLIKELY(!impl))
93 return *this;
94 return AtomicString(impl->upperASCII());
95 }
96
90 template <typename IntegerType> 97 template <typename IntegerType>
91 static AtomicString integerToAtomicString(IntegerType input) { 98 static AtomicString integerToAtomicString(IntegerType input) {
92 IntegerToStringConverter<IntegerType> converter(input); 99 IntegerToStringConverter<IntegerType> converter(input);
93 return AtomicString(converter.characters8(), converter.length()); 100 return AtomicString(converter.characters8(), converter.length());
94 } 101 }
95 102
96 AtomicString AtomicString::number(int number) { 103 AtomicString AtomicString::number(int number) {
97 return integerToAtomicString(number); 104 return integerToAtomicString(number);
98 } 105 }
99 106
(...skipping 26 matching lines...) Expand all
126 return out << s.getString(); 133 return out << s.getString();
127 } 134 }
128 135
129 #ifndef NDEBUG 136 #ifndef NDEBUG
130 void AtomicString::show() const { 137 void AtomicString::show() const {
131 m_string.show(); 138 m_string.show();
132 } 139 }
133 #endif 140 #endif
134 141
135 } // namespace WTF 142 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/text/AtomicString.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698