Index: Source/core/editing/ReplaceSelectionCommand.cpp |
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp |
index 984c9e076fe29414f4fb19e8cf5871a0575167d2..2e6bce9dd0bf875e3f6b2830e089b9bcd33d83aa 100644 |
--- a/Source/core/editing/ReplaceSelectionCommand.cpp |
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp |
@@ -1417,7 +1417,7 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<HTMLElement> prpList |
{ |
RefPtr<HTMLElement> listElement = prpListElement; |
- while (listElement->hasChildNodes() && isListElement(listElement->firstChild()) && listElement->childNodeCount() == 1) |
+ while (listElement->hasChildNodes() && isListElement(listElement->firstChild()) && listElement->hasOneChild()) |
listElement = toHTMLElement(listElement->firstChild()); |
bool isStart = isStartOfParagraph(insertPos); |