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

Side by Side Diff: third_party/WebKit/Source/core/html/DocumentNameCollection.h

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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
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 "core/html/HTMLElement.h" 8 #include "core/html/HTMLElement.h"
9 #include "core/html/HTMLNameCollection.h" 9 #include "core/html/HTMLNameCollection.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class DocumentNameCollection final : public HTMLNameCollection { 13 class DocumentNameCollection final : public HTMLNameCollection {
14 public: 14 public:
15 static DocumentNameCollection* create(ContainerNode& document, CollectionTyp e type, const AtomicString& name) 15 static DocumentNameCollection* create(ContainerNode& document, CollectionTyp e type, const AtomicString& name)
16 { 16 {
17 ASSERT_UNUSED(type, type == DocumentNamedItems); 17 DCHECK_EQ(type, DocumentNamedItems);
18 return new DocumentNameCollection(document, name); 18 return new DocumentNameCollection(document, name);
19 } 19 }
20 20
21 HTMLElement* item(unsigned offset) const { return toHTMLElement(HTMLNameColl ection::item(offset)); } 21 HTMLElement* item(unsigned offset) const { return toHTMLElement(HTMLNameColl ection::item(offset)); }
22 22
23 bool elementMatches(const HTMLElement&) const; 23 bool elementMatches(const HTMLElement&) const;
24 24
25 private: 25 private:
26 DocumentNameCollection(ContainerNode& document, const AtomicString& name); 26 DocumentNameCollection(ContainerNode& document, const AtomicString& name);
27 }; 27 };
28 28
29 DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collecti on->type() == DocumentNamedItems, collection.type() == DocumentNamedItems); 29 DEFINE_TYPE_CASTS(DocumentNameCollection, LiveNodeListBase, collection, collecti on->type() == DocumentNamedItems, collection.type() == DocumentNamedItems);
30 30
31 } // namespace blink 31 } // namespace blink
32 32
33 #endif // DocumentNameCollection_h 33 #endif // DocumentNameCollection_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698