Reviewed by Ken Kocienda.
authorharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Nov 2004 00:35:36 +0000 (00:35 +0000)
committerharrison <harrison@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Nov 2004 00:35:36 +0000 (00:35 +0000)
        Make sure previousLineStart is non-null before calling compareBoundaryPoints.
        Treat null case as meaning no post-move merge is needed.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::initializePositionData):

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

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

index 1f7443be006da87297207ca7fe268c9aa102be46..80716594559c2edfa3326d31e44986ff3eb2c638 100644 (file)
@@ -1,6 +1,14 @@
 2004-11-17  David Harrison  <harrison@apple.com>
 
-        Reviewed by NOBODY (OOPS!).
+        Reviewed by Ken Kocienda.
+        
+        Make sure previousLineStart is non-null before calling compareBoundaryPoints.
+        Treat null case as meaning no post-move merge is needed.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::DeleteSelectionCommand::initializePositionData):
+
+2004-11-17  David Harrison  <harrison@apple.com>
         
         Added displayNode and displayTree methods for debugging.  Fixed comment typo in dispatchChildRemovalEvents.
         * khtml/xml/dom_nodeimpl.cpp:
index 06c147b7e66f87f4b1a25cbb265b4790d677e692..8a9d21e835e8465094557bd37add115ade2e8c48 100644 (file)
@@ -1476,7 +1476,7 @@ void DeleteSelectionCommand::initializePositionData()
     VisiblePosition visibleEnd(end);
     if (isFirstVisiblePositionOnLine(visibleEnd)) {
         Position previousLineStart = previousLinePosition(visibleEnd, DOWNSTREAM, 0).deepEquivalent();
-        if (RangeImpl::compareBoundaryPoints(previousLineStart, m_downstreamStart) >= 0)
+        if (previousLineStart.isNull() || RangeImpl::compareBoundaryPoints(previousLineStart, m_downstreamStart) >= 0)
             m_mergeBlocksAfterDelete = false;
     }