Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 18:46:13 +0000 (18:46 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Dec 2004 18:46:13 +0000 (18:46 +0000)
commit1dce9f79bebdc844c9f06aa4de08f7cb40b5a494
tree963e2244ed9fabdbf12a5d6de3cb01b46b866b37
parentd3afadb175066b66bd3d4d78c8b40928d827b0a1
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3918351> REGRESSION (Mail, 173-175+): Return before first char of line leaves insertion point in wrong place

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorCommand::doApply): Basically, did a rewrite of this function
        to do a better job than it was doing before. Added several test cases to prove I am on a
        better track.
        * khtml/editing/visible_position.cpp:
        (khtml::isFirstVisiblePositionInBlock): Tweaked the rules a bit to fix an issue very similar to the
        leaving-the-bar-node case problem I just fixed in a recent checkin (relevant markup: <p>foo</p>bar).
        This function was returning true for the first position in "bar". Wrong. Also tightened up other
        rule: Should not report true when relationship between blocks cannot be determined.
        (khtml::isLastVisiblePositionInBlock): Tightened up rule as above: Should not report true
        when relationship between blocks cannot be determined.
        * layout-tests/editing/inserting/insert-div-010-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-010.html: Added.
        * layout-tests/editing/inserting/insert-div-011-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-011.html: Added.
        * layout-tests/editing/inserting/insert-div-012-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-012.html: Added.
        * layout-tests/editing/inserting/insert-div-013-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-013.html: Added.
        * layout-tests/editing/inserting/insert-div-014-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-014.html: Added.
        * layout-tests/editing/inserting/insert-div-015-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-015.html: Added.
        * layout-tests/editing/inserting/insert-div-016-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-016.html: Added.
        * layout-tests/editing/inserting/insert-div-017-expected.txt: Added.
        * layout-tests/editing/inserting/insert-div-017.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/editing/inserting/insert-div-010-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-010.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-011-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-011.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-012-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-012.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-013-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-013.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-014-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-014.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-015-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-015.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-016-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-016.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-017-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-017.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/visible_position.cpp