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

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: Review comments 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
« no previous file with comments | « Source/core/core.gyp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/TextIterator.cpp
diff --git a/Source/core/editing/TextIterator.cpp b/Source/core/editing/TextIterator.cpp
index 0898f2bae71f4423ccfdf505046a2429e77cd8fb..c888da23049d39d8c0009db256121216260de5fd 100644
--- a/Source/core/editing/TextIterator.cpp
+++ b/Source/core/editing/TextIterator.cpp
@@ -930,10 +930,11 @@ static bool shouldEmitNewlineAfterNode(Node& node)
// 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))) {
- if (next->renderer())
+ do {
+ next = NodeTraversal::nextSkippingChildren(*next);
+ if (next && next->renderer())
return true;
- }
+ } while (next);
return false;
}
« no previous file with comments | « Source/core/core.gyp ('k') | Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698