Chromium Code Reviews| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 static Node* LastWithin(const Node&); | 118 static Node* LastWithin(const Node&); |
| 119 static Node& LastWithinOrSelf(const Node&); | 119 static Node& LastWithinOrSelf(const Node&); |
| 120 | 120 |
| 121 private: | 121 private: |
| 122 enum TraversalDirection { | 122 enum TraversalDirection { |
| 123 kTraversalDirectionForward, | 123 kTraversalDirectionForward, |
| 124 kTraversalDirectionBackward | 124 kTraversalDirectionBackward |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 static void AssertPrecondition(const Node& node) { | 127 static void AssertPrecondition(const Node& node) { |
| 128 DCHECK(!node.NeedsDistributionRecalc()); | 128 if (node.NeedsDistributionRecalc()) { |
| 129 LOG(INFO) << node << " needs recalc"; | |
|
esprehn
2017/05/12 21:16:54
This is called all over the place, you're making t
aboxhall
2017/05/18 01:30:49
Done.
| |
| 130 DCHECK(!node.NeedsDistributionRecalc()); | |
|
esprehn
2017/05/12 21:16:54
Revert this change to just DCHECK.
aboxhall
2017/05/18 01:30:49
Done.
| |
| 131 } | |
| 129 DCHECK(node.CanParticipateInFlatTree()); | 132 DCHECK(node.CanParticipateInFlatTree()); |
| 130 } | 133 } |
| 131 | 134 |
| 132 static void AssertPostcondition(const Node* node) { | 135 static void AssertPostcondition(const Node* node) { |
| 133 #if DCHECK_IS_ON() | 136 #if DCHECK_IS_ON() |
| 134 if (node) | 137 if (node) |
| 135 AssertPrecondition(*node); | 138 AssertPrecondition(*node); |
| 136 #endif | 139 #endif |
| 137 } | 140 } |
| 138 | 141 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 return TraverseChild(node, kTraversalDirectionForward); | 299 return TraverseChild(node, kTraversalDirectionForward); |
| 297 } | 300 } |
| 298 | 301 |
| 299 inline Node* FlatTreeTraversal::TraverseLastChild(const Node& node) { | 302 inline Node* FlatTreeTraversal::TraverseLastChild(const Node& node) { |
| 300 return TraverseChild(node, kTraversalDirectionBackward); | 303 return TraverseChild(node, kTraversalDirectionBackward); |
| 301 } | 304 } |
| 302 | 305 |
| 303 } // namespace blink | 306 } // namespace blink |
| 304 | 307 |
| 305 #endif | 308 #endif |
| OLD | NEW |