summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/editing/CompositeEditCommand.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-04-12 14:37:38 +0100
committerSteve Block <steveblock@google.com>2012-04-12 17:45:11 +0100
commit1da40458db9c373f30030565f5e2087f21683e0e (patch)
treee086fc546579c1f068caf819b5fd0c3c492012bb /Source/WebCore/editing/CompositeEditCommand.cpp
parent27621ca63c064d1a1d6af6373c2c9f7018e19861 (diff)
downloadexternal_webkit-1da40458db9c373f30030565f5e2087f21683e0e.zip
external_webkit-1da40458db9c373f30030565f5e2087f21683e0e.tar.gz
external_webkit-1da40458db9c373f30030565f5e2087f21683e0e.tar.bz2
Cherry-pick WebKit change r94841 to fix a LayoutTest crash
editing/execCommand/ident-crashes-topnode-is-text.html See http://trac.webkit.org/changeset/94841 Bug: 6329306 Change-Id: Ic27f31beae3b390a4aba1797c13c8d36422911f5
Diffstat (limited to 'Source/WebCore/editing/CompositeEditCommand.cpp')
-rw-r--r--Source/WebCore/editing/CompositeEditCommand.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/WebCore/editing/CompositeEditCommand.cpp b/Source/WebCore/editing/CompositeEditCommand.cpp
index cf2959a..bf515d7 100644
--- a/Source/WebCore/editing/CompositeEditCommand.cpp
+++ b/Source/WebCore/editing/CompositeEditCommand.cpp
@@ -781,7 +781,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(Position& start, Positi
appendNode(topNode, blockElement);
RefPtr<Node> lastNode = topNode;
- if (start.deprecatedNode() != outerNode) {
+ if (start.deprecatedNode() != outerNode && lastNode->isElementNode()) {
Vector<RefPtr<Node> > ancestors;
// Insert each node from innerNode to outerNode (excluded) in a list.