| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element*
element) | 146 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, Element*
element) |
| 147 { | 147 { |
| 148 ASSERT(element); | 148 ASSERT(element); |
| 149 ASSERT(element->inDocument()); | 149 ASSERT(element->inDocument()); |
| 150 | 150 |
| 151 if (id.isEmpty()) | 151 if (id.isEmpty()) |
| 152 return; | 152 return; |
| 153 | 153 |
| 154 HashMap<AtomicString, OwnPtr<SVGPendingElements> >::AddResult result = m_pen
dingResources.add(id, nullptr); | 154 HashMap<AtomicString, OwnPtr<SVGPendingElements> >::AddResult result = m_pen
dingResources.add(id, nullptr); |
| 155 if (result.isNewEntry) | 155 if (result.isNewEntry) |
| 156 result.iterator->value = adoptPtr(new SVGPendingElements); | 156 result.storedValue->value = adoptPtr(new SVGPendingElements); |
| 157 result.iterator->value->add(element); | 157 result.storedValue->value->add(element); |
| 158 | 158 |
| 159 element->setHasPendingResources(); | 159 element->setHasPendingResources(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool SVGDocumentExtensions::hasPendingResource(const AtomicString& id) const | 162 bool SVGDocumentExtensions::hasPendingResource(const AtomicString& id) const |
| 163 { | 163 { |
| 164 if (id.isEmpty()) | 164 if (id.isEmpty()) |
| 165 return false; | 165 return false; |
| 166 | 166 |
| 167 return m_pendingResources.contains(id); | 167 return m_pendingResources.contains(id); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 } | 410 } |
| 411 | 411 |
| 412 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) | 412 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) |
| 413 { | 413 { |
| 414 ASSERT(m_svgFontFaceElements.contains(element)); | 414 ASSERT(m_svgFontFaceElements.contains(element)); |
| 415 m_svgFontFaceElements.remove(element); | 415 m_svgFontFaceElements.remove(element); |
| 416 } | 416 } |
| 417 #endif | 417 #endif |
| 418 | 418 |
| 419 } | 419 } |
| OLD | NEW |