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

Side by Side Diff: Source/core/svg/SVGDocumentExtensions.h

Issue 327473002: Prepare SVGDocumentExtensions::m_elementDependencies for oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix comment Created 6 years, 6 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 | Annotate | Revision Log
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, 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 24 matching lines...) Expand all
35 class SubtreeLayoutScope; 35 class SubtreeLayoutScope;
36 class SVGElement; 36 class SVGElement;
37 #if ENABLE(SVG_FONTS) 37 #if ENABLE(SVG_FONTS)
38 class SVGFontFaceElement; 38 class SVGFontFaceElement;
39 #endif 39 #endif
40 class SVGResourcesCache; 40 class SVGResourcesCache;
41 class SVGSMILElement; 41 class SVGSMILElement;
42 class SVGSVGElement; 42 class SVGSVGElement;
43 class Element; 43 class Element;
44 44
45 typedef WillBeHeapHashSet<RawPtrWillBeMember<SVGElement> > SVGElementSet;
46
45 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo cumentExtensions> { 47 class SVGDocumentExtensions : public NoBaseWillBeGarbageCollectedFinalized<SVGDo cumentExtensions> {
46 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE _REMOVED; 48 WTF_MAKE_NONCOPYABLE(SVGDocumentExtensions); WTF_MAKE_FAST_ALLOCATED_WILL_BE _REMOVED;
47 public: 49 public:
48 typedef HashSet<Element*> SVGPendingElements; 50 typedef HashSet<Element*> SVGPendingElements;
49 explicit SVGDocumentExtensions(Document*); 51 explicit SVGDocumentExtensions(Document*);
50 ~SVGDocumentExtensions(); 52 ~SVGDocumentExtensions();
51 53
52 void addTimeContainer(SVGSVGElement*); 54 void addTimeContainer(SVGSVGElement*);
53 void removeTimeContainer(SVGSVGElement*); 55 void removeTimeContainer(SVGSVGElement*);
54 56
55 void addResource(const AtomicString& id, RenderSVGResourceContainer*); 57 void addResource(const AtomicString& id, RenderSVGResourceContainer*);
56 void removeResource(const AtomicString& id); 58 void removeResource(const AtomicString& id);
57 RenderSVGResourceContainer* resourceById(const AtomicString& id) const; 59 RenderSVGResourceContainer* resourceById(const AtomicString& id) const;
58 60
59 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar tTime); 61 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar tTime);
60 62
61 void startAnimations(); 63 void startAnimations();
62 void pauseAnimations(); 64 void pauseAnimations();
63 void dispatchSVGLoadEventToOutermostSVGElements(); 65 void dispatchSVGLoadEventToOutermostSVGElements();
64 66
65 void reportWarning(const String&); 67 void reportWarning(const String&);
66 void reportError(const String&); 68 void reportError(const String&);
67 69
68 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); } 70 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); }
69 71
70 HashSet<SVGElement*>* setOfElementsReferencingTarget(SVGElement* referencedE lement) const; 72 SVGElementSet* setOfElementsReferencingTarget(SVGElement* referencedElement) const;
71 void addElementReferencingTarget(SVGElement* referencingElement, SVGElement* referencedElement); 73 void addElementReferencingTarget(SVGElement* referencingElement, SVGElement* referencedElement);
72 void removeAllTargetReferencesForElement(SVGElement*); 74 void removeAllTargetReferencesForElement(SVGElement*);
73 void rebuildAllElementReferencesForTarget(SVGElement*); 75 void rebuildAllElementReferencesForTarget(SVGElement*);
74 void removeAllElementReferencesForTarget(SVGElement*); 76 void removeAllElementReferencesForTarget(SVGElement*);
75 77
76 void addSVGRootWithRelativeLengthDescendents(SVGSVGElement*); 78 void addSVGRootWithRelativeLengthDescendents(SVGSVGElement*);
77 void removeSVGRootWithRelativeLengthDescendents(SVGSVGElement*); 79 void removeSVGRootWithRelativeLengthDescendents(SVGSVGElement*);
78 bool isSVGRootWithRelativeLengthDescendents(SVGSVGElement*) const; 80 bool isSVGRootWithRelativeLengthDescendents(SVGSVGElement*) const;
79 void invalidateSVGRootsWithRelativeLengthDescendents(SubtreeLayoutScope*); 81 void invalidateSVGRootsWithRelativeLengthDescendents(SubtreeLayoutScope*);
80 82
(...skipping 10 matching lines...) Expand all
91 93
92 void startPan(const FloatPoint& start); 94 void startPan(const FloatPoint& start);
93 void updatePan(const FloatPoint& pos) const; 95 void updatePan(const FloatPoint& pos) const;
94 96
95 static SVGSVGElement* rootElement(const Document&); 97 static SVGSVGElement* rootElement(const Document&);
96 SVGSVGElement* rootElement() const; 98 SVGSVGElement* rootElement() const;
97 99
98 void trace(Visitor*); 100 void trace(Visitor*);
99 101
100 private: 102 private:
101 Document* m_document; // weak reference 103 RawPtrWillBeMember<Document> m_document;
102 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_timeContainers; // F or SVG 1.2 support this will need to be made more general. 104 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement> > m_timeContainers; // F or SVG 1.2 support this will need to be made more general.
103 #if ENABLE(SVG_FONTS) 105 #if ENABLE(SVG_FONTS)
104 WillBeHeapHashSet<RawPtrWillBeMember<SVGFontFaceElement> > m_svgFontFaceElem ents; 106 WillBeHeapHashSet<RawPtrWillBeMember<SVGFontFaceElement> > m_svgFontFaceElem ents;
105 // SVGFontFaceElements that are pending and scheduled for removal. 107 // SVGFontFaceElements that are pending and scheduled for removal.
106 WillBeHeapHashSet<RefPtrWillBeMember<SVGFontFaceElement> > m_pendingSVGFontF aceElementsForRemoval; 108 WillBeHeapHashSet<RefPtrWillBeMember<SVGFontFaceElement> > m_pendingSVGFontF aceElementsForRemoval;
107 #endif 109 #endif
108 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources; 110 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources;
109 HashMap<AtomicString, OwnPtr<SVGPendingElements> > m_pendingResources; // Re sources that are pending. 111 HashMap<AtomicString, OwnPtr<SVGPendingElements> > m_pendingResources; // Re sources that are pending.
110 HashMap<AtomicString, OwnPtr<SVGPendingElements> > m_pendingResourcesForRemo val; // Resources that are pending and scheduled for removal. 112 HashMap<AtomicString, OwnPtr<SVGPendingElements> > m_pendingResourcesForRemo val; // Resources that are pending and scheduled for removal.
111 HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > > m_elementDependencies; 113 typedef WillBeHeapHashMap<RawPtrWillBeMember<SVGElement>, OwnPtrWillBeMember <SVGElementSet> > ElementDependenciesMap;
114 OwnPtrWillBeMember<ElementDependenciesMap> m_elementDependencies;
haraken 2014/06/10 08:48:19 I wonder why you need to make this an OwnPtrWillBe
kouhei (in TOK) 2014/06/10 08:58:59 Done.
112 OwnPtr<SVGResourcesCache> m_resourcesCache; 115 OwnPtr<SVGResourcesCache> m_resourcesCache;
116
117 // FIXME: Oilpan: make below HeapHashSet<WeakMember<SVGSVGElement> >
haraken 2014/06/10 08:48:19 I don't fully understand why this needs to be weak
kouhei (in TOK) 2014/06/10 08:58:59 This change was made in https://codereview.chromiu
113 HashSet<SVGSVGElement*> m_relativeLengthSVGRoots; // Root SVG elements with relative length descendants. 118 HashSet<SVGSVGElement*> m_relativeLengthSVGRoots; // Root SVG elements with relative length descendants.
114 FloatPoint m_translate; 119 FloatPoint m_translate;
115 #if !ASSERT_DISABLED 120 #if !ASSERT_DISABLED
116 bool m_inRelativeLengthSVGRootsInvalidation; 121 bool m_inRelativeLengthSVGRootsInvalidation;
117 #endif 122 #endif
118 123
119 public: 124 public:
120 // This HashMap contains a list of pending resources. Pending resources, are such 125 // This HashMap contains a list of pending resources. Pending resources, are such
121 // which are referenced by any object in the SVG document, but do NOT exist yet. 126 // which are referenced by any object in the SVG document, but do NOT exist yet.
122 // For instance, dynamically build gradients / patterns / clippers... 127 // For instance, dynamically build gradients / patterns / clippers...
(...skipping 11 matching lines...) Expand all
134 void markPendingResourcesForRemoval(const AtomicString&); 139 void markPendingResourcesForRemoval(const AtomicString&);
135 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); 140 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&);
136 141
137 private: 142 private:
138 PassOwnPtr<SVGPendingElements> removePendingResourceForRemoval(const AtomicS tring&); 143 PassOwnPtr<SVGPendingElements> removePendingResourceForRemoval(const AtomicS tring&);
139 }; 144 };
140 145
141 } 146 }
142 147
143 #endif 148 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResource.cpp ('k') | Source/core/svg/SVGDocumentExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698