WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2008 07:17:23 +0000 (07:17 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2008 07:17:23 +0000 (07:17 +0000)
commit966cbc9319a8ad1f6f6c27221e86fc103f4a0294
tree790563a347dcfd20d33c3f6fdbf63d390be9159e
parent2253e8f808294f0cd01eac3b2883f19598fc970a
WebCore:

        Reviewed by Darin Adler.

        <rdar://problem/5195056> Huge plain text pastes are slow

        This was fixed in r27369 and then r29367 and r29667 caused performance to
        regress.

        * editing/EditCommand.cpp:
        (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
        (WebCore::EditCommand::unapply): Ditto.
        (WebCore::EditCommand::reapply): Ditto.
        * editing/Editor.cpp:
        (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls
        that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
        (WebCore::Editor::unappliedEditing): Ditto.
        (WebCore::Editor::reappliedEditing): Ditto.
        * editing/SelectionController.cpp:
        (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
        base and extent with the expensive isCandidate operation if the node that will
        be removed is in a fragment, since such a removal is guaranteed to have no effect
        on a selection.  This is to speed up the paste operation, which does many removes from
        a fragment.

LayoutTests:

        Reviewed by Darin Adler.

        <rdar://problem/5195056> Huge plain text pastes are slow

        The changes made for this fix exposed several more cases of:
        <rdar://problem/5729315> Some shouldChangeSelectedDOMRange contain Ranges for selections that are no longer valid

        * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
        * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
        * platform/mac/editing/deleting/delete-4083333-fix-expected.txt:
        * platform/mac/editing/execCommand/find-after-replace-expected.txt:
        * platform/mac/editing/selection/move-between-blocks-no-001-expected.txt:
        * platform/mac/editing/selection/replace-selection-1-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt
LayoutTests/platform/mac/editing/deleting/delete-3608462-fix-expected.txt
LayoutTests/platform/mac/editing/deleting/delete-4083333-fix-expected.txt
LayoutTests/platform/mac/editing/execCommand/find-after-replace-expected.txt
LayoutTests/platform/mac/editing/selection/move-between-blocks-no-001-expected.txt
LayoutTests/platform/mac/editing/selection/replace-selection-1-expected.txt
WebCore/ChangeLog
WebCore/editing/EditCommand.cpp
WebCore/editing/Editor.cpp
WebCore/editing/SelectionController.cpp