LayoutTests:
Reviewed by Brady.
Test case for <rdar://problem/
4656274>
REGRESSION: option elements are selected when added regardless of "selected" property
* fast/forms/option-constructor-selected-expected.txt: Added.
* fast/forms/option-constructor-selected.html: Added.
WebCore:
Reviewed by Brady.
- Fix for <rdar://problem/
4656274>
REGRESSION: option elements are selected when added regardless of "selected" property
Test: fast/forms/option-constructor-selected.html
* html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setOption):
When adding an option element, check that the option element is selected before calling setSelectedIndex.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15838
268f45cc-cd09-0410-ab3c-
d52691b4dbfc