HTMLOptionsCollection.cpp [plain text]
#include "config.h"
#include "HTMLOptionsCollection.h"
#include <wtf/IsoMallocInlines.h>
namespace WebCore {
WTF_MAKE_ISO_ALLOCATED_IMPL(HTMLOptionsCollection);
HTMLOptionsCollection::HTMLOptionsCollection(HTMLSelectElement& select)
: CachedHTMLCollection(select, SelectOptions)
{
}
Ref<HTMLOptionsCollection> HTMLOptionsCollection::create(HTMLSelectElement& select, CollectionType)
{
return adoptRef(*new HTMLOptionsCollection(select));
}
ExceptionOr<void> HTMLOptionsCollection::add(const OptionOrOptGroupElement& element, const Optional<HTMLElementOrInt>& before)
{
return selectElement().add(element, before);
}
void HTMLOptionsCollection::remove(int index)
{
selectElement().remove(index);
}
int HTMLOptionsCollection::selectedIndex() const
{
return selectElement().selectedIndex();
}
void HTMLOptionsCollection::setSelectedIndex(int index)
{
selectElement().setSelectedIndex(index);
}
ExceptionOr<void> HTMLOptionsCollection::setLength(unsigned length)
{
return selectElement().setLength(length);
}
}