AccessibilityListBoxOption.h [plain text]
#ifndef AccessibilityListBoxOption_h
#define AccessibilityListBoxOption_h
#include "AccessibilityObject.h"
#include "HTMLElement.h"
#include <wtf/Forward.h>
namespace WebCore {
class AccessibilityListBox;
class Element;
class HTMLElement;
class HTMLSelectElement;
class AccessibilityListBoxOption : public AccessibilityObject {
private:
AccessibilityListBoxOption();
public:
static PassRefPtr<AccessibilityListBoxOption> create();
virtual ~AccessibilityListBoxOption();
void setHTMLElement(HTMLElement* element) { m_optionElement = element; }
virtual AccessibilityRole roleValue() const override { return ListBoxOptionRole; }
virtual bool isSelected() const override;
virtual bool isEnabled() const override;
virtual bool isSelectedOptionActive() const override;
virtual String stringValue() const override;
virtual Element* actionElement() const override;
virtual Node* node() const override { return m_optionElement; }
virtual void setSelected(bool) override;
virtual bool canSetSelectedAttribute() const override;
virtual LayoutRect elementRect() const override;
virtual AccessibilityObject* parentObject() const override;
virtual bool isListBoxOption() const override final { return true; }
private:
HTMLElement* m_optionElement;
virtual bool canHaveChildren() const override { return false; }
HTMLSelectElement* listBoxOptionParentNode() const;
int listBoxOptionIndex() const;
IntRect listBoxOptionRect() const;
AccessibilityObject* listBoxOptionAccessibilityObject(HTMLElement*) const;
virtual bool computeAccessibilityIsIgnored() const override;
};
ACCESSIBILITY_OBJECT_TYPE_CASTS(AccessibilityListBoxOption, isListBoxOption())
}
#endif // AccessibilityListBoxOption_h