Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 static AtomicString number(long long); | 141 static AtomicString number(long long); |
| 142 static AtomicString number(unsigned long long); | 142 static AtomicString number(unsigned long long); |
| 143 | 143 |
| 144 static AtomicString number(double, unsigned precision = 6, TrailingZerosTrun catingPolicy = TruncateTrailingZeros); | 144 static AtomicString number(double, unsigned precision = 6, TrailingZerosTrun catingPolicy = TruncateTrailingZeros); |
| 145 | 145 |
| 146 bool isNull() const { return m_string.isNull(); } | 146 bool isNull() const { return m_string.isNull(); } |
| 147 bool isEmpty() const { return m_string.isEmpty(); } | 147 bool isEmpty() const { return m_string.isEmpty(); } |
| 148 | 148 |
| 149 static void remove(StringImpl*); | 149 static void remove(StringImpl*); |
| 150 | 150 |
| 151 #if USE(CF) | |
| 152 AtomicString(CFStringRef s) : m_string(add(s)) { } | |
| 153 #endif | |
| 154 #ifdef __OBJC__ | |
| 155 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } | |
| 156 operator NSString*() const { return m_string; } | |
| 157 #endif | |
|
Nico
2014/01/15 19:06:12
The implementation in AtomicString.cpp is still ar
tasak
2014/01/17 08:17:29
I see. I removed AtomicStringCF.cpp (i.e. AtomicSt
| |
| 158 // AtomicString::fromUTF8 will return a null string if | 151 // AtomicString::fromUTF8 will return a null string if |
| 159 // the input data contains invalid UTF-8 sequences. | 152 // the input data contains invalid UTF-8 sequences. |
| 160 static AtomicString fromUTF8(const char*, size_t); | 153 static AtomicString fromUTF8(const char*, size_t); |
| 161 static AtomicString fromUTF8(const char*); | 154 static AtomicString fromUTF8(const char*); |
| 162 | 155 |
| 163 CString ascii() const { return m_string.ascii(); } | 156 CString ascii() const { return m_string.ascii(); } |
| 164 CString latin1() const { return m_string.latin1(); } | 157 CString latin1() const { return m_string.latin1(); } |
| 165 CString utf8(UTF8ConversionMode mode = LenientUTF8Conversion) const { return m_string.utf8(mode); } | 158 CString utf8(UTF8ConversionMode mode = LenientUTF8Conversion) const { return m_string.utf8(mode); } |
| 166 | 159 |
| 167 #ifndef NDEBUG | 160 #ifndef NDEBUG |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 using WTF::nullAtom; | 255 using WTF::nullAtom; |
| 263 using WTF::emptyAtom; | 256 using WTF::emptyAtom; |
| 264 using WTF::starAtom; | 257 using WTF::starAtom; |
| 265 using WTF::xmlAtom; | 258 using WTF::xmlAtom; |
| 266 using WTF::xmlnsAtom; | 259 using WTF::xmlnsAtom; |
| 267 using WTF::xlinkAtom; | 260 using WTF::xlinkAtom; |
| 268 #endif | 261 #endif |
| 269 | 262 |
| 270 #include "wtf/text/StringConcatenate.h" | 263 #include "wtf/text/StringConcatenate.h" |
| 271 #endif // AtomicString_h | 264 #endif // AtomicString_h |
| OLD | NEW |