| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 template <size_t inlineCapacity> | 54 template <size_t inlineCapacity> |
| 55 explicit AtomicString(const Vector<UChar, inlineCapacity>& vector) | 55 explicit AtomicString(const Vector<UChar, inlineCapacity>& vector) |
| 56 : AtomicString(vector.data(), vector.size()) {} | 56 : AtomicString(vector.data(), vector.size()) {} |
| 57 | 57 |
| 58 // Constructing an AtomicString from a String / StringImpl can be expensive if | 58 // Constructing an AtomicString from a String / StringImpl can be expensive if |
| 59 // the StringImpl is not already atomic. | 59 // the StringImpl is not already atomic. |
| 60 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) {} | 60 explicit AtomicString(StringImpl* impl) : m_string(add(impl)) {} |
| 61 explicit AtomicString(const String& s) : m_string(add(s.impl())) {} | 61 explicit AtomicString(const String& s) : m_string(add(s.impl())) {} |
| 62 | 62 |
| 63 // Hash table deleted values, which are only constructed and never copied or d
estroyed. | 63 // Hash table deleted values, which are only constructed and never copied or |
| 64 // destroyed. |
| 64 AtomicString(WTF::HashTableDeletedValueType) | 65 AtomicString(WTF::HashTableDeletedValueType) |
| 65 : m_string(WTF::HashTableDeletedValue) {} | 66 : m_string(WTF::HashTableDeletedValue) {} |
| 66 bool isHashTableDeletedValue() const { | 67 bool isHashTableDeletedValue() const { |
| 67 return m_string.isHashTableDeletedValue(); | 68 return m_string.isHashTableDeletedValue(); |
| 68 } | 69 } |
| 69 | 70 |
| 70 operator const String&() const { return m_string; } | 71 operator const String&() const { return m_string; } |
| 71 const String& getString() const { return m_string; } | 72 const String& getString() const { return m_string; } |
| 72 | 73 |
| 73 StringImpl* impl() const { return m_string.impl(); } | 74 StringImpl* impl() const { return m_string.impl(); } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 using WTF::AtomicString; | 295 using WTF::AtomicString; |
| 295 using WTF::nullAtom; | 296 using WTF::nullAtom; |
| 296 using WTF::emptyAtom; | 297 using WTF::emptyAtom; |
| 297 using WTF::starAtom; | 298 using WTF::starAtom; |
| 298 using WTF::xmlAtom; | 299 using WTF::xmlAtom; |
| 299 using WTF::xmlnsAtom; | 300 using WTF::xmlnsAtom; |
| 300 using WTF::xlinkAtom; | 301 using WTF::xlinkAtom; |
| 301 | 302 |
| 302 #include "wtf/text/StringConcatenate.h" | 303 #include "wtf/text/StringConcatenate.h" |
| 303 #endif // AtomicString_h | 304 #endif // AtomicString_h |
| OLD | NEW |