LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jul 2006 02:32:13 +0000 (02:32 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jul 2006 02:32:13 +0000 (02:32 +0000)
commit630f50a489e2fc71c7e783793b2939275241f003
tree2489e828b6b1d3e5227abf2790ada1319639a8b4
parentcef97f9efd142d9c6e5d3ee24368458a86dbd3b0
LayoutTests:

        Reviewed by levi

        * editing/selection/editable-non-editable-crash-expected.checksum: Added.
        * editing/selection/editable-non-editable-crash-expected.png: Added.
        * editing/selection/editable-non-editable-crash-expected.txt: Added.
        * editing/selection/editable-non-editable-crash.html: Added.
        * editing/selection/skip-non-editable-1-expected.txt:
        * editing/selection/skip-non-editable-1.html:

WebCore:

        Reviewed by levi

        Fix Mail ToDo crashers.

        * dom/Range.cpp:
        (WebCore::Range::compareBoundaryPoints): Added an ASSERT that both
        containers are non-null and an early return.
        * editing/Selection.cpp:
        (WebCore::Selection::validate): Fix a dangling start/end.
        (WebCore::Selection::adjustForEditableContent): Added an early return if
        m_start or m_end are null.
        (WebCore::Selection::isContentEditable): Use isRichlyEditablePosition.
        (WebCore::Selection::isContentRichlyEditable): Ditto.
        * editing/Selection.h:
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next): Use the new highestEditableRoot.
        (WebCore::VisiblePosition::previous): Ditto.
        * editing/htmlediting.cpp:
        (WebCore::highestEditableRoot): Takes in a position.
        (WebCore::isEditablePosition): Added.
        (WebCore::isRichlyEditablePosition): Added.
        (WebCore::rootEditableElement): Added.
        (WebCore::nextCandidate): Moved and split out from nextVisiblePosition.
        (WebCore::nextVisuallyDistinctCandidate): Ditto.
        (WebCore::previousCandidate): Moved and split out from previousVisiblePosition.
        (WebCore::previousVisuallyDistinctCandidate): Ditto.
        (WebCore::firstEditablePositionAfterPositionInRoot): Iterate over positions,
        using nextVisuallyDistinctCandidate, skipping atomic nodes that are non-editable.
        (WebCore::lastEditablePositionBeforePositionInRoot): Ditto.
        * editing/htmlediting.h:
        * editing/visible_units.cpp:
        (WebCore::startOfWord): Added a FIXME.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/editable-non-editable-crash-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/editable-non-editable-crash-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/editable-non-editable-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/editable-non-editable-crash.html [new file with mode: 0644]
LayoutTests/editing/selection/skip-non-editable-1-expected.txt
LayoutTests/editing/selection/skip-non-editable-1.html
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/dom/Range.cpp
WebCore/editing/Selection.cpp
WebCore/editing/Selection.h
WebCore/editing/VisiblePosition.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h
WebCore/editing/visible_units.cpp