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

Unified Diff: Source/WebCore/editing/CompositeEditCommand.cpp

Issue 6588066: Merge 79536 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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 | « LayoutTests/editing/deleting/delete-blockquote-large-offsets-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/editing/CompositeEditCommand.cpp
===================================================================
--- Source/WebCore/editing/CompositeEditCommand.cpp (revision 79924)
+++ Source/WebCore/editing/CompositeEditCommand.cpp (working copy)
@@ -1098,8 +1098,8 @@
// If this is an empty paragraph there must be a line break here.
if (!lineBreakExistsAtVisiblePosition(caret))
return false;
-
- Position caretPos(caret.deepEquivalent());
+
+ Position caretPos(caret.deepEquivalent().downstream());
// A line break is either a br or a preserved newline.
ASSERT(caretPos.node()->hasTagName(brTag) || (caretPos.node()->isTextNode() && caretPos.node()->renderer()->style()->preserveNewline()));
@@ -1107,7 +1107,7 @@
Position beforeBR(positionInParentBeforeNode(caretPos.node()));
removeNode(caretPos.node());
prune(beforeBR.node());
- } else {
+ } else if (caretPos.node()->isTextNode()) {
ASSERT(caretPos.deprecatedEditingOffset() == 0);
Text* textNode = static_cast<Text*>(caretPos.node());
ContainerNode* parentNode = textNode->parentNode();
@@ -1116,7 +1116,7 @@
deleteTextFromNode(textNode, 0, 1);
prune(parentNode);
}
-
+
return true;
}
« no previous file with comments | « LayoutTests/editing/deleting/delete-blockquote-large-offsets-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698