WebCore:
authorsullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 21:32:18 +0000 (21:32 +0000)
committersullivan@apple.com <sullivan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2008 21:32:18 +0000 (21:32 +0000)
commitffb4c12047c23102e6bca73e27d50722449abe2d
treec65325fe0956aa10df843073baaacdd7a232c7bb
parent53a13115b4fb43b71fc29ddd1849860c4eee6748
WebCore:

2008-05-13  John Sullivan  <sullivan@apple.com>

        Reviewed by Dan Bernstein and Kevin Decker

        - fixed <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind

        Test: fast/forms/select-type-ahead-list-box-no-selection.html

        * html/HTMLSelectElement.cpp:
        (WebCore::HTMLSelectElement::typeAheadFind):
        When there's no initially-selected element, we were accessing index -1. Check for this
        case and start at 0.

LayoutTests:

2008-05-13  John Sullivan  <sullivan@apple.com>

        Reviewed by Justin Garcia and Tim Hatcher

        <rdar://problem/5879597> reproducible crash in HTMLSelectElement::typeAheadFind

        * fast/forms/select-type-ahead-list-box-no-selection-expected.txt: Added.
        * fast/forms/select-type-ahead-list-box-no-selection.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@33392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/forms/select-type-ahead-list-box-no-selection-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/select-type-ahead-list-box-no-selection.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/html/HTMLSelectElement.cpp