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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 public: | 48 public: |
49 static PassRefPtr<QualifiedNameImpl> create(const AtomicString& prefix,
const AtomicString& localName, const AtomicString& namespaceURI, bool isStatic) | 49 static PassRefPtr<QualifiedNameImpl> create(const AtomicString& prefix,
const AtomicString& localName, const AtomicString& namespaceURI, bool isStatic) |
50 { | 50 { |
51 return adoptRef(new QualifiedNameImpl(prefix, localName, namespaceUR
I, isStatic)); | 51 return adoptRef(new QualifiedNameImpl(prefix, localName, namespaceUR
I, isStatic)); |
52 } | 52 } |
53 | 53 |
54 ~QualifiedNameImpl(); | 54 ~QualifiedNameImpl(); |
55 | 55 |
56 unsigned computeHash() const; | 56 unsigned computeHash() const; |
57 | 57 |
58 bool hasOneRef() const | |
59 { | |
60 return m_isStatic || RefCounted<QualifiedNameImpl>::hasOneRef(); | |
61 } | |
62 | |
63 void ref() | 58 void ref() |
64 { | 59 { |
65 if (m_isStatic) | 60 if (m_isStatic) |
66 return; | 61 return; |
67 RefCounted<QualifiedNameImpl>::ref(); | 62 RefCounted<QualifiedNameImpl>::ref(); |
68 } | 63 } |
69 | 64 |
70 void deref() | 65 void deref() |
71 { | 66 { |
72 if (m_isStatic) | 67 if (m_isStatic) |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 typedef blink::QualifiedNameHash Hash; | 177 typedef blink::QualifiedNameHash Hash; |
183 }; | 178 }; |
184 | 179 |
185 template<> struct HashTraits<blink::QualifiedName> : SimpleClassHashTraits<b
link::QualifiedName> { | 180 template<> struct HashTraits<blink::QualifiedName> : SimpleClassHashTraits<b
link::QualifiedName> { |
186 static const bool emptyValueIsZero = false; | 181 static const bool emptyValueIsZero = false; |
187 static blink::QualifiedName emptyValue() { return blink::QualifiedName::
null(); } | 182 static blink::QualifiedName emptyValue() { return blink::QualifiedName::
null(); } |
188 }; | 183 }; |
189 } | 184 } |
190 | 185 |
191 #endif | 186 #endif |
OLD | NEW |