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

Unified Diff: Source/core/editing/TextIterator.cpp

Issue 383153007: Fixes for re-enabling more MSVC level 4 warnings: Source/core/ edition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Delete temp file Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698