HTMLOptionElement.h [plain text]
#ifndef HTMLOptionElement_h
#define HTMLOptionElement_h
#include "HTMLElement.h"
namespace WebCore {
class HTMLDataListElement;
class HTMLSelectElement;
class HTMLOptionElement final : public HTMLElement {
public:
static Ref<HTMLOptionElement> create(Document&);
static Ref<HTMLOptionElement> create(const QualifiedName&, Document&);
static RefPtr<HTMLOptionElement> createForJSConstructor(Document&, const String& data, const String& value,
bool defaultSelected, bool selected, ExceptionCode&);
WEBCORE_EXPORT String text() const;
void setText(const String&, ExceptionCode&);
int index() const;
String value() const;
void setValue(const String&);
WEBCORE_EXPORT bool selected();
void setSelected(bool);
#if ENABLE(DATALIST_ELEMENT)
HTMLDataListElement* ownerDataListElement() const;
#endif
HTMLSelectElement* ownerSelectElement() const;
String label() const;
void setLabel(const String&);
bool ownElementDisabled() const { return m_disabled; }
virtual bool isDisabledFormControl() const override;
String textIndentedToRespectGroupLabel() const;
void setSelectedState(bool);
private:
HTMLOptionElement(const QualifiedName&, Document&);
virtual bool isFocusable() const override;
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
virtual void accessKeyAction(bool) override;
virtual void childrenChanged(const ChildChange&) override;
virtual void willResetComputedStyle() override;
String collectOptionInnerText() const;
bool m_disabled;
bool m_isSelected;
};
}
#endif