LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Feb 2007 00:10:16 +0000 (00:10 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Feb 2007 00:10:16 +0000 (00:10 +0000)
commit9cb00a7c988179ec4b9b9042d5f3cd2d9cd97009
treef7e47aec0ca9e1fd1c8ad5c86c8e76e536ca4ec5
parent32d2f8011836d474c653689eff2c761b9576c3e6
LayoutTests:

        Reviewed by john

        <rdar://problem/5012665>
        Removing indent from list moves the caret to the line below

        No new layout tests needed because the new results
        for these tests and the removed FIXMEs cover the bug fix:
        * editing/execCommand/indent-list-item.html:
        * editing/execCommand/indent-list-item-expected.checksum:
        * editing/execCommand/indent-list-item-expected.png:
        * editing/execCommand/indent-list-item-expected.txt:
        * editing/execCommand/remove-list-1.html:
        * editing/execCommand/remove-list-1-expected.checksum:
        * editing/execCommand/remove-list-1-expected.png:
        * editing/execCommand/remove-list-1-expected.txt:

WebCore:

        Reviewed by john

        <rdar://problem/5012665>
        Removing indent from list moves the caret to the line below

        Selection preservation during indent, outdent and list
        operations uses rangeFromLocationAndLength.  Ranges returned
        by rangeFromLocationAndLength were incorrect for locations
        just before the line breaks that are emitted after blocks.
        This is because TextIterator emitted bad ranges for these line
        breaks (ranges that started and ended *after* the block).
        The fix corrects the start but not the end.  This is acceptible
        because there is code in rangeFromLocationAndLength that corrects
        the ends of runs using the start of the run and VisiblePosition
        creation.

        * editing/TextIterator.cpp:
        (WebCore::TextIterator::exitNode): Emit a position *inside*
        the block, after its contents.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/indent-list-item-expected.checksum
LayoutTests/editing/execCommand/indent-list-item-expected.png
LayoutTests/editing/execCommand/indent-list-item-expected.txt
LayoutTests/editing/execCommand/indent-list-item.html
LayoutTests/editing/execCommand/remove-list-1-expected.checksum
LayoutTests/editing/execCommand/remove-list-1-expected.png
LayoutTests/editing/execCommand/remove-list-1-expected.txt
LayoutTests/editing/execCommand/remove-list-1.html
WebCore/ChangeLog
WebCore/editing/TextIterator.cpp