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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 void SVGDocumentExtensions::reportWarning(const String& message) | 149 void SVGDocumentExtensions::reportWarning(const String& message) |
150 { | 150 { |
151 reportMessage(m_document, WarningMessageLevel, "Warning: " + message); | 151 reportMessage(m_document, WarningMessageLevel, "Warning: " + message); |
152 } | 152 } |
153 | 153 |
154 void SVGDocumentExtensions::reportError(const String& message) | 154 void SVGDocumentExtensions::reportError(const String& message) |
155 { | 155 { |
156 reportMessage(m_document, ErrorMessageLevel, "Error: " + message); | 156 reportMessage(m_document, ErrorMessageLevel, "Error: " + message); |
157 } | 157 } |
158 | 158 |
159 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, SVGStyled
Element* obj) | 159 void SVGDocumentExtensions::addPendingResource(const AtomicString& id, PassRefPt
r<SVGStyledElement> obj) |
160 { | 160 { |
161 ASSERT(obj); | 161 ASSERT(obj); |
162 | 162 |
163 if (id.isEmpty()) | 163 if (id.isEmpty()) |
164 return; | 164 return; |
165 | 165 |
166 if (m_pendingResources.contains(id)) | 166 if (m_pendingResources.contains(id)) |
167 m_pendingResources.get(id)->add(obj); | 167 m_pendingResources.get(id)->add(obj); |
168 else { | 168 else { |
169 HashSet<SVGStyledElement*>* set = new HashSet<SVGStyledElement*>; | 169 SVGPendingElements* set = new SVGPendingElements; |
170 set->add(obj); | 170 set->add(obj); |
171 | 171 |
172 m_pendingResources.add(id, set); | 172 m_pendingResources.add(id, set); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 bool SVGDocumentExtensions::isPendingResource(const AtomicString& id) const | 176 bool SVGDocumentExtensions::isPendingResource(const AtomicString& id) const |
177 { | 177 { |
178 if (id.isEmpty()) | 178 if (id.isEmpty()) |
179 return false; | 179 return false; |
180 | 180 |
181 return m_pendingResources.contains(id); | 181 return m_pendingResources.contains(id); |
182 } | 182 } |
183 | 183 |
184 PassOwnPtr<HashSet<SVGStyledElement*> > SVGDocumentExtensions::removePendingReso
urce(const AtomicString& id) | 184 PassOwnPtr<HashSet<RefPtr<SVGStyledElement> > > SVGDocumentExtensions::removePen
dingResource(const AtomicString& id) |
185 { | 185 { |
186 ASSERT(m_pendingResources.contains(id)); | 186 ASSERT(m_pendingResources.contains(id)); |
187 | 187 |
188 OwnPtr<HashSet<SVGStyledElement*> > set(m_pendingResources.get(id)); | 188 OwnPtr<SVGPendingElements> set(m_pendingResources.get(id)); |
189 m_pendingResources.remove(id); | 189 m_pendingResources.remove(id); |
190 return set.release(); | 190 return set.release(); |
191 } | 191 } |
192 | 192 |
193 } | 193 } |
194 | 194 |
195 #endif | 195 #endif |
OLD | NEW |