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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h

Issue 2710583005: Move SVGElement::buildPendingResourcesIfNeeded to SVGTreeScopeResources (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGTreeScopeResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698