Merge 130717 - HTMLSelectElement::typeAheadFind depends on implementation dependent behavior
Reviewed by Kent Tamura.
This patch gets rid of C/C++ implementation dependent behavior from
HTMLSelectElement::typeAheadFind() which does modulo operation with
a negative operand.
HTMLSelectElement::typeAheadFind() contains expression with modulo
operator and dividend can be -1 when the "select" element without
"option" element but "optgroup" element.
(WebCore::HTMLSelectElement::typeAheadFind): Changed to do modulo
operation with both operands are non-negative.
This patch adds a test for checking HTMLSelectElement::typeAheadFind
* fast/forms/select/select-typeahead-crash-expected.txt: Added.
* fast/forms/select/select-typeahead-crash.html: Added.