Index: WebCore/editing/InsertLineBreakCommand.cpp |
=================================================================== |
--- WebCore/editing/InsertLineBreakCommand.cpp (revision 53679) |
+++ WebCore/editing/InsertLineBreakCommand.cpp (working copy) |
@@ -136,11 +136,8 @@ |
} else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.node()) || !pos.node()->isTextNode()) { |
insertNodeAt(nodeToInsert.get(), pos); |
setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM)); |
- } else { |
+ } else if (pos.node()->isTextNode()) { |
// Split a text node |
- ASSERT(pos.node()->isTextNode()); |
- |
- // Do the split |
Text* textNode = static_cast<Text*>(pos.node()); |
splitTextNode(textNode, pos.deprecatedEditingOffset()); |
insertNodeBefore(nodeToInsert, textNode); |