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

Side by Side Diff: WebCore/svg/SVGDocumentExtensions.h

Issue 3308018: Merge 66847 - 2010-09-06 Justin Schuh <jschuh@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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
« no previous file with comments | « WebCore/rendering/RenderSVGResourceContainer.cpp ('k') | WebCore/svg/SVGDocumentExtensions.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 22 matching lines...) Expand all
33 namespace WebCore { 33 namespace WebCore {
34 34
35 class Document; 35 class Document;
36 class RenderSVGResourceContainer; 36 class RenderSVGResourceContainer;
37 class SVGStyledElement; 37 class SVGStyledElement;
38 class SVGSMILElement; 38 class SVGSMILElement;
39 class SVGSVGElement; 39 class SVGSVGElement;
40 40
41 class SVGDocumentExtensions : public Noncopyable { 41 class SVGDocumentExtensions : public Noncopyable {
42 public: 42 public:
43 typedef HashSet<RefPtr<SVGStyledElement> > SVGPendingElements;
43 SVGDocumentExtensions(Document*); 44 SVGDocumentExtensions(Document*);
44 ~SVGDocumentExtensions(); 45 ~SVGDocumentExtensions();
45 46
46 void addTimeContainer(SVGSVGElement*); 47 void addTimeContainer(SVGSVGElement*);
47 void removeTimeContainer(SVGSVGElement*); 48 void removeTimeContainer(SVGSVGElement*);
48 49
49 void addResource(const AtomicString& id, RenderSVGResourceContainer*); 50 void addResource(const AtomicString& id, RenderSVGResourceContainer*);
50 void removeResource(const AtomicString& id); 51 void removeResource(const AtomicString& id);
51 RenderSVGResourceContainer* resourceById(const AtomicString& id) const; 52 RenderSVGResourceContainer* resourceById(const AtomicString& id) const;
52 53
53 void startAnimations(); 54 void startAnimations();
54 void pauseAnimations(); 55 void pauseAnimations();
55 void unpauseAnimations(); 56 void unpauseAnimations();
56 bool sampleAnimationAtTime(const String& elementId, SVGSMILElement*, double time); 57 bool sampleAnimationAtTime(const String& elementId, SVGSMILElement*, double time);
57 58
58 void reportWarning(const String&); 59 void reportWarning(const String&);
59 void reportError(const String&); 60 void reportError(const String&);
60 61
61 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); } 62 SVGResourcesCache* resourcesCache() const { return m_resourcesCache.get(); }
62 63
63 private: 64 private:
64 Document* m_document; // weak reference 65 Document* m_document; // weak reference
65 HashSet<SVGSVGElement*> m_timeContainers; // For SVG 1.2 support this will n eed to be made more general. 66 HashSet<SVGSVGElement*> m_timeContainers; // For SVG 1.2 support this will n eed to be made more general.
66 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources; 67 HashMap<AtomicString, RenderSVGResourceContainer*> m_resources;
67 HashMap<AtomicString, HashSet<SVGStyledElement*>*> m_pendingResources; 68 HashMap<AtomicString, SVGPendingElements*> m_pendingResources;
68 OwnPtr<SVGResourcesCache> m_resourcesCache; 69 OwnPtr<SVGResourcesCache> m_resourcesCache;
69 70
70 SVGDocumentExtensions(const SVGDocumentExtensions&); 71 SVGDocumentExtensions(const SVGDocumentExtensions&);
71 SVGDocumentExtensions& operator=(const SVGDocumentExtensions&); 72 SVGDocumentExtensions& operator=(const SVGDocumentExtensions&);
72 73
73 public: 74 public:
74 // This HashMap contains a list of pending resources. Pending resources, are such 75 // This HashMap contains a list of pending resources. Pending resources, are such
75 // which are referenced by any object in the SVG document, but do NOT exist yet. 76 // which are referenced by any object in the SVG document, but do NOT exist yet.
76 // For instance, dynamically build gradients / patterns / clippers... 77 // For instance, dynamically build gradients / patterns / clippers...
77 void addPendingResource(const AtomicString& id, SVGStyledElement*); 78 void addPendingResource(const AtomicString& id, PassRefPtr<SVGStyledElement> );
78 bool isPendingResource(const AtomicString& id) const; 79 bool isPendingResource(const AtomicString& id) const;
79 PassOwnPtr<HashSet<SVGStyledElement*> > removePendingResource(const AtomicSt ring& id); 80 PassOwnPtr<SVGPendingElements> removePendingResource(const AtomicString& id) ;
80 }; 81 };
81 82
82 } 83 }
83 84
84 #endif 85 #endif
85 #endif 86 #endif
OLDNEW
« no previous file with comments | « WebCore/rendering/RenderSVGResourceContainer.cpp ('k') | WebCore/svg/SVGDocumentExtensions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698