Reviewed by Chris
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2005 22:18:43 +0000 (22:18 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2005 22:18:43 +0000 (22:18 +0000)
commit4dcf4209c1c1ec6700c1c132e35efaa7346a1f05
treecc7b1fe109f87625984fc1ee332f1ebfd76cd6ad
parent049d28579d192b6781ac2ba090c4182c38f7c0c4
    Reviewed by Chris

        Fix for this bug:

        <rdar://problem/3986155> Insertion point goes to beginning of doc after deleting

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::setStartNode): New convenience to handle reference counting when setting.
        (khtml::DeleteSelectionCommand::handleGeneralDelete): This contains the crux of the bug fix. Improve tests
        that detect when a selected node needs to be retained, rather than deleted, to preserve the intent of the user.
        This has the side effect of causing the insertion point placement code to succeed rather than fail. Before
        this fix, the failure of the insertion point placement code caused the insertion point to jump to the start
        of the document, which is the symptom that can be perceived by users when editing.
        * khtml/editing/htmlediting.h: Add setStartNode declaration.
        * khtml/editing/visible_units.cpp:
        (khtml::startOfBlock): This function had a stubbed-in non-tested implementation. Implement and
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-001.html: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002.html: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-003.html: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-004.html: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-005.html: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt: Added.
        * layout-tests/editing/deleting/delete-at-paragraph-boundaries-006.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-001.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-002.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-003.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-004.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-005.html [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-006.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/SelectionController.cpp
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h
WebCore/khtml/editing/selection.cpp
WebCore/khtml/editing/visible_units.cpp