Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / html / DocumentNameCollection.h
blob43b3f7e7ab7c508cbe553043b2588d072367328d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef DocumentNameCollection_h
6 #define DocumentNameCollection_h
8 #include "core/html/HTMLElement.h"
9 #include "core/html/HTMLNameCollection.h"
11 namespace blink {
13 class DocumentNameCollection final : public HTMLNameCollection {
14 public:
15 static PassRefPtrWillBeRawPtr<DocumentNameCollection> create(ContainerNode& document, CollectionType type, const AtomicString& name)
17 ASSERT_UNUSED(type, type == DocumentNamedItems);
18 return adoptRefWillBeNoop(new DocumentNameCollection(document, name));
21 HTMLElement* item(unsigned offset) const { return toHTMLElement(HTMLNameCollection::item(offset)); }
23 bool elementMatches(const HTMLElement&) const;
25 private:
26 DocumentNameCollection(ContainerNode& document, const AtomicString& name);
29 DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collection->type() == DocumentNamedItems, collection.type() == DocumentNamedItems);
31 } // namespace blink
33 #endif // DocumentNameCollection_h