| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |