Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements
https://bugs.webkit.org/show_bug.cgi?id=163358
Reviewed by Kent Tamura.
Source/WebCore:
Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements.
As per the specification, we only want optgroup elements that are direct
children of the select element. This also matches the behavior of Chrome.
Test: fast/dom/HTMLSelectElement/nested-optgroup.html
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::recalcListItems):
LayoutTests:
Add layout test coverage.
* fast/dom/HTMLSelectElement/nested-optgroup-expected.txt: Added.
* fast/dom/HTMLSelectElement/nested-optgroup.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@207276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5 files changed