LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Dec 2006 23:40:35 +0000 (23:40 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Dec 2006 23:40:35 +0000 (23:40 +0000)
commitec00edf8d4847c8f1f4d5f17a037ef07d11aa4ec
tree80aef0027c93c79310fb12863569eb6389059037
parentc196d04f89734088c0c9682502d6eeb124c3481c
LayoutTests:

        Reviewed by john

        <rdar://problem/4826940>
        Selection change performed even when delete delegate replies NO (11415)

        Removed unnecessary shouldChangeSelection calls;
        * editing/deleting/delete-at-start-or-end-expected.txt:
        * editing/deleting/delete-br-002-expected.txt:
        * editing/deleting/delete-br-004-expected.txt:
        * editing/deleting/delete-br-005-expected.txt:
        * editing/deleting/delete-br-006-expected.txt:
        * editing/deleting/delete-br-009-expected.txt:
        * editing/deleting/delete-br-010-expected.txt:
        * editing/deleting/delete-br-012-expected.txt:
        * editing/deleting/delete-hr-expected.txt:
        * editing/deleting/delete-tab-004-expected.txt:
        * editing/deleting/forward-delete-expected.txt:
        * editing/deleting/merge-into-empty-block-1-expected.txt:
        * editing/deleting/merge-into-empty-block-2-expected.txt:
        * editing/execCommand/format-block-expected.txt:
        * editing/execCommand/outdent-selection-expected.txt:
        * editing/inserting/editing-empty-divs-expected.txt:
        * editing/inserting/insert-3800346-fix-expected.txt:
        * editing/inserting/insert-br-004-expected.txt:
        * editing/inserting/insert-br-005-expected.txt:
        * editing/inserting/insert-br-006-expected.txt:
        * editing/inserting/insert-br-008-expected.txt:
        * editing/inserting/insert-div-006-expected.txt:
        * editing/inserting/insert-div-008-expected.txt:
        * editing/inserting/insert-div-010-expected.txt:
        * editing/inserting/insert-div-011-expected.txt:
        * editing/inserting/insert-div-013-expected.txt:
        * editing/inserting/insert-div-015-expected.txt:
        * editing/inserting/insert-div-019-expected.txt:
        * editing/inserting/insert-div-021-expected.txt:
        * editing/inserting/insert-paragraph-01-expected.txt:
        * editing/inserting/insert-paragraph-03-expected.txt:
        * editing/inserting/insert-tab-004-expected.txt:
        * editing/inserting/insert-text-with-newlines-expected.txt:
        * editing/inserting/line-break-expected.txt:
        * editing/pasteboard/3976872-expected.txt:
        * editing/pasteboard/paste-text-005-expected.txt:
        * editing/pasteboard/paste-text-006-expected.txt:
        * editing/pasteboard/paste-text-007-expected.txt:
        * editing/pasteboard/paste-text-010-expected.txt:
        * editing/pasteboard/paste-text-014-expected.txt:
        * editing/pasteboard/paste-text-016-expected.txt:
        * editing/pasteboard/quirks-mode-br-2-expected.txt:
        * editing/style/apple-style-editable-mix-expected.txt:
        * editing/style/block-style-001-expected.txt:
        * editing/style/block-style-002-expected.txt:
        * editing/style/block-style-003-expected.txt:
        * editing/style/block-style-006-expected.txt:
        * editing/style/create-block-for-style-005-expected.txt:
        * editing/style/create-block-for-style-006-expected.txt:
        * editing/style/create-block-for-style-008-expected.txt:
        * editing/style/relative-font-size-change-002-expected.txt:
        * editing/style/relative-font-size-change-003-expected.txt:
        * editing/style/relative-font-size-change-004-expected.txt:
        * editing/style/table-selection-expected.txt:

WebCore:

        Reviewed by john

        <rdar://problem/4826940>
        Selection change performed even when delete delegate replies NO (11415)

        No layout test for the bug fix, because there's no way to register a custom
        editing delegate from a layout test.  Layout tests are effected by the change
        to avoid sending unnecessary shouldChangeSelections, however.

        * editing/Editor.cpp:
        (WebCore::Editor::appliedEditing): Don't bother sending shouldChangeSelection
        if the editing operation didn't change the selection.  Still call
        setSelection though, because it does work in this case that's necessary,
        like clearing the typing style.
        (WebCore::Editor::unappliedEditing): Ditto.
        (WebCore::Editor::reappliedEditing): Ditto.
        * editing/TypingCommand.cpp:
        (WebCore::TypingCommand::deleteKeyPressed): Don't set the starting
        selection if the editing delegate returns NO from shouldDeleteRange.
        Notice we now call setStartingSelection in the case where
        the current selection was a range selection.  This is fine because
        it's a no-op (the starting selection is already the current selection).
        (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
58 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-at-start-or-end-expected.txt
LayoutTests/editing/deleting/delete-br-002-expected.txt
LayoutTests/editing/deleting/delete-br-004-expected.txt
LayoutTests/editing/deleting/delete-br-005-expected.txt
LayoutTests/editing/deleting/delete-br-006-expected.txt
LayoutTests/editing/deleting/delete-br-009-expected.txt
LayoutTests/editing/deleting/delete-br-010-expected.txt
LayoutTests/editing/deleting/delete-br-012-expected.txt
LayoutTests/editing/deleting/delete-hr-expected.txt
LayoutTests/editing/deleting/delete-tab-004-expected.txt
LayoutTests/editing/deleting/forward-delete-expected.txt
LayoutTests/editing/deleting/merge-into-empty-block-1-expected.txt
LayoutTests/editing/deleting/merge-into-empty-block-2-expected.txt
LayoutTests/editing/execCommand/format-block-expected.txt
LayoutTests/editing/execCommand/outdent-selection-expected.txt
LayoutTests/editing/inserting/editing-empty-divs-expected.txt
LayoutTests/editing/inserting/insert-3800346-fix-expected.txt
LayoutTests/editing/inserting/insert-br-004-expected.txt
LayoutTests/editing/inserting/insert-br-005-expected.txt
LayoutTests/editing/inserting/insert-br-006-expected.txt
LayoutTests/editing/inserting/insert-br-008-expected.txt
LayoutTests/editing/inserting/insert-div-006-expected.txt
LayoutTests/editing/inserting/insert-div-008-expected.txt
LayoutTests/editing/inserting/insert-div-010-expected.txt
LayoutTests/editing/inserting/insert-div-011-expected.txt
LayoutTests/editing/inserting/insert-div-013-expected.txt
LayoutTests/editing/inserting/insert-div-015-expected.txt
LayoutTests/editing/inserting/insert-div-019-expected.txt
LayoutTests/editing/inserting/insert-div-021-expected.txt
LayoutTests/editing/inserting/insert-paragraph-01-expected.txt
LayoutTests/editing/inserting/insert-paragraph-03-expected.txt
LayoutTests/editing/inserting/insert-tab-004-expected.txt
LayoutTests/editing/inserting/insert-text-with-newlines-expected.txt
LayoutTests/editing/inserting/line-break-expected.txt
LayoutTests/editing/pasteboard/3976872-expected.txt
LayoutTests/editing/pasteboard/paste-text-005-expected.txt
LayoutTests/editing/pasteboard/paste-text-006-expected.txt
LayoutTests/editing/pasteboard/paste-text-007-expected.txt
LayoutTests/editing/pasteboard/paste-text-010-expected.txt
LayoutTests/editing/pasteboard/paste-text-014-expected.txt
LayoutTests/editing/pasteboard/paste-text-016-expected.txt
LayoutTests/editing/pasteboard/quirks-mode-br-2-expected.txt
LayoutTests/editing/style/apple-style-editable-mix-expected.txt
LayoutTests/editing/style/block-style-001-expected.txt
LayoutTests/editing/style/block-style-002-expected.txt
LayoutTests/editing/style/block-style-003-expected.txt
LayoutTests/editing/style/block-style-006-expected.txt
LayoutTests/editing/style/create-block-for-style-005-expected.txt
LayoutTests/editing/style/create-block-for-style-006-expected.txt
LayoutTests/editing/style/create-block-for-style-008-expected.txt
LayoutTests/editing/style/relative-font-size-change-002-expected.txt
LayoutTests/editing/style/relative-font-size-change-003-expected.txt
LayoutTests/editing/style/relative-font-size-change-004-expected.txt
LayoutTests/editing/style/table-selection-expected.txt
WebCore/ChangeLog
WebCore/editing/Editor.cpp
WebCore/editing/TypingCommand.cpp