LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2007 19:50:28 +0000 (19:50 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Mar 2007 19:50:28 +0000 (19:50 +0000)
commit0e4466f8c8b2b24f9d6bccce501763800033b4cc
treec98376e00a53d89cc284a7158e7018cc48144e32
parent0038ba57908ee062fe08564cb157f4b38d4d915e
LayoutTests:

        Reviewed by john

        <rdar://problem/5076323> Only one To Do can be created by a selection in a message

        * editing/selection/5076323-1-expected.checksum: Added.
        * editing/selection/5076323-1-expected.txt: Added.
        * editing/selection/5076323-1.html: Added.
        * editing/selection/5076323-2-expected.checksum: Added.
        * editing/selection/5076323-2-expected.txt: Added.
        * editing/selection/5076323-2.html: Added.
        * editing/selection/5076323-3-expected.checksum: Added.
        * editing/selection/5076323-3-expected.txt: Added.
        * editing/selection/5076323-3.html: Added.

WebCore:

        Reviewed by john

        <rdar://problem/5076323> Only one To Do can be created by a selection in a message

        When Mail's ToDoify operation called moveToEndOfDocument:
        with a selection that started just before a ToDo, we'd
        move them to the end of the document, not to the end
        of the editable root, because we incorrectly checked
        for the editability of positions before ToDos.  Then Mail
        would refuse to create a ToDo because the selection was
        outside of the region where they allowed editing.

        * editing/SelectionController.cpp:
        (WebCore::SelectionController::modifyExtendingRightForward):
        Check the position for editability, not the position's node,
        since there are editable positions of the form [node, offset]
        where node is contenteditable=false.
        Re-use pos.  Nothing that happens after it's created can invalidate
        it or the position and affinity used to create it.
        (WebCore::SelectionController::modifyMovingRightForward): Ditto.
        (WebCore::SelectionController::modifyExtendingLeftBackward): Ditto.
        (WebCore::SelectionController::modifyMovingLeftBackward): Ditto.
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintCaret): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/5076323-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/5076323-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/5076323-1.html [new file with mode: 0644]
LayoutTests/editing/selection/5076323-2-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/5076323-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/5076323-2.html [new file with mode: 0644]
LayoutTests/editing/selection/5076323-3-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/5076323-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/5076323-3.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/SelectionController.cpp
WebCore/rendering/RenderBlock.cpp