Index: Source/core/editing/htmlediting.cpp |
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp |
index c85b248c98c67ef98cde67c3244d9b7b31b312db..bec116e479e46d46f469d779e150e1172b2f00f4 100644 |
--- a/Source/core/editing/htmlediting.cpp |
+++ b/Source/core/editing/htmlediting.cpp |
@@ -653,13 +653,13 @@ static bool hasARenderedDescendant(Node* node, Node* excludedNode) |
return false; |
} |
-Node* highestNodeToRemoveInPruning(Node* node) |
+Node* highestNodeToRemoveInPruning(Node* node, Node* excludeNode) |
{ |
Node* previousNode = 0; |
Node* rootEditableElement = node ? node->rootEditableElement() : 0; |
for (; node; node = node->parentNode()) { |
if (RenderObject* renderer = node->renderer()) { |
- if (!renderer->canHaveChildren() || hasARenderedDescendant(node, previousNode) || rootEditableElement == node) |
+ if (!renderer->canHaveChildren() || hasARenderedDescendant(node, previousNode) || rootEditableElement == node || excludeNode == node) |
return previousNode; |
} |
previousNode = node; |