[webkit-changes] cvs commit: WebCore/khtml/editing htmlediting.cpp
Timothy
thatcher at opensource.apple.com
Fri Oct 21 20:06:23 PDT 2005
thatcher 05/10/21 20:06:22
Modified: . Tag: Safari-Den-branch ChangeLog
khtml/editing Tag: Safari-Den-branch htmlediting.cpp
Log:
Reviewed by Justin Garcia.
If node is an ancestor of refNode, use the highest non-common ancestor instead
(otherwise we would be trying to append refNode's ancestor after refNode)
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::moveNodesAfterNode):
Revision Changes Path
No revision
No revision
1.1.2.23.2.13 +10 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.1.2.23.2.12
retrieving revision 1.1.2.23.2.13
diff -u -r1.1.2.23.2.12 -r1.1.2.23.2.13
--- ChangeLog 19 Oct 2005 19:30:41 -0000 1.1.2.23.2.12
+++ ChangeLog 22 Oct 2005 03:06:15 -0000 1.1.2.23.2.13
@@ -1,3 +1,13 @@
+2005-10-21 Dave Harrison <harrison at apple.com>
+
+ Reviewed by Justin Garcia.
+
+ If node is an ancestor of refNode, use the highest non-common ancestor instead
+ (otherwise we would be trying to append refNode's ancestor after refNode)
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::DeleteSelectionCommand::moveNodesAfterNode):
+
=== WebCore-416.12 ===
2005-10-19 Adele Peterson <adele at apple.com>
No revision
No revision
1.228.8.10.2.1 +5 -0 WebCore/khtml/editing/htmlediting.cpp
Index: htmlediting.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/editing/htmlediting.cpp,v
retrieving revision 1.228.8.10
retrieving revision 1.228.8.10.2.1
diff -u -r1.228.8.10 -r1.228.8.10.2.1
--- htmlediting.cpp 27 Aug 2005 17:10:26 -0000 1.228.8.10
+++ htmlediting.cpp 22 Oct 2005 03:06:20 -0000 1.228.8.10.2.1
@@ -3010,6 +3010,11 @@
// Insert after the subtree containing destNode
NodeImpl *refNode = dstNode->enclosingInlineElement();
+ // If node is an ancestor of refNode, use the highest non-common ancestor instead
+ // (otherwise we would be trying to append refNode's ancestor after refNode)
+ if (refNode->isAncestor(node))
+ for (node = startNode; !refNode->isAncestor(node->parent()); node = node->parent());
+
// Nothing to do if start is already at the beginning of dstBlock
NodeImpl *dstBlock = refNode->enclosingBlockFlowElement();
if (startBlock == dstBlock->firstChild())
More information about the webkit-changes
mailing list