Reviewed by Harrison
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Nov 2004 22:05:02 +0000 (22:05 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Nov 2004 22:05:02 +0000 (22:05 +0000)
        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::handleGeneralDelete): The downstream position in this function
        may need to be adjusted when deleting text off the front part of a text node. This fixes a problem
        I discovered while improving the paste command, where the insertion poitn wound up in the wrong
        place after the delete.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8081 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp

index bc4047dcd3aa561b7e160685ec002c57b63c2ad4..8c112185f489cd29c629e9e3058f65a52c28ef3f 100644 (file)
@@ -1,3 +1,13 @@
+2004-11-29  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by Harrison
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::handleGeneralDelete): The downstream position in this function 
+        may need to be adjusted when deleting text off the front part of a text node. This fixes a problem 
+        I discovered while improving the paste command, where the insertion poitn wound up in the wrong
+        place after the delete. 
+
 2004-11-29  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Harrison
index 6eae5169043b08d3397a96ba8c956b174afc679a..14d9c0152b8e525010860f4ec2ccc1efb053c1f0 100644 (file)
@@ -1678,6 +1678,7 @@ void DeleteSelectionCommand::handleGeneralDelete()
                 TextImpl *text = static_cast<TextImpl *>(m_downstreamEnd.node());
                 if (m_downstreamEnd.offset() > 0) {
                     deleteTextFromNode(text, 0, m_downstreamEnd.offset());
+                    m_downstreamEnd = Position(text, 0);
                     m_trailingWhitespaceValid = false;
                 }
             }