Bug 893909 - Part g: Cleanup HTMLSelectElement::OnOptionSelected; r=dzbarsky

This commit is contained in:
Ms2ger 2013-07-24 09:37:07 +02:00
parent c63360da24
commit 75d9db187b

View File

@ -837,12 +837,9 @@ HTMLSelectElement::OnOptionSelected(nsISelectControlFrame* aSelectFrame,
if (aChangeOptionState) {
// Tell the option to get its bad self selected
nsCOMPtr<nsIDOMNode> option;
Item(aIndex, getter_AddRefs(option));
nsRefPtr<HTMLOptionElement> option = Item(static_cast<uint32_t>(aIndex));
if (option) {
nsRefPtr<HTMLOptionElement> optionElement =
static_cast<HTMLOptionElement*>(option.get());
optionElement->SetSelectedInternal(aSelected, aNotify);
option->SetSelectedInternal(aSelected, aNotify);
}
}