#ifndef HTMLFormControlsCollection_h
#define HTMLFormControlsCollection_h
#include "core/html/HTMLCollection.h"
#include "core/html/RadioNodeList.h"
namespace WebCore {
class FormAssociatedElement;
class HTMLElement;
class HTMLImageElement;
class QualifiedName;
class HTMLFormControlsCollection FINAL : public HTMLCollection {
public:
static PassRefPtr<HTMLFormControlsCollection> create(ContainerNode&, CollectionType);
virtual ~HTMLFormControlsCollection();
virtual Element* namedItem(const AtomicString& name) const OVERRIDE;
void namedGetter(const AtomicString& name, bool& radioNodeListEnabled, RefPtr<RadioNodeList>&, bool& elementEnabled, RefPtr<Element>&);
private:
explicit HTMLFormControlsCollection(ContainerNode&);
virtual void updateIdNameCache() const OVERRIDE;
virtual void supportedPropertyNames(Vector<String>& names) OVERRIDE;
const Vector<FormAssociatedElement*>& formControlElements() const;
const Vector<HTMLImageElement*>& formImageElements() const;
virtual Element* virtualItemAfter(Element*) const OVERRIDE;
virtual void invalidateCache(Document* oldDocument = 0) const OVERRIDE;
mutable Element* m_cachedElement;
mutable unsigned m_cachedElementOffsetInArray;
};
}
#endif