OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SVGTreeScopeResources_h | 5 #ifndef SVGTreeScopeResources_h |
6 #define SVGTreeScopeResources_h | 6 #define SVGTreeScopeResources_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "wtf/Forward.h" | 9 #include "wtf/Forward.h" |
10 #include "wtf/HashMap.h" | 10 #include "wtf/HashMap.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void removeResource(const AtomicString& id); | 34 void removeResource(const AtomicString& id); |
35 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; | 35 LayoutSVGResourceContainer* resourceById(const AtomicString& id) const; |
36 | 36 |
37 // Pending resources are such which are referenced by any object in the SVG | 37 // Pending resources are such which are referenced by any object in the SVG |
38 // document, but do NOT exist yet. For instance, dynamically built gradients | 38 // document, but do NOT exist yet. For instance, dynamically built gradients |
39 // / patterns / clippers... | 39 // / patterns / clippers... |
40 void addPendingResource(const AtomicString& id, Element*); | 40 void addPendingResource(const AtomicString& id, Element*); |
41 bool hasPendingResource(const AtomicString& id) const; | 41 bool hasPendingResource(const AtomicString& id) const; |
42 bool isElementPendingResources(Element*) const; | 42 bool isElementPendingResources(Element*) const; |
43 bool isElementPendingResource(Element*, const AtomicString& id) const; | 43 bool isElementPendingResource(Element*, const AtomicString& id) const; |
| 44 void notifyResourceAvailable(const AtomicString& id); |
44 void clearHasPendingResourcesIfPossible(Element*); | 45 void clearHasPendingResourcesIfPossible(Element*); |
45 void removeElementFromPendingResources(Element*); | 46 void removeElementFromPendingResources(Element*); |
46 SVGPendingElements* removePendingResource(const AtomicString& id); | 47 SVGPendingElements* removePendingResource(const AtomicString& id); |
47 | 48 |
48 DECLARE_TRACE(); | 49 DECLARE_TRACE(); |
49 | 50 |
50 private: | 51 private: |
51 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; | 52 HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources; |
52 // Resources that are pending. | 53 // Resources that are pending. |
53 HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResources; | 54 HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResources; |
54 }; | 55 }; |
55 | 56 |
56 } // namespace blink | 57 } // namespace blink |
57 | 58 |
58 #endif // SVGTreeScopeResources_h | 59 #endif // SVGTreeScopeResources_h |
OLD | NEW |