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

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

Issue 428533006: Use ContainerNode::hasChildren() instead of firstChild() in conditionals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: build fix 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/editing/DeleteSelectionCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InsertParagraphSeparatorCommand.cpp
diff --git a/Source/core/editing/InsertParagraphSeparatorCommand.cpp b/Source/core/editing/InsertParagraphSeparatorCommand.cpp
index 1e7d049356608893a50470f869abb8f11e3363e3..f5a1d5b148503d871cd48f5db5a44bcbd4da9ace 100644
--- a/Source/core/editing/InsertParagraphSeparatorCommand.cpp
+++ b/Source/core/editing/InsertParagraphSeparatorCommand.cpp
@@ -278,7 +278,7 @@ void InsertParagraphSeparatorCommand::doApply()
}
} else if (isFirstInBlock && nestNewBlock) {
// startBlock should always have children, otherwise isLastInBlock would be true and it's handled above.
- ASSERT(startBlock->firstChild());
+ ASSERT(startBlock->hasChildren());
refNode = startBlock->firstChild();
}
else if (insertionPosition.deprecatedNode() == startBlock && nestNewBlock) {
« no previous file with comments | « Source/core/editing/DeleteSelectionCommand.cpp ('k') | Source/core/editing/ReplaceSelectionCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698