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

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

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 static Node& lastWithinOrSelf(const Node&); 118 static Node& lastWithinOrSelf(const Node&);
119 119
120 private: 120 private:
121 enum TraversalDirection { 121 enum TraversalDirection {
122 TraversalDirectionForward, 122 TraversalDirectionForward,
123 TraversalDirectionBackward 123 TraversalDirectionBackward
124 }; 124 };
125 125
126 static void assertPrecondition(const Node& node) 126 static void assertPrecondition(const Node& node)
127 { 127 {
128 #if ENABLE(ASSERT) 128 #if DCHECK_IS_ON()
129 ASSERT(!node.needsDistributionRecalc()); 129 DCHECK(!node.needsDistributionRecalc());
130 ASSERT(node.canParticipateInFlatTree()); 130 DCHECK(node.canParticipateInFlatTree());
131 #endif 131 #endif
132 } 132 }
133 133
134 static void assertPostcondition(const Node* node) 134 static void assertPostcondition(const Node* node)
135 { 135 {
136 #if ENABLE(ASSERT) 136 #if DCHECK_IS_ON()
137 if (node) 137 if (node)
138 assertPrecondition(*node); 138 assertPrecondition(*node);
139 #endif 139 #endif
140 } 140 }
141 141
142 static Node* resolveDistributionStartingAt(const Node*, TraversalDirection); 142 static Node* resolveDistributionStartingAt(const Node*, TraversalDirection);
143 static Node* v0ResolveDistributionStartingAt(const Node&, TraversalDirection ); 143 static Node* v0ResolveDistributionStartingAt(const Node&, TraversalDirection );
144 144
145 static Node* traverseNext(const Node&); 145 static Node* traverseNext(const Node&);
146 static Node* traverseNext(const Node&, const Node* stayWithin); 146 static Node* traverseNext(const Node&, const Node* stayWithin);
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 305 }
306 306
307 inline Node* FlatTreeTraversal::traverseLastChild(const Node& node) 307 inline Node* FlatTreeTraversal::traverseLastChild(const Node& node)
308 { 308 {
309 return traverseChild(node, TraversalDirectionBackward); 309 return traverseChild(node, TraversalDirectionBackward);
310 } 310 }
311 311
312 } // namespace blink 312 } // namespace blink
313 313
314 #endif 314 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698