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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 typedef HeapHashSet<Member<Element>> SVGPendingElements; | 44 typedef HeapHashSet<Member<Element>> SVGPendingElements; |
45 explicit SVGDocumentExtensions(Document*); | 45 explicit SVGDocumentExtensions(Document*); |
46 ~SVGDocumentExtensions(); | 46 ~SVGDocumentExtensions(); |
47 | 47 |
48 void addTimeContainer(SVGSVGElement*); | 48 void addTimeContainer(SVGSVGElement*); |
49 void removeTimeContainer(SVGSVGElement*); | 49 void removeTimeContainer(SVGSVGElement*); |
50 | 50 |
51 // Records the SVG element as having a Web Animation on an SVG attribute tha
t needs applying. | 51 // Records the SVG element as having a Web Animation on an SVG attribute tha
t needs applying. |
52 void addWebAnimationsPendingSVGElement(SVGElement&); | 52 void addWebAnimationsPendingSVGElement(SVGElement&); |
53 | 53 |
54 void addResource(const AtomicString& id, LayoutSVGResourceContainer*); | |
55 void removeResource(const AtomicString& id); | |
56 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; | |
57 | |
58 static void serviceOnAnimationFrame(Document&); | 54 static void serviceOnAnimationFrame(Document&); |
59 | 55 |
60 void startAnimations(); | 56 void startAnimations(); |
61 void pauseAnimations(); | 57 void pauseAnimations(); |
62 void dispatchSVGLoadEventToOutermostSVGElements(); | 58 void dispatchSVGLoadEventToOutermostSVGElements(); |
63 | 59 |
64 void reportError(const String&); | 60 void reportError(const String&); |
65 | 61 |
66 SVGResourcesCache& resourcesCache() { return m_resourcesCache; } | 62 SVGResourcesCache& resourcesCache() { return m_resourcesCache; } |
67 | 63 |
(...skipping 10 matching lines...) Expand all Loading... |
78 static SVGSVGElement* rootElement(const Document&); | 74 static SVGSVGElement* rootElement(const Document&); |
79 SVGSVGElement* rootElement() const; | 75 SVGSVGElement* rootElement() const; |
80 | 76 |
81 DECLARE_TRACE(); | 77 DECLARE_TRACE(); |
82 | 78 |
83 private: | 79 private: |
84 Member<Document> m_document; | 80 Member<Document> m_document; |
85 HeapHashSet<Member<SVGSVGElement>> m_timeContainers; // For SVG 1.2 support
this will need to be made more general. | 81 HeapHashSet<Member<SVGSVGElement>> m_timeContainers; // For SVG 1.2 support
this will need to be made more general. |
86 using SVGElementSet = HeapHashSet<Member<SVGElement>>; | 82 using SVGElementSet = HeapHashSet<Member<SVGElement>>; |
87 SVGElementSet m_webAnimationsPendingSVGElements; | 83 SVGElementSet m_webAnimationsPendingSVGElements; |
88 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; | |
89 HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResources; //
Resources that are pending. | |
90 HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResourcesForR
emoval; // Resources that are pending and scheduled for removal. | |
91 SVGResourcesCache m_resourcesCache; | 84 SVGResourcesCache m_resourcesCache; |
92 HeapHashSet<Member<SVGSVGElement>> m_relativeLengthSVGRoots; // Root SVG ele
ments with relative length descendants. | 85 HeapHashSet<Member<SVGSVGElement>> m_relativeLengthSVGRoots; // Root SVG ele
ments with relative length descendants. |
93 FloatPoint m_translate; | 86 FloatPoint m_translate; |
94 #if ENABLE(ASSERT) | 87 #if ENABLE(ASSERT) |
95 bool m_inRelativeLengthSVGRootsInvalidation; | 88 bool m_inRelativeLengthSVGRootsInvalidation; |
96 #endif | 89 #endif |
97 | 90 |
98 public: | 91 public: |
99 // This HashMap contains a list of pending resources. Pending resources, are
such | |
100 // which are referenced by any object in the SVG document, but do NOT exist
yet. | |
101 // For instance, dynamically build gradients / patterns / clippers... | |
102 void addPendingResource(const AtomicString& id, Element*); | |
103 bool hasPendingResource(const AtomicString& id) const; | |
104 bool isElementPendingResources(Element*) const; | |
105 bool isElementPendingResource(Element*, const AtomicString& id) const; | |
106 void clearHasPendingResourcesIfPossible(Element*); | |
107 void removeElementFromPendingResources(Element*); | |
108 SVGPendingElements* removePendingResource(const AtomicString& id); | |
109 | |
110 void serviceAnimations(); | 92 void serviceAnimations(); |
111 | |
112 // The following two functions are used for scheduling a pending resource to
be removed. | |
113 void markPendingResourcesForRemoval(const AtomicString&); | |
114 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); | |
115 | |
116 private: | |
117 SVGPendingElements* removePendingResourceForRemoval(const AtomicString&); | |
118 }; | 93 }; |
119 | 94 |
120 } // namespace blink | 95 } // namespace blink |
121 | 96 |
122 #endif | 97 #endif |
OLD | NEW |