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

Side by Side Diff: Source/core/dom/shadow/ComposedTreeTraversal.h

Issue 1076143002: Make ComposedTreeTraversal assert a node with Node::needsDistributionRecalc(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 private: 112 private:
113 enum TraversalDirection { 113 enum TraversalDirection {
114 TraversalDirectionForward, 114 TraversalDirectionForward,
115 TraversalDirectionBackward 115 TraversalDirectionBackward
116 }; 116 };
117 117
118 static void assertPrecondition(const Node& node) 118 static void assertPrecondition(const Node& node)
119 { 119 {
120 #if ENABLE(ASSERT) 120 #if ENABLE(ASSERT)
121 ASSERT(node.inDocument() ? !node.document().childNeedsDistributionRecalc () : !node.childNeedsDistributionRecalc()); 121 ASSERT(!node.needsDistributionRecalc());
122 ASSERT(node.canParticipateInComposedTree()); 122 ASSERT(node.canParticipateInComposedTree());
123 #endif 123 #endif
124 } 124 }
125 125
126 static void assertPostcondition(const Node* node) 126 static void assertPostcondition(const Node* node)
127 { 127 {
128 #if ENABLE(ASSERT) 128 #if ENABLE(ASSERT)
129 if (node) 129 if (node)
130 assertPrecondition(*node); 130 assertPrecondition(*node);
131 #endif 131 #endif
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 300
301 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node) 301 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node)
302 { 302 {
303 return traverseChild(node, TraversalDirectionBackward); 303 return traverseChild(node, TraversalDirectionBackward);
304 } 304 }
305 305
306 } // namespace 306 } // namespace
307 307
308 #endif 308 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698