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

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-06T17:16:29 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..2c8df795520c9ce0a157f132b2ed4a1e9a7b9c56 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()->attached() && !ancestor->parentNode()->rendererIsEditable())
rniwa-cr 2013/06/11 06:32:00 Why are we checking attached()? That doesn't make
yosin_UTC9 2013/06/11 08:07:42 You're right. Remove attached() check.
+ 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