From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/dom/DOMNamedFlowCollection.h | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'Source/WebCore/dom/DOMNamedFlowCollection.h') 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 -#include +#pragma once + +#include +#include #include #include namespace WebCore { -class Document; class WebKitNamedFlow; class DOMNamedFlowCollection : public RefCounted { public: - static PassRefPtr create(const Vector& namedFlows) - { - return adoptRef(new DOMNamedFlowCollection(namedFlows)); - } - - unsigned long length() const; - PassRefPtr item(unsigned long index) const; - PassRefPtr namedItem(const AtomicString& name) const; + static Ref create(Vector>&&); + ~DOMNamedFlowCollection(); - bool hasNamedItem(const AtomicString& name) const; + unsigned length() const; + WebKitNamedFlow* item(unsigned index) const; + WebKitNamedFlow* namedItem(const AtomicString& name) const; + const Vector& supportedPropertyNames(); private: - struct DOMNamedFlowHashFunctions; - struct DOMNamedFlowHashTranslator; + struct HashFunctions; + + explicit DOMNamedFlowCollection(Vector>&&); - typedef ListHashSet, 1, DOMNamedFlowHashFunctions> DOMNamedFlowSet; - explicit DOMNamedFlowCollection(const Vector&); - DOMNamedFlowSet m_namedFlows; + const Vector> m_flows; + mutable HashSet m_flowsByName; + mutable Vector m_flowNames; }; -} // namespace WebCore -#endif +inline unsigned DOMNamedFlowCollection::length() const +{ + return m_flows.size(); +} +} // namespace WebCore -- cgit v1.2.1