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, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "wtf/HashMap.h" | 28 #include "wtf/HashMap.h" |
29 #include "wtf/HashSet.h" | 29 #include "wtf/HashSet.h" |
30 #include "wtf/text/AtomicStringHash.h" | 30 #include "wtf/text/AtomicStringHash.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class Document; | 34 class Document; |
35 class LayoutSVGResourceContainer; | 35 class LayoutSVGResourceContainer; |
36 class SubtreeLayoutScope; | 36 class SubtreeLayoutScope; |
37 class SVGSVGElement; | 37 class SVGSVGElement; |
| 38 class SVGElement; |
38 class Element; | 39 class Element; |
39 | 40 |
40 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo
cumentExtensions> { | 41 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo
cumentExtensions> { |
41 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED(SVGDocumentExtensions); | 42 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED(SVGDocumentExtensions); |
42 public: | 43 public: |
43 typedef WillBeHeapHashSet<RawPtrWillBeMember<Element>> SVGPendingElements; | 44 typedef WillBeHeapHashSet<RawPtrWillBeMember<Element>> SVGPendingElements; |
44 explicit SVGDocumentExtensions(Document*); | 45 explicit SVGDocumentExtensions(Document*); |
45 ~SVGDocumentExtensions(); | 46 ~SVGDocumentExtensions(); |
46 | 47 |
47 void addTimeContainer(SVGSVGElement*); | 48 void addTimeContainer(SVGSVGElement*); |
48 void removeTimeContainer(SVGSVGElement*); | 49 void removeTimeContainer(SVGSVGElement*); |
49 | 50 |
| 51 // Records the SVG element as having a Web Animation on an SVG attribute tha
t needs applying. |
| 52 void addWebAnimationsPendingSVGElement(SVGElement&); |
| 53 |
50 void addResource(const AtomicString& id, LayoutSVGResourceContainer*); | 54 void addResource(const AtomicString& id, LayoutSVGResourceContainer*); |
51 void removeResource(const AtomicString& id); | 55 void removeResource(const AtomicString& id); |
52 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; | 56 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; |
53 | 57 |
54 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar
tTime); | 58 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar
tTime); |
55 | 59 |
56 void startAnimations(); | 60 void startAnimations(); |
57 void pauseAnimations(); | 61 void pauseAnimations(); |
58 void dispatchSVGLoadEventToOutermostSVGElements(); | 62 void dispatchSVGLoadEventToOutermostSVGElements(); |
59 | 63 |
(...skipping 13 matching lines...) Expand all Loading... |
73 void updatePan(const FloatPoint& pos) const; | 77 void updatePan(const FloatPoint& pos) const; |
74 | 78 |
75 static SVGSVGElement* rootElement(const Document&); | 79 static SVGSVGElement* rootElement(const Document&); |
76 SVGSVGElement* rootElement() const; | 80 SVGSVGElement* rootElement() const; |
77 | 81 |
78 DECLARE_TRACE(); | 82 DECLARE_TRACE(); |
79 | 83 |
80 private: | 84 private: |
81 RawPtrWillBeMember<Document> m_document; | 85 RawPtrWillBeMember<Document> m_document; |
82 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_timeContainers; // Fo
r SVG 1.2 support this will need to be made more general. | 86 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_timeContainers; // Fo
r SVG 1.2 support this will need to be made more general. |
| 87 using SVGElementSet = WillBeHeapHashSet<RefPtrWillBeMember<SVGElement>>; |
| 88 SVGElementSet m_webAnimationsPendingSVGElements; |
83 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; | 89 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; |
84 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe
ndingResources; // Resources that are pending. | 90 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe
ndingResources; // Resources that are pending. |
85 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe
ndingResourcesForRemoval; // Resources that are pending and scheduled for remova
l. | 91 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe
ndingResourcesForRemoval; // Resources that are pending and scheduled for remova
l. |
86 SVGResourcesCache m_resourcesCache; | 92 SVGResourcesCache m_resourcesCache; |
87 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_relativeLengthSVGRoot
s; // Root SVG elements with relative length descendants. | 93 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_relativeLengthSVGRoot
s; // Root SVG elements with relative length descendants. |
88 FloatPoint m_translate; | 94 FloatPoint m_translate; |
89 #if ENABLE(ASSERT) | 95 #if ENABLE(ASSERT) |
90 bool m_inRelativeLengthSVGRootsInvalidation; | 96 bool m_inRelativeLengthSVGRootsInvalidation; |
91 #endif | 97 #endif |
92 | 98 |
(...skipping 15 matching lines...) Expand all Loading... |
108 void markPendingResourcesForRemoval(const AtomicString&); | 114 void markPendingResourcesForRemoval(const AtomicString&); |
109 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); | 115 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); |
110 | 116 |
111 private: | 117 private: |
112 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c
onst AtomicString&); | 118 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c
onst AtomicString&); |
113 }; | 119 }; |
114 | 120 |
115 } | 121 } |
116 | 122 |
117 #endif | 123 #endif |
OLD | NEW |