2005-03-01 Ken Kocienda <kocienda@apple.com>
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2005 17:04:57 +0000 (17:04 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2005 17:04:57 +0000 (17:04 +0000)
commit4e53139f858503930487b42edb40cf540a26339d
tree7174b3a587d941245dda35bd7fb5056fc74c7580
parent92f560a168bf530e1dda32daffc78daaf53f60a2
 2005-03-01  Ken Kocienda  <kocienda@apple.com>

        Reviewed by Maciej

        Improved fix for this bug:

        <rdar://problem/3996605> Insert paragraph command puts new block in wrong place, creating difficult-to-handle HTML

        Maciej and I discussed this situation at length, and we came up with a better fix than I did earlier.

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Simplify one special case so that it only handles the
        "last in block" situation. Remove special case for "downstream node is in different block" and handle
        this case with a little bit of special code in the general insertion case.

        Results studied to make sure there were no problems.

        * layout-tests/editing/deleting/delete-3959464-fix-expected.txt
        * layout-tests/editing/inserting/insert-div-001-expected.txt
        * layout-tests/editing/inserting/insert-div-002-expected.txt
        * layout-tests/editing/inserting/insert-div-004-expected.txt
        * layout-tests/editing/inserting/insert-div-005-expected.txt
        * layout-tests/editing/inserting/insert-div-009-expected.txt
        * layout-tests/editing/inserting/insert-div-014-expected.txt
        * layout-tests/editing/inserting/insert-div-018-expected.txt
        * layout-tests/editing/inserting/insert-div-024-expected.txt
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt
        * layout-tests/editing/pasteboard/paste-text-013-expected.txt
        * layout-tests/editing/pasteboard/paste-text-015-expected.txt
        * layout-tests/editing/style/block-style-004-expected.txt
        * layout-tests/editing/style/block-style-005-expected.txt
        * layout-tests/editing/style/block-style-006-expected.txt

        New test:

        * layout-tests/editing/inserting/insert-div-027.html
        * layout-tests/editing/inserting/insert-div-027-expected.txt

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/inserting/insert-div-027-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-027.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp