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

Unified Diff: WebCore/editing/InsertLineBreakCommand.cpp

Issue 3027024: Merge 63773 - 2010-07-20 Abhishek Arya <inferno@chromium.org>... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/472/
Patch Set: Created 10 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 | « WebCore/editing/DeleteSelectionCommand.cpp ('k') | WebCore/editing/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « WebCore/editing/DeleteSelectionCommand.cpp ('k') | WebCore/editing/InsertParagraphSeparatorCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698