summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DOMNamedFlowCollection.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/dom/DOMNamedFlowCollection.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/dom/DOMNamedFlowCollection.h')
-rw-r--r--Source/WebCore/dom/DOMNamedFlowCollection.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/Source/WebCore/dom/DOMNamedFlowCollection.h b/Source/WebCore/dom/DOMNamedFlowCollection.h
index 62c8ca022..bbd74a099 100644
--- a/Source/WebCore/dom/DOMNamedFlowCollection.h
+++ b/Source/WebCore/dom/DOMNamedFlowCollection.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved.
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,42 +27,41 @@
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#ifndef DOMNamedFlowCollection_h
-#define DOMNamedFlowCollection_h
-#include "NamedFlowCollection.h"
-#include <wtf/ListHashSet.h>
-#include <wtf/PassRefPtr.h>
+#pragma once
+
+#include <wtf/Forward.h>
+#include <wtf/HashSet.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
namespace WebCore {
-class Document;
class WebKitNamedFlow;
class DOMNamedFlowCollection : public RefCounted<DOMNamedFlowCollection> {
public:
- static PassRefPtr<DOMNamedFlowCollection> create(const Vector<WebKitNamedFlow*>& namedFlows)
- {
- return adoptRef(new DOMNamedFlowCollection(namedFlows));
- }
-
- unsigned long length() const;
- PassRefPtr<WebKitNamedFlow> item(unsigned long index) const;
- PassRefPtr<WebKitNamedFlow> namedItem(const AtomicString& name) const;
+ static Ref<DOMNamedFlowCollection> create(Vector<Ref<WebKitNamedFlow>>&&);
+ ~DOMNamedFlowCollection();
- bool hasNamedItem(const AtomicString& name) const;
+ unsigned length() const;
+ WebKitNamedFlow* item(unsigned index) const;
+ WebKitNamedFlow* namedItem(const AtomicString& name) const;
+ const Vector<AtomicString>& supportedPropertyNames();
private:
- struct DOMNamedFlowHashFunctions;
- struct DOMNamedFlowHashTranslator;
+ struct HashFunctions;
+
+ explicit DOMNamedFlowCollection(Vector<Ref<WebKitNamedFlow>>&&);
- typedef ListHashSet<RefPtr<WebKitNamedFlow>, 1, DOMNamedFlowHashFunctions> DOMNamedFlowSet;
- explicit DOMNamedFlowCollection(const Vector<WebKitNamedFlow*>&);
- DOMNamedFlowSet m_namedFlows;
+ const Vector<Ref<WebKitNamedFlow>> m_flows;
+ mutable HashSet<WebKitNamedFlow*, HashFunctions> m_flowsByName;
+ mutable Vector<AtomicString> m_flowNames;
};
-} // namespace WebCore
-#endif
+inline unsigned DOMNamedFlowCollection::length() const
+{
+ return m_flows.size();
+}
+} // namespace WebCore