LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 May 2006 02:23:27 +0000 (02:23 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 May 2006 02:23:27 +0000 (02:23 +0000)
commitba9cc26b6227d4a1fbb51c535b2d052161fc16ef
tree41af7aeda58ffc7336d65b82894d1393d3921116
parentb466561748b402fbcc6e2e163d70e902bfe542c5
LayoutTests:

        Reviewed by levi

        Added, test for the crash by focusing an editable html element and then
        inserting a tab
        * editing/selection/editable-html-element-expected.checksum: Added.
        * editing/selection/editable-html-element-expected.png: Added.
        * editing/selection/editable-html-element-expected.txt: Added.
        * editing/selection/editable-html-element.html: Added.
        Fixed:
        * editing/selection/focus_editable_html-expected.checksum:
        * editing/selection/focus_editable_html-expected.png:
        * editing/selection/focus_editable_html-expected.txt:

WebCore:

        Reviewed by levi

        <rdar://problem/4564296> Mail crashes on Leopard9A184 when I attempt to compose a new message

        * dom/Position.cpp:
        (WebCore::Position::inRenderedContent):
        Removed a candidate at [html, 0].
        * editing/CreateLinkCommand.cpp:
        (WebCore::CreateLinkCommand::doApply): Added early return when there is no selection.
        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::doApply): Ditto.
        * editing/InsertTextCommand.cpp:
        (WebCore::InsertTextCommand::input): Ditto.
        * editing/Selection.cpp:
        (WebCore::Selection::validate): If visible positions can't be created from the endpoints,
        then create a null selection.  Not doing this was making editing code think there was
        a valid, editable selection even though there wasn't.
        * editing/UnlinkCommand.cpp:
        (WebCore::UnlinkCommand::doApply): Early return.
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::initDeepPosition): Special case the html/body element boundary.
        It looks like a non-editable/editable boundary since rootEditableElement stops at the body
        even if the html element is editable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/editable-html-element-expected.checksum [new file with mode: 0644]
LayoutTests/editing/selection/editable-html-element-expected.png [new file with mode: 0644]
LayoutTests/editing/selection/editable-html-element-expected.txt [new file with mode: 0644]
LayoutTests/editing/selection/editable-html-element.html [new file with mode: 0644]
LayoutTests/editing/selection/focus_editable_html-expected.checksum
LayoutTests/editing/selection/focus_editable_html-expected.png
LayoutTests/editing/selection/focus_editable_html-expected.txt
WebCore/ChangeLog
WebCore/dom/Position.cpp
WebCore/editing/CreateLinkCommand.cpp
WebCore/editing/InsertLineBreakCommand.cpp
WebCore/editing/InsertTextCommand.cpp
WebCore/editing/Selection.cpp
WebCore/editing/UnlinkCommand.cpp
WebCore/editing/VisiblePosition.cpp