LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2006 02:37:58 +0000 (02:37 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2006 02:37:58 +0000 (02:37 +0000)
commite3d32be6c72c4f06c223875b27f6cbf92779634e
tree47049aecbda3c2998ed9b31cd66610ccb52e59c5
parent856077144add9d671c85d39ff0f8d5c46c4c44e9
LayoutTests:

        Reviewed by harrison

        * editing/selection/drag-select-1-expected.checksum: Added.
        * editing/selection/drag-select-1-expected.png: Added.
        * editing/selection/drag-select-1-expected.txt: Added.
        * editing/selection/drag-select-1.html: Added.

WebCore:

        Reviewed by harrison

        <rdar://problem/4828264>
        In Mail, a crash occurs at WebCore::Selection::toRange() when selecting this web content (http://www.cnet.com/)

        The start of the selection is in an editable area, and the end is in an
        input field inside that editable area.  The code that should pull the end
        of such a selection outside the input field didn't escape shadow nodes,
        it would leave a dangling end, causing the crash in toRange.

        * editing/Selection.cpp:
        (WebCore::Selection::adjustForEditableContent):  Added an ASSERT and a fixup
        to prevent crashes like this in future Release builds.
        * editing/htmlediting.cpp:
        (WebCore::firstEditablePositionAfterPositionInRoot): Let this function
        escape shadow nodes.  We might eventually push this code down into
        next/previous{VisuallyDistinct}Canditate.
        (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/drag-select-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/drag-select-1-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/drag-select-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/drag-select-1.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/Selection.cpp
WebCore/editing/htmlediting.cpp