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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } | 76 } |
77 | 77 |
78 RenderSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri
ng& id) const | 78 RenderSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri
ng& id) const |
79 { | 79 { |
80 if (id.isEmpty()) | 80 if (id.isEmpty()) |
81 return 0; | 81 return 0; |
82 | 82 |
83 return m_resources.get(id); | 83 return m_resources.get(id); |
84 } | 84 } |
85 | 85 |
86 void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document, double m
onotonicAnimationStartTime) | |
87 { | |
88 if (!document.svgExtensions()) | |
89 return; | |
90 document.accessSVGExtensions().serviceAnimations(monotonicAnimationStartTime
); | |
91 } | |
92 | |
93 void SVGDocumentExtensions::serviceAnimations(double monotonicAnimationStartTime
) | |
94 { | |
95 Vector<RefPtr<SVGSVGElement> > timeContainers; | |
96 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; | |
97 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); | |
98 for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin();
itr != end; ++itr) | |
99 (*itr)->timeContainer()->serviceAnimations(monotonicAnimationStartTime); | |
100 } | |
101 | |
102 void SVGDocumentExtensions::startAnimations() | 86 void SVGDocumentExtensions::startAnimations() |
103 { | 87 { |
104 // FIXME: Eventually every "Time Container" will need a way to latch on to s
ome global timer | 88 // FIXME: Eventually every "Time Container" will need a way to latch on to s
ome global timer |
105 // starting animations for a document will do this "latching" | 89 // starting animations for a document will do this "latching" |
106 // FIXME: We hold a ref pointers to prevent a shadow tree from getting remov
ed out from underneath us. | 90 // FIXME: We hold a ref pointers to prevent a shadow tree from getting remov
ed out from underneath us. |
107 // In the future we should refactor the use-element to avoid this. See https
://webkit.org/b/53704 | 91 // In the future we should refactor the use-element to avoid this. See https
://webkit.org/b/53704 |
108 Vector<RefPtr<SVGSVGElement> > timeContainers; | 92 Vector<RefPtr<SVGSVGElement> > timeContainers; |
109 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; | 93 timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end())
; |
110 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); | 94 Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end(); |
111 for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin();
itr != end; ++itr) | 95 for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin();
itr != end; ++itr) |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 } | 410 } |
427 | 411 |
428 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) | 412 void SVGDocumentExtensions::unregisterSVGFontFaceElement(SVGFontFaceElement* ele
ment) |
429 { | 413 { |
430 ASSERT(m_svgFontFaceElements.contains(element)); | 414 ASSERT(m_svgFontFaceElements.contains(element)); |
431 m_svgFontFaceElements.remove(element); | 415 m_svgFontFaceElements.remove(element); |
432 } | 416 } |
433 #endif | 417 #endif |
434 | 418 |
435 } | 419 } |
OLD | NEW |