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

Unified Diff: Source/core/editing/ReplaceSelectionCommand.cpp

Issue 16001010: Make replacing selection in heading/paragraph with heading/paragraph to work (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-11T17:06 Created 7 years, 6 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/inserting/replace-in-paragraph-001-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index 5552606ea490aa14e0dd73881ecdb3b2caa03785..6bf390d31e15950e63dfd370a0bcdfeca493367f 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -638,6 +638,9 @@ void ReplaceSelectionCommand::moveNodeOutOfAncestor(PassRefPtr<Node> prpNode, Pa
RefPtr<Node> node = prpNode;
RefPtr<Node> ancestor = prpAncestor;
+ if (!ancestor->parentNode()->rendererIsEditable())
+ return;
+
VisiblePosition positionAtEndOfNode = lastPositionInOrAfterNode(node.get());
VisiblePosition lastPositionInParagraph = lastPositionInNode(ancestor.get());
if (positionAtEndOfNode == lastPositionInParagraph) {
« no previous file with comments | « LayoutTests/editing/inserting/replace-in-paragraph-001-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698