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

Unified Diff: Source/core/editing/markup.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/TypingCommand.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/markup.cpp
diff --git a/Source/core/editing/markup.cpp b/Source/core/editing/markup.cpp
index 58647b1018def31885d511f5a29f2c1161aa18ba..efb90bfbbaba741986c4f28e3b4efa0e0c18a842 100644
--- a/Source/core/editing/markup.cpp
+++ b/Source/core/editing/markup.cpp
@@ -816,7 +816,7 @@ bool isPlainTextMarkup(Node* node)
if (!isHTMLDivElement(*element) || !element->hasAttributes())
return false;
- if (element->hasOneChild() && (element->firstChild()->isTextNode() || (element->firstChild()->firstChild())))
+ if (element->hasOneChild() && (element->firstChild()->isTextNode() || element->firstChild()->hasChildren()))
return true;
return element->hasChildCount(2) && isTabSpanTextNode(element->firstChild()->firstChild()) && element->lastChild()->isTextNode();
« no previous file with comments | « Source/core/editing/TypingCommand.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698