Bug 899931 - Part b: Introduce a nice nsListControlFrame::GetOption; r=dzbarsky

This commit is contained in:
Ms2ger
2013-08-02 09:07:04 +02:00
parent ba9f10d9b3
commit a4aab7aad0
2 changed files with 20 additions and 0 deletions

View File

@@ -1056,6 +1056,16 @@ nsListControlFrame::GetOptions(nsIContent * aContent)
return options.forget();
}
dom::HTMLOptionElement*
nsListControlFrame::GetOption(uint32_t aIndex) const
{
dom::HTMLSelectElement* select =
dom::HTMLSelectElement::FromContentOrNull(mContent);
NS_ENSURE_TRUE(select, nullptr);
return select->Item(aIndex);
}
already_AddRefed<nsIDOMHTMLOptionElement>
nsListControlFrame::GetOption(nsIDOMHTMLOptionsCollection* aCollection,
int32_t aIndex)