mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893909 - Part d: Cleanup HTMLSelectElement::Remove; r=dzbarsky
This commit is contained in:
parent
bdb8600e62
commit
69c531e18f
@ -676,19 +676,12 @@ HTMLSelectElement::Add(nsIDOMHTMLElement* aElement,
|
||||
NS_IMETHODIMP
|
||||
HTMLSelectElement::Remove(int32_t aIndex)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> option;
|
||||
Item(aIndex, getter_AddRefs(option));
|
||||
|
||||
if (option) {
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
|
||||
option->GetParentNode(getter_AddRefs(parent));
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIDOMNode> ret;
|
||||
parent->RemoveChild(option, getter_AddRefs(ret));
|
||||
}
|
||||
nsCOMPtr<nsINode> option = Item(static_cast<uint32_t>(aIndex));
|
||||
if (!option) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
option->Remove();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user