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 1f7443b..8071659 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 06c147b..8a9d21e 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;
     }