Chromium Code Reviews| 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 void addPendingWebAnimatedSVGElement(SVGElement&); | |
|
pdr.
2015/10/21 00:47:37
Can you add a comment here?
alancutter (OOO until 2018)
2015/10/21 04:20:42
Done.
| |
| 52 | |
| 50 void addResource(const AtomicString& id, LayoutSVGResourceContainer*); | 53 void addResource(const AtomicString& id, LayoutSVGResourceContainer*); |
| 51 void removeResource(const AtomicString& id); | 54 void removeResource(const AtomicString& id); |
| 52 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; | 55 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; |
| 53 | 56 |
| 54 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar tTime); | 57 static void serviceOnAnimationFrame(Document&, double monotonicAnimationStar tTime); |
| 55 | 58 |
| 56 void startAnimations(); | 59 void startAnimations(); |
| 57 void pauseAnimations(); | 60 void pauseAnimations(); |
| 58 void dispatchSVGLoadEventToOutermostSVGElements(); | 61 void dispatchSVGLoadEventToOutermostSVGElements(); |
| 59 | 62 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 73 void updatePan(const FloatPoint& pos) const; | 76 void updatePan(const FloatPoint& pos) const; |
| 74 | 77 |
| 75 static SVGSVGElement* rootElement(const Document&); | 78 static SVGSVGElement* rootElement(const Document&); |
| 76 SVGSVGElement* rootElement() const; | 79 SVGSVGElement* rootElement() const; |
| 77 | 80 |
| 78 DECLARE_TRACE(); | 81 DECLARE_TRACE(); |
| 79 | 82 |
| 80 private: | 83 private: |
| 81 RawPtrWillBeMember<Document> m_document; | 84 RawPtrWillBeMember<Document> m_document; |
| 82 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_timeContainers; // Fo r SVG 1.2 support this will need to be made more general. | 85 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_timeContainers; // Fo r SVG 1.2 support this will need to be made more general. |
| 86 WillBeHeapHashSet<RawPtrWillBeMember<SVGElement>> m_webAnimatedSVGElements; | |
| 83 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; | 87 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; |
| 84 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe ndingResources; // Resources that are pending. | 88 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. | 89 WillBeHeapHashMap<AtomicString, OwnPtrWillBeMember<SVGPendingElements>> m_pe ndingResourcesForRemoval; // Resources that are pending and scheduled for remova l. |
| 86 SVGResourcesCache m_resourcesCache; | 90 SVGResourcesCache m_resourcesCache; |
| 87 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_relativeLengthSVGRoot s; // Root SVG elements with relative length descendants. | 91 WillBeHeapHashSet<RawPtrWillBeMember<SVGSVGElement>> m_relativeLengthSVGRoot s; // Root SVG elements with relative length descendants. |
| 88 FloatPoint m_translate; | 92 FloatPoint m_translate; |
| 89 #if ENABLE(ASSERT) | 93 #if ENABLE(ASSERT) |
| 90 bool m_inRelativeLengthSVGRootsInvalidation; | 94 bool m_inRelativeLengthSVGRootsInvalidation; |
| 91 #endif | 95 #endif |
| 92 | 96 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 108 void markPendingResourcesForRemoval(const AtomicString&); | 112 void markPendingResourcesForRemoval(const AtomicString&); |
| 109 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); | 113 Element* removeElementFromPendingResourcesForRemoval(const AtomicString&); |
| 110 | 114 |
| 111 private: | 115 private: |
| 112 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c onst AtomicString&); | 116 PassOwnPtrWillBeRawPtr<SVGPendingElements> removePendingResourceForRemoval(c onst AtomicString&); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } | 119 } |
| 116 | 120 |
| 117 #endif | 121 #endif |
| OLD | NEW |