LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jul 2006 20:01:56 +0000 (20:01 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jul 2006 20:01:56 +0000 (20:01 +0000)
commit01ffdfff431c313aa2bf3f4443690b7ec9021352
treed34f8fb2013807e16a6f4da2cb7d8ade76c49091
parent83f5eae37bdb213f9441d5caf609e9f4b873e264
LayoutTests:

        Reviewed by levi

        <rdar://problem/4628409>
        Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form

        * fast/forms/4628409-expected.txt: Added.
        * fast/forms/4628409.html: Added.

WebCore:

        Reviewed by levi

        <rdar://problem/4628409>
        Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::removeBlockPlaceholder):
        A script on the page shrinks the textarea down to zero rows just
        before insertion.  That gives the shadow div a zero height, removing
        [div, 0] as a candidate for a VisiblePosition.  Then
        InsertTextCommand::input() tries to create a VisiblePosition from
        [div, 0] and fails.  A nil check is a quick fix.  Another might
        be to make positions where there is a caret selection candidates.
        Another might be to make any [div, 0] where div is a shadow div inside
        a form element a candidate.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/4628409-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/4628409.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp