• sullivan@apple.com's avatar
    WebCore: · a7365617
    sullivan@apple.com authored
    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: http://svn.webkit.org/repository/webkit/trunk@33392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a7365617
select-type-ahead-list-box-no-selection.html 762 Bytes