<rdar://problem/
4110366> Deleting text at the end of email moves insertion point to the top of the document
* khtml/editing/htmlediting.cpp:
(khtml::DeleteSelectionCommand::handleGeneralDelete):
Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document.
Better to update here than trying to recover later in calculateEndingPosition().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9133
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-05-07 David Harrison <harrison@apple.com>
+
+ Reviewed by John.
+
+ <rdar://problem/4110366> Deleting text at the end of email moves insertion point to the top of the document
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::DeleteSelectionCommand::handleGeneralDelete):
+ Update m_upstreamStart when deleting m_downstreamEnd.node() if the former is no longer in the document.
+ Better to update here than trying to recover later in calculateEndingPosition().
+
2005-05-07 David Harrison <harrison@apple.com>
Remove workaround for <rdar://problem/4103339>.
// need to delete whole node
// we can get here if this is the last node in the block
// remove an ancestor of m_downstreamEnd.node(), and thus m_downstreamEnd.node() itself
- if (m_upstreamStart.node() == m_downstreamEnd.node() ||
+ if (!m_upstreamStart.node()->inDocument() ||
+ m_upstreamStart.node() == m_downstreamEnd.node() ||
m_upstreamStart.node()->isAncestor(m_downstreamEnd.node())) {
m_upstreamStart = Position(m_downstreamEnd.node()->parentNode(), m_downstreamEnd.node()->nodeIndex());
}