[webkit-changes] cvs commit: WebCore/khtml/editing delete_selection_command.cpp

David harrison at opensource.apple.com
Mon Jul 18 16:21:19 PDT 2005


harrison    05/07/18 16:21:19

  Modified:    .        ChangeLog
               khtml/editing delete_selection_command.cpp
  Log:
          Reviewed by Justin.
  
          Test cases added: None.  Existing tests were failing.
  
          Fix crash caused by my changes in revision 1.6 of khtml/editing/delete_selection_command.cpp.
  
          * khtml/editing/delete_selection_command.cpp:
          (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
          Remove workaround that was added for missing typing style.
  
          (khtml::DeleteSelectionCommand::doApply):
          Make sure to call saveTypingStyleState() before handleSpecialCaseBRDelete().
  
  Revision  Changes    Path
  1.4437    +15 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4436
  retrieving revision 1.4437
  diff -u -r1.4436 -r1.4437
  --- ChangeLog	18 Jul 2005 21:52:05 -0000	1.4436
  +++ ChangeLog	18 Jul 2005 23:21:15 -0000	1.4437
  @@ -1,3 +1,18 @@
  +2005-07-18  David Harrison  <harrison at apple.com>
  +
  +        Reviewed by Justin.
  +
  +        Test cases added: None.  Existing tests were failing.
  +
  +        Fix crash caused by my changes in revision 1.6 of khtml/editing/delete_selection_command.cpp.
  +        
  +        * khtml/editing/delete_selection_command.cpp:
  +        (khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
  +        Remove workaround that was added for missing typing style.
  +        
  +        (khtml::DeleteSelectionCommand::doApply):
  +        Make sure to call saveTypingStyleState() before handleSpecialCaseBRDelete().
  +
   2005-07-18  David Hyatt  <hyatt at apple.com>
   
   	Rename HTMLNames -> HTMLTags.  Purely mechanical (done in XCode)
  
  
  
  1.9       +10 -12    WebCore/khtml/editing/delete_selection_command.cpp
  
  Index: delete_selection_command.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/editing/delete_selection_command.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- delete_selection_command.cpp	18 Jul 2005 21:52:20 -0000	1.8
  +++ delete_selection_command.cpp	18 Jul 2005 23:21:19 -0000	1.9
  @@ -628,8 +628,6 @@
       // has completed.
       // FIXME: Improve typing style.
       // See this bug: <rdar://problem/3769899> Implementation of typing style needs improvement
  -    if (!m_typingStyle)
  -        return;
       CSSComputedStyleDeclarationImpl endingStyle(m_endingPosition.node());
       endingStyle.diff(m_typingStyle);
       if (!m_typingStyle->length()) {
  @@ -714,6 +712,16 @@
           clearTransientState();
           return;
       }
  +
  +    // if all we are deleting is complete paragraph(s), we need to make
  +    // sure a blank paragraph remains when we are done
  +    bool forceBlankParagraph = isStartOfParagraph(VisiblePosition(m_upstreamStart, VP_DEFAULT_AFFINITY)) &&
  +                               isEndOfParagraph(VisiblePosition(m_downstreamEnd, VP_DEFAULT_AFFINITY));
  +
  +    // Delete any text that may hinder our ability to fixup whitespace after the detele
  +    deleteInsignificantTextDownstream(m_trailingWhitespace);    
  +
  +    saveTypingStyleState();
       
       // deleting just a BR is handled specially, at least because we do not
       // want to replace it with a placeholder BR!
  @@ -725,16 +733,6 @@
           rebalanceWhitespace();
           return;
       }
  -
  -    // if all we are deleting is complete paragraph(s), we need to make
  -    // sure a blank paragraph remains when we are done
  -    bool forceBlankParagraph = isStartOfParagraph(VisiblePosition(m_upstreamStart, VP_DEFAULT_AFFINITY)) &&
  -                               isEndOfParagraph(VisiblePosition(m_downstreamEnd, VP_DEFAULT_AFFINITY));
  -
  -    // Delete any text that may hinder our ability to fixup whitespace after the detele
  -    deleteInsignificantTextDownstream(m_trailingWhitespace);    
  -
  -    saveTypingStyleState();
       
       insertPlaceholderForAncestorBlockContent();
       handleGeneralDelete();
  
  
  



More information about the webkit-changes mailing list