LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 02:13:04 +0000 (02:13 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Jul 2006 02:13:04 +0000 (02:13 +0000)
commit1dca9ab10907c139fad81bf498dcc994def0d139
tree81965d9feed6c5e35a225d63ed2502d2656134c0
parentb697bb4674d3fb2e18d1dbfde38e101ccef58235
LayoutTests:

        Reviewed by levi

        <rdar://problem/4609184>
        Mail crashes at WebCore::Selection::adjustForEditableContent
        <rdar://problem/4609140>
        Crash at WebCore::Range::compareBoundaryPoints

        * editing/selection/mixed-editability-1-expected.checksum: Added.
        * editing/selection/mixed-editability-1-expected.png: Added.
        * editing/selection/mixed-editability-1-expected.txt: Added.
        * editing/selection/mixed-editability-1.html: Added.
        * editing/selection/mixed-editability-2-expected.checksum: Added.
        * editing/selection/mixed-editability-2-expected.png: Added.
        * editing/selection/mixed-editability-2-expected.txt: Added.
        * editing/selection/mixed-editability-2.html: Added.

WebCore:

        Reviewed by levi

        <rdar://problem/4609184>
        Mail crashes at WebCore::Selection::adjustForEditableContent
        <rdar://problem/4609140>
        Crash at WebCore::Range::compareBoundaryPoints

        * editing/Selection.cpp:
        (WebCore::Selection::adjustForEditableContent):
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next): Moved code into a helper function.
        (WebCore::VisiblePosition::previous): Ditto.
        * editing/htmlediting.cpp:
        (WebCore::comparePositions): Moved from Selection.cpp.
        (WebCore::lowestEditableAncestor): Added.  Returns rootEditableElement
        for a node in editable content and the rootEditableElement for the first
        ancestor that's editable for a node in non-editable content.
        (WebCore::firstEditablePositionAfterPositionInRoot):
        (WebCore::lastEditablePositionBeforePositionInRoot):
        * editing/htmlediting.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/mixed-editability-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-1-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-1.html [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-2-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-2-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/mixed-editability-2.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/Selection.cpp
WebCore/editing/VisiblePosition.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h