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

Side by Side Diff: third_party/WebKit/Source/core/dom/AllDescendantsCollection.h

Issue 2868823002: getElementsByTagName() should take a qualifiedName in parameter (Closed)
Patch Set: Added new file AllDescendantsCollection.h Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
tkent 2017/05/09 00:28:01 If you copied the code from the WebKit patch, you
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AllDescendantsCollection_h
6 #define AllDescendantsCollection_h
7
8 #include "core/html/HTMLCollection.h"
9
10 namespace blink {
11
12 class AllDescendantsCollection : public HTMLCollection {
13 public:
14 static AllDescendantsCollection* Create(ContainerNode& root_node,
15 CollectionType type) {
16 DCHECK_EQ(type, kAllDescendantsCollectionType);
17 return new AllDescendantsCollection(root_node,
18 kAllDescendantsCollectionType);
19 }
20
21 bool ElementMatches(const Element&) const { return true; }
22
23 protected:
tkent 2017/05/09 00:28:01 should be private?
24 AllDescendantsCollection(ContainerNode& root_node, CollectionType type)
25 : HTMLCollection(root_node, type, kDoesNotOverrideItemAfter) {}
26 };
27
28 DEFINE_TYPE_CASTS(AllDescendantsCollection,
29 LiveNodeListBase,
30 collection,
31 collection->GetType() == kAllDescendantsCollectionType,
32 collection.GetType() == kAllDescendantsCollectionType);
33
34 } // namespace blink
35
36 #endif // AllDescendantsCollection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698