Changeset 207276 in webkit
- Timestamp:
- Oct 12, 2016 9:13:49 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207275 r207276 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements 4 https://bugs.webkit.org/show_bug.cgi?id=163358 5 6 Reviewed by Kent Tamura. 7 8 Add layout test coverage. 9 10 * fast/dom/HTMLSelectElement/nested-optgroup-expected.txt: Added. 11 * fast/dom/HTMLSelectElement/nested-optgroup.html: Added. 12 1 13 2016-10-12 Zalan Bujtas <zalan@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r207275 r207276 1 2016-10-12 Chris Dumez <cdumez@apple.com> 2 3 Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements 4 https://bugs.webkit.org/show_bug.cgi?id=163358 5 6 Reviewed by Kent Tamura. 7 8 Update HTMLSelectElement::recalcListItems() to ignore nested optgroup elements. 9 As per the specification, we only want optgroup elements that are direct 10 children of the select element. This also matches the behavior of Chrome. 11 12 Test: fast/dom/HTMLSelectElement/nested-optgroup.html 13 14 * html/HTMLSelectElement.cpp: 15 (WebCore::HTMLSelectElement::recalcListItems): 16 1 17 2016-10-12 Zalan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/html/HTMLSelectElement.cpp
r207010 r207276 771 771 HTMLElement& current = downcast<HTMLElement>(*currentElement); 772 772 773 // optgroup tags may not nest. However, both FireFox and IE will 774 // flatten the tree automatically, so we follow suit. 775 // (http://www.w3.org/TR/html401/interact/forms.html#h-17.6) 776 if (is<HTMLOptGroupElement>(current)) { 773 // Only consider optgroup elements that are direct children of the select element. 774 if (is<HTMLOptGroupElement>(current) && current.parentNode() == this) { 777 775 m_listItems.append(¤t); 778 776 if (Element* nextElement = ElementTraversal::firstWithin(current)) {
Note: See TracChangeset
for help on using the changeset viewer.