Bug 1250401 - HTMLOptionElement::GetSelect should not return an element if we have nested OptGroup elements - patch 2, r=bz
This commit is contained in:
@@ -355,7 +355,11 @@ HTMLSelectElement*
|
||||
HTMLOptionElement::GetSelect()
|
||||
{
|
||||
nsIContent* parent = GetParent();
|
||||
HTMLSelectElement* select = HTMLSelectElement::FromContentOrNull(parent);
|
||||
if (!parent) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HTMLSelectElement* select = HTMLSelectElement::FromContent(parent);
|
||||
if (select) {
|
||||
return select;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user