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

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

Issue 14995014: Don't move uneditable style and link elements during deletion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-05-14T15:16 Created 7 years, 7 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-uneditable-style-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/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index 38d9f4429d437420ee2e6bb6caad01ad30bbe4df..868e60ab2be2dd28f78665b3d234ddd0f667b503 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -427,8 +427,10 @@ void DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPr
if ((node->hasTagName(styleTag) && !(toElement(node.get())->hasAttribute(scopedAttr))) || node->hasTagName(linkTag)) {
nextNode = NodeTraversal::nextSkippingChildren(node.get());
RefPtr<ContainerNode> rootEditableElement = node->rootEditableElement();
- removeNode(node);
- appendNode(node, rootEditableElement);
+ if (rootEditableElement.get()) {
+ removeNode(node);
+ appendNode(node, rootEditableElement);
+ }
}
node = nextNode;
}
« no previous file with comments | « LayoutTests/editing/deleting/delete-uneditable-style-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698