Reviewed by Ken, Richard.
<rdar://problem/
3996383> REGRESSION (Mail): Deleting all of first line also deletes line ending
Problem was the placeholder check was based on 0 height block, but the block in this
case is the BODY, which has other content even though the paragraph is gone.
* khtml/editing/htmlediting.cpp:
(khtml::CompositeEditCommand::insertBlockPlaceholder):
Now does insert instead of append!
(khtml::CompositeEditCommand::appendBlockPlaceholder):
New. Actually does append.
(khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded):
Renamed from insertBlockPlaceholderIfNeeded because it can insert or append. Also accepts "force insert" flag.
(khtml::CompositeEditCommand::removeBlockPlaceholder):
Renamed for succinctness from removeBlockPlaceholderIfNeeded.
(khtml::DeleteSelectionCommand::insertPlaceholderForAncestorBlockContent):
(khtml::DeleteSelectionCommand::moveNodesAfterNode):
Use renamed methods.
(khtml::DeleteSelectionCommand::doApply):
Use addBlockPlaceholderIfNeeded "force insert" flag if deleting whole paragraphs did not leave an empty one.
(khtml::InsertParagraphSeparatorCommand::doApply):
(khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply):
(khtml::InsertTextCommand::input):
Use renamed methods.
* khtml/editing/htmlediting.h:
Renamed and new methods per above.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8787
268f45cc-cd09-0410-ab3c-
d52691b4dbfc