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

Unified Diff: third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h

Issue 2705163008: Cleanup the SVGTreeScopeResources interface (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h
diff --git a/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h b/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h
index c5a54a220ad5f5f930f7768308d3593ff1080289..8b9c003a6db7dcd6b9f7dd57487c347fe728d987 100644
--- a/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h
+++ b/third_party/WebKit/Source/core/svg/SVGTreeScopeResources.h
@@ -25,8 +25,6 @@ class SVGTreeScopeResources
WTF_MAKE_NONCOPYABLE(SVGTreeScopeResources);
public:
- typedef HeapHashSet<Member<Element>> SVGPendingElements;
-
explicit SVGTreeScopeResources(TreeScope*);
~SVGTreeScopeResources();
@@ -37,18 +35,18 @@ class SVGTreeScopeResources
// Pending resources are such which are referenced by any object in the SVG
// document, but do NOT exist yet. For instance, dynamically built gradients
// / patterns / clippers...
- void addPendingResource(const AtomicString& id, Element*);
- bool hasPendingResource(const AtomicString& id) const;
- bool isElementPendingResources(Element*) const;
- bool isElementPendingResource(Element*, const AtomicString& id) const;
+ void addPendingResource(const AtomicString& id, Element&);
+ bool isElementPendingResource(Element&, const AtomicString& id) const;
void notifyResourceAvailable(const AtomicString& id);
- void clearHasPendingResourcesIfPossible(Element*);
- void removeElementFromPendingResources(Element*);
- SVGPendingElements* removePendingResource(const AtomicString& id);
+ void removeElementFromPendingResources(Element&);
DECLARE_TRACE();
private:
+ void clearHasPendingResourcesIfPossible(Element&);
+
+ using SVGPendingElements = HeapHashSet<Member<Element>>;
+
HashMap<AtomicString, LayoutSVGResourceContainer*> m_resources;
// Resources that are pending.
HeapHashMap<AtomicString, Member<SVGPendingElements>> m_pendingResources;

Powered by Google App Engine
This is Rietveld 408576698