CompositeEditCommand::prune should remove subtree at once
https://bugs.webkit.org/show_bug.cgi?id=68866
Reviewed by Darin Adler.
Extracted the logic to find the highest ancestor to remove as highestNodeToRemoveInPruning from prune.
This reduces the number of node removals from O(n) to O(1) where n is the depth of the tree.
* editing/CompositeEditCommand.cpp:
(WebCore::hasARenderedDescendant): Takes excludedNode in addition to node. excludedNode is used to ignore
the child node from which we climbed up the tree in highestNodeToRemoveInPruning.
(WebCore::highestNodeToRemoveInPruning): Extracted from prune.
(WebCore::CompositeEditCommand::prune):
(WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96150
268f45cc-cd09-0410-ab3c-
d52691b4dbfc