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

Unified Diff: Source/core/editing/SimplifyMarkupCommand.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/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SimplifyMarkupCommand.cpp
diff --git a/Source/core/editing/SimplifyMarkupCommand.cpp b/Source/core/editing/SimplifyMarkupCommand.cpp
index 976ef726d91fae64849a6f43eaea46800fa3b2f7..8379318b300b6c9ac6422cb22f90b4fdb48db01d 100644
--- a/Source/core/editing/SimplifyMarkupCommand.cpp
+++ b/Source/core/editing/SimplifyMarkupCommand.cpp
@@ -49,7 +49,7 @@ void SimplifyMarkupCommand::doApply()
// from a verbose fragment.
// We look at inline elements as well as non top level divs that don't have attributes.
for (Node* node = m_firstNode.get(); node && node != m_nodeAfterLast; node = NodeTraversal::next(*node)) {
- if (node->firstChild() || (node->isTextNode() && node->nextSibling()))
+ if (node->hasChildren() || (node->isTextNode() && node->nextSibling()))
continue;
Node* startingNode = node->parentNode();
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/SpellChecker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698