WebCore:
authoraliceli1 <aliceli1@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2007 23:02:33 +0000 (23:02 +0000)
committeraliceli1 <aliceli1@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Aug 2007 23:02:33 +0000 (23:02 +0000)
commit190e4a17c4956658631ffa86a6345d9fff11fff9
treef0d1174df7ee3279cea1b268887981df60dbe211
parentfc4e40b59fd853640001337c7e3aa7e0a9c6aa3e
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
LayoutTests/ChangeLog
LayoutTests/editing/deleting/deletionUI-single-instance.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/deleting/deletionUI-single-instance-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/editing/deleting/deletionUI-single-instance-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/editing/deleting/deletionUI-single-instance-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/DeleteButtonController.cpp
WebCore/editing/DeleteButtonController.h
WebCore/editing/EditCommand.cpp