| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 DocumentNameCollection_h | 5 #ifndef DocumentNameCollection_h | 
| 6 #define DocumentNameCollection_h | 6 #define DocumentNameCollection_h | 
| 7 | 7 | 
| 8 #include "HTMLNameCollection.h" | 8 #include "core/html/HTMLNameCollection.h" | 
| 9 | 9 | 
| 10 namespace WebCore { | 10 namespace WebCore { | 
| 11 | 11 | 
| 12 class DocumentNameCollection FINAL : public HTMLNameCollection { | 12 class DocumentNameCollection FINAL : public HTMLNameCollection { | 
| 13 public: | 13 public: | 
| 14     static PassRefPtrWillBeRawPtr<DocumentNameCollection> create(ContainerNode& 
    document, CollectionType type, const AtomicString& name) | 14     static PassRefPtrWillBeRawPtr<DocumentNameCollection> create(ContainerNode& 
    document, CollectionType type, const AtomicString& name) | 
| 15     { | 15     { | 
| 16         ASSERT_UNUSED(type, type == DocumentNamedItems); | 16         ASSERT_UNUSED(type, type == DocumentNamedItems); | 
| 17         return adoptRefWillBeNoop(new DocumentNameCollection(document, name)); | 17         return adoptRefWillBeNoop(new DocumentNameCollection(document, name)); | 
| 18     } | 18     } | 
| 19 | 19 | 
| 20     bool elementMatches(const Element&) const; | 20     bool elementMatches(const Element&) const; | 
| 21 | 21 | 
| 22 private: | 22 private: | 
| 23     DocumentNameCollection(ContainerNode& document, const AtomicString& name); | 23     DocumentNameCollection(ContainerNode& document, const AtomicString& name); | 
| 24 }; | 24 }; | 
| 25 | 25 | 
| 26 DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collecti
    on->type() == DocumentNamedItems, collection.type() == DocumentNamedItems); | 26 DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collecti
    on->type() == DocumentNamedItems, collection.type() == DocumentNamedItems); | 
| 27 | 27 | 
| 28 } // namespace WebCore | 28 } // namespace WebCore | 
| 29 | 29 | 
| 30 #endif // DocumentNameCollection_h | 30 #endif // DocumentNameCollection_h | 
| OLD | NEW | 
|---|