| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2009 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 | 43 |
| 44 AtomicString m_prefix; | 44 AtomicString m_prefix; |
| 45 AtomicString m_localName; | 45 AtomicString m_localName; |
| 46 AtomicString m_namespace; | 46 AtomicString m_namespace; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 QualifiedNameImpl(const AtomicString& prefix, const AtomicString& localN
ame, const AtomicString& namespaceURI) | 49 QualifiedNameImpl(const AtomicString& prefix, const AtomicString& localN
ame, const AtomicString& namespaceURI) |
| 50 : m_prefix(prefix) | 50 : m_prefix(prefix) |
| 51 , m_localName(localName) | 51 , m_localName(localName) |
| 52 , m_namespace(namespaceURI) | 52 , m_namespace(namespaceURI.isEmpty() ? nullAtom : namespaceURI) |
| 53 { | 53 { |
| 54 } | 54 } |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 QualifiedName(const AtomicString& prefix, const AtomicString& localName, con
st AtomicString& namespaceURI); | 57 QualifiedName(const AtomicString& prefix, const AtomicString& localName, con
st AtomicString& namespaceURI); |
| 58 ~QualifiedName() { deref(); } | 58 ~QualifiedName() { deref(); } |
| 59 #ifdef QNAME_DEFAULT_CONSTRUCTOR | 59 #ifdef QNAME_DEFAULT_CONSTRUCTOR |
| 60 QualifiedName() : m_impl(0) { } | 60 QualifiedName() : m_impl(0) { } |
| 61 #endif | 61 #endif |
| 62 | 62 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 template<> struct HashTraits<WebCore::QualifiedName> : GenericHashTraits<Web
Core::QualifiedName> { | 160 template<> struct HashTraits<WebCore::QualifiedName> : GenericHashTraits<Web
Core::QualifiedName> { |
| 161 static const bool emptyValueIsZero = false; | 161 static const bool emptyValueIsZero = false; |
| 162 static WebCore::QualifiedName emptyValue() { return WebCore::QualifiedNa
me(WebCore::nullAtom, WebCore::nullAtom, WebCore::nullAtom); } | 162 static WebCore::QualifiedName emptyValue() { return WebCore::QualifiedNa
me(WebCore::nullAtom, WebCore::nullAtom, WebCore::nullAtom); } |
| 163 static void constructDeletedValue(WebCore::QualifiedName& slot) { new (&
slot) WebCore::QualifiedName(WebCore::nullAtom, WebCore::AtomicString(HashTableD
eletedValue), WebCore::nullAtom); } | 163 static void constructDeletedValue(WebCore::QualifiedName& slot) { new (&
slot) WebCore::QualifiedName(WebCore::nullAtom, WebCore::AtomicString(HashTableD
eletedValue), WebCore::nullAtom); } |
| 164 static bool isDeletedValue(const WebCore::QualifiedName& slot) { return
slot.localName().isHashTableDeletedValue(); } | 164 static bool isDeletedValue(const WebCore::QualifiedName& slot) { return
slot.localName().isHashTableDeletedValue(); } |
| 165 }; | 165 }; |
| 166 } | 166 } |
| 167 | 167 |
| 168 #endif | 168 #endif |
| OLD | NEW |