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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return 0; | 86 return 0; |
87 | 87 |
88 return m_resources.get(id); | 88 return m_resources.get(id); |
89 } | 89 } |
90 | 90 |
91 void SVGDocumentExtensions::startAnimations() | 91 void SVGDocumentExtensions::startAnimations() |
92 { | 92 { |
93 // FIXME: Eventually every "Time Container" will need a way to latch on to s
ome global timer | 93 // FIXME: Eventually every "Time Container" will need a way to latch on to s
ome global timer |
94 // starting animations for a document will do this "latching" | 94 // starting animations for a document will do this "latching" |
95 #if ENABLE(SVG_ANIMATION) | 95 #if ENABLE(SVG_ANIMATION) |
96 HashSet<SVGSVGElement*>::iterator end = m_timeContainers.end(); | 96 // FIXME: We hold a ref pointers to prevent a shadow tree from getting remov
ed out from underneath us. |
97 for (HashSet<SVGSVGElement*>::iterator itr = m_timeContainers.begin(); itr !
= end; ++itr) | 97 // In the future we should refactor the use-element to avoid this. See https
://webkit.org/b/53704 |
| 98 Vector<RefPtr<SVGSVGElement> > timeContainers; |
| 99 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; |
| 100 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); |
| 101 for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin();
itr != end; ++itr) |
98 (*itr)->timeContainer()->begin(); | 102 (*itr)->timeContainer()->begin(); |
99 #endif | 103 #endif |
100 } | 104 } |
101 | 105 |
102 void SVGDocumentExtensions::pauseAnimations() | 106 void SVGDocumentExtensions::pauseAnimations() |
103 { | 107 { |
104 HashSet<SVGSVGElement*>::iterator end = m_timeContainers.end(); | 108 HashSet<SVGSVGElement*>::iterator end = m_timeContainers.end(); |
105 for (HashSet<SVGSVGElement*>::iterator itr = m_timeContainers.begin(); itr !
= end; ++itr) | 109 for (HashSet<SVGSVGElement*>::iterator itr = m_timeContainers.begin(); itr !
= end; ++itr) |
106 (*itr)->pauseAnimations(); | 110 (*itr)->pauseAnimations(); |
107 } | 111 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 ASSERT(m_pendingResources.contains(id)); | 190 ASSERT(m_pendingResources.contains(id)); |
187 | 191 |
188 OwnPtr<SVGPendingElements> set(m_pendingResources.get(id)); | 192 OwnPtr<SVGPendingElements> set(m_pendingResources.get(id)); |
189 m_pendingResources.remove(id); | 193 m_pendingResources.remove(id); |
190 return set.release(); | 194 return set.release(); |
191 } | 195 } |
192 | 196 |
193 } | 197 } |
194 | 198 |
195 #endif | 199 #endif |
OLD | NEW |