Chromium Code Reviews| Index: Source/core/editing/TextIterator.cpp |
| diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp |
| index 0898f2bae71f4423ccfdf505046a2429e77cd8fb..ecfd7fae27d50f92e6d6c887879fca8f4d2f8de0 100644 |
| --- a/Source/core/editing/TextIterator.cpp |
| +++ b/Source/core/editing/TextIterator.cpp |
| @@ -929,8 +929,7 @@ static bool shouldEmitNewlineAfterNode(Node& node) |
| return false; |
| // Check if this is the very last renderer in the document. |
| // If so, then we should not emit a newline. |
| - Node* next = &node; |
| - while ((next = NodeTraversal::nextSkippingChildren(*next))) { |
| + for (Node* next = NodeTraversal::nextSkippingChildren(node); next; next = NodeTraversal::nextSkippingChildren(*next)) { |
|
dmazzoni
2014/07/16 21:21:16
To me, duplicating NodeTraversal::nextSkippingChil
Peter Kasting
2014/07/16 23:06:58
I really find this significantly less readable tha
|
| if (next->renderer()) |
| return true; |
| } |