Commit dff01cda authored by harrison's avatar harrison

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().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ef567166
2005-07-18 David Harrison <harrison@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@apple.com>
Rename HTMLNames -> HTMLTags. Purely mechanical (done in XCode)
......@@ -628,8 +628,6 @@ void DeleteSelectionCommand::calculateTypingStyleAfterDelete(NodeImpl *insertedP
// 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 @@ void DeleteSelectionCommand::doApply()
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 @@ void DeleteSelectionCommand::doApply()
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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment