WebCore:
Reviewed by Tim Hatcher.
Fixed <rdar://problem/
5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() after dropping a selected image over container's close box
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
Factored out the code in ::show() that created and styled the elements of the Deletion UI
(WebCore::DeleteButtonController::createDeletionUI):
Neglecting to move the append of the deletionUI elements into the same clause that handles the creation
of them ended up creating multiple elements at were repeatedly appended to the target, resulting in a
bloated table deletion UI which was slow to show and hide.
* editing/DeleteButtonController.h:
(WebCore::DeleteButtonController::enabled):
Restore this function to how it used to be pre-r25305, sans asserts
* editing/EditCommand.cpp:
Add disable/enable sandwich when undoing/redoing commands too
(WebCore::EditCommand::unapply):
(WebCore::EditCommand::reapply):
LayoutTests:
Reviewed by Tim Hatcher.
Test for <rdar://problem/
5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() after dropping a selected image over container's close box
* editing/deleting/deletionUI-single-instance.html: Added.
* platform/mac/editing/deleting/deletionUI-single-instance-expected.checksum: Added.
* platform/mac/editing/deleting/deletionUI-single-instance-expected.png: Added.
* platform/mac/editing/deleting/deletionUI-single-instance-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25335
268f45cc-cd09-0410-ab3c-
d52691b4dbfc