Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: Source/WebCore/svg/SVGDocumentExtensions.cpp

Issue 6483004: Merge 77548 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/svg/custom/use-animation-in-fill-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/use-animation-in-fill-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698