| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 QualifiedNameData data = {{p.impl(), l.impl(), n.impl()}, isStatic}; | 91 QualifiedNameData data = {{p.impl(), l.impl(), n.impl()}, isStatic}; |
| 92 QualifiedNameCache::AddResult addResult = | 92 QualifiedNameCache::AddResult addResult = |
| 93 qualifiedNameCache().addWithTranslator<QNameComponentsTranslator>(data); | 93 qualifiedNameCache().addWithTranslator<QNameComponentsTranslator>(data); |
| 94 m_impl = addResult.isNewEntry ? adoptRef(*addResult.storedValue) | 94 m_impl = addResult.isNewEntry ? adoptRef(*addResult.storedValue) |
| 95 : *addResult.storedValue; | 95 : *addResult.storedValue; |
| 96 } | 96 } |
| 97 | 97 |
| 98 QualifiedName::~QualifiedName() {} | 98 QualifiedName::~QualifiedName() {} |
| 99 | 99 |
| 100 QualifiedName::QualifiedNameImpl::~QualifiedNameImpl() { | 100 QualifiedName::QualifiedNameImpl::~QualifiedNameImpl() { |
| 101 qualifiedNameCache().remove(this); | 101 qualifiedNameCache().erase(this); |
| 102 } | 102 } |
| 103 | 103 |
| 104 String QualifiedName::toString() const { | 104 String QualifiedName::toString() const { |
| 105 String local = localName(); | 105 String local = localName(); |
| 106 if (hasPrefix()) | 106 if (hasPrefix()) |
| 107 return prefix().getString() + ":" + local; | 107 return prefix().getString() + ":" + local; |
| 108 return local; | 108 return local; |
| 109 } | 109 } |
| 110 | 110 |
| 111 // Global init routines | 111 // Global init routines |
| (...skipping 30 matching lines...) Expand all Loading... |
| 142 new (targetAddress) | 142 new (targetAddress) |
| 143 QualifiedName(nullAtom, AtomicString(name), nameNamespace, true); | 143 QualifiedName(nullAtom, AtomicString(name), nameNamespace, true); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void QualifiedName::createStatic(void* targetAddress, StringImpl* name) { | 146 void QualifiedName::createStatic(void* targetAddress, StringImpl* name) { |
| 147 new (targetAddress) | 147 new (targetAddress) |
| 148 QualifiedName(nullAtom, AtomicString(name), nullAtom, true); | 148 QualifiedName(nullAtom, AtomicString(name), nullAtom, true); |
| 149 } | 149 } |
| 150 | 150 |
| 151 } // namespace blink | 151 } // namespace blink |
| OLD | NEW |