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

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

Issue 2401523002: Replace ASSERT family with DCHECK and so on in core/dom/. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DOMArrayBufferBase.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 David Smith (catfish.man@gmail.com) 3 * Copyright (C) 2007 David Smith (catfish.man@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 27 matching lines...) Expand all
38 38
39 class ClassCollection final : public HTMLCollection { 39 class ClassCollection final : public HTMLCollection {
40 public: 40 public:
41 // classNames argument is an AtomicString because it is common for Elements to 41 // classNames argument is an AtomicString because it is common for Elements to
42 // share the same class names. It is also used to construct a 42 // share the same class names. It is also used to construct a
43 // SpaceSplitString (m_classNames) and its constructor requires an 43 // SpaceSplitString (m_classNames) and its constructor requires an
44 // AtomicString. 44 // AtomicString.
45 static ClassCollection* create(ContainerNode& rootNode, 45 static ClassCollection* create(ContainerNode& rootNode,
46 CollectionType type, 46 CollectionType type,
47 const AtomicString& classNames) { 47 const AtomicString& classNames) {
48 ASSERT_UNUSED(type, type == ClassCollectionType); 48 DCHECK_EQ(type, ClassCollectionType);
49 return new ClassCollection(rootNode, classNames); 49 return new ClassCollection(rootNode, classNames);
50 } 50 }
51 51
52 ~ClassCollection() override; 52 ~ClassCollection() override;
53 53
54 bool elementMatches(const Element&) const; 54 bool elementMatches(const Element&) const;
55 55
56 private: 56 private:
57 ClassCollection(ContainerNode& rootNode, const AtomicString& classNames); 57 ClassCollection(ContainerNode& rootNode, const AtomicString& classNames);
58 58
(...skipping 11 matching lines...) Expand all
70 if (!testElement.hasClass()) 70 if (!testElement.hasClass())
71 return false; 71 return false;
72 if (!m_classNames.size()) 72 if (!m_classNames.size())
73 return false; 73 return false;
74 return testElement.classNames().containsAll(m_classNames); 74 return testElement.classNames().containsAll(m_classNames);
75 } 75 }
76 76
77 } // namespace blink 77 } // namespace blink
78 78
79 #endif // ClassCollection_h 79 #endif // ClassCollection_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/DOMArrayBufferBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698