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 15 matching lines...) Expand all Loading... |
26 #include "wtf/Forward.h" | 26 #include "wtf/Forward.h" |
27 #include "wtf/HashMap.h" | 27 #include "wtf/HashMap.h" |
28 #include "wtf/HashSet.h" | 28 #include "wtf/HashSet.h" |
29 #include "wtf/text/AtomicStringHash.h" | 29 #include "wtf/text/AtomicStringHash.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 class Document; | 33 class Document; |
34 class RenderSVGResourceContainer; | 34 class RenderSVGResourceContainer; |
35 class SubtreeLayoutScope; | 35 class SubtreeLayoutScope; |
36 #if ENABLE(SVG_FONTS) | |
37 class SVGFontFaceElement; | |
38 #endif | |
39 class SVGResourcesCache; | 36 class SVGResourcesCache; |
40 class SVGSVGElement; | 37 class SVGSVGElement; |
41 class Element; | 38 class Element; |
42 | 39 |
43 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo
cumentExtensions> { | 40 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo
cumentExtensions> { |
44 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED; | 41 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE
_REMOVED; |
45 public: | 42 public: |
46 typedef WillBeHeapHashSet<RawPtrWillBeMember<Element> > SVGPendingElements; | 43 typedef WillBeHeapHashSet<RawPtrWillBeMember<Element> > SVGPendingElements; |
47 explicit SVGDocumentExtensions(Document*); | 44 explicit SVGDocumentExtensions(Document*); |
48 ~SVGDocumentExtensions(); | 45 ~SVGDocumentExtensions(); |
(...skipping 14 matching lines...) Expand all Loading... |
63 void reportWarning(const String&); | 60 void reportWarning(const String&); |
64 void reportError(const String&); | 61 void reportError(const String&); |
65 | 62 |
66 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); } | 63 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); } |
67 | 64 |
68 void addSVGRootWithRelativeLengthDescendents(SVGSVGElement*); | 65 void addSVGRootWithRelativeLengthDescendents(SVGSVGElement*); |
69 void removeSVGRootWithRelativeLengthDescendents(SVGSVGElement*); | 66 void removeSVGRootWithRelativeLengthDescendents(SVGSVGElement*); |
70 bool isSVGRootWithRelativeLengthDescendents(SVGSVGElement*) const; | 67 bool isSVGRootWithRelativeLengthDescendents(SVGSVGElement*) const; |
71 void invalidateSVGRootsWithRelativeLengthDescendents(SubtreeLayoutScope*); | 68 void invalidateSVGRootsWithRelativeLengthDescendents(SubtreeLayoutScope*); |
72 | 69 |
73 #if ENABLE(SVG_FONTS) | |
74 const WillBeHeapHashSet<RawPtrWillBeMember<SVGFontFaceElement> >& svgFontFac
eElements() const { return m_svgFontFaceElements; } | |
75 void registerSVGFontFaceElement(SVGFontFaceElement*); | |
76 void unregisterSVGFontFaceElement(SVGFontFaceElement*); | |
77 | |
78 void registerPendingSVGFontFaceElementsForRemoval(PassRefPtrWillBeRawPtr<SVG
FontFaceElement>); | |
79 void removePendingSVGFontFaceElementsForRemoval(); | |
80 #endif | |
81 | |
82 bool zoomAndPanEnabled() const; | 70 bool zoomAndPanEnabled() const; |
83 | 71 |
84 void startPan(const FloatPoint& start); | 72 void startPan(const FloatPoint& start); |
85 void updatePan(const FloatPoint& pos) const; | 73 void updatePan(const FloatPoint& pos) const; |
86 | 74 |
87 static SVGSVGElement* rootElement(const Document&); | 75 static SVGSVGElement* rootElement(const Document&); |
88 SVGSVGElement* rootElement() const; | 76 SVGSVGElement* rootElement() const; |
89 | 77 |
90 void trace(Visitor*); | 78 void trace(Visitor*); |
91 | 79 |
92 private: | 80 private: |
93 RawPtrWillBeMember<Document> m_document; | 81 RawPtrWillBeMember<Document> m_document; |
94 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_timeContainers; // F
or SVG 1.2 support this will need to be made more general. | 82 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_timeContainers; // F
or SVG 1.2 support this will need to be made more general. |
95 #if ENABLE(SVG_FONTS) | |
96 WillBeHeapHashSet<RawPtrWillBeMember<SVGFontFaceElement> > m_svgFontFaceElem
ents; | |
97 // SVGFontFaceElements that are pending and scheduled for removal. | |
98 WillBeHeapHashSet<RefPtrWillBeMember<SVGFontFaceElement> > m_pendingSVGFontF
aceElementsForRemoval; | |
99 #endif | |
100 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources; | 83 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources; |
101 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements> > m_p
endingResources; // Resources that are pending. | 84 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements> > m_p
endingResources; // Resources that are pending. |
102 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements> > m_p
endingResourcesForRemoval; // Resources that are pending and scheduled for remov
al. | 85 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements> > m_p
endingResourcesForRemoval; // Resources that are pending and scheduled for remov
al. |
103 OwnPtr<SVGResourcesCache> m_resourcesCache; | 86 OwnPtr<SVGResourcesCache> m_resourcesCache; |
104 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_relativeLengthSVGRoo
ts; // Root SVG elements with relative length descendants. | 87 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_relativeLengthSVGRoo
ts; // Root SVG elements with relative length descendants. |
105 FloatPoint m_translate; | 88 FloatPoint m_translate; |
106 #if ENABLE(ASSERT) | 89 #if ENABLE(ASSERT) |
107 bool m_inRelativeLengthSVGRootsInvalidation; | 90 bool m_inRelativeLengthSVGRootsInvalidation; |
108 #endif | 91 #endif |
109 | 92 |
(...skipping 15 matching lines...) Expand all Loading... |
125 void markPendingResourcesForRemoval(const AtomicString&); | 108 void markPendingResourcesForRemoval(const AtomicString&); |
126 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); | 109 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); |
127 | 110 |
128 private: | 111 private: |
129 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c
onst AtomicString&); | 112 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c
onst AtomicString&); |
130 }; | 113 }; |
131 | 114 |
132 } | 115 } |
133 | 116 |
134 #endif | 117 #endif |
OLD | NEW |