HTMLDetailsElement.h [plain text]
#pragma once
#include "HTMLElement.h"
namespace WebCore {
class HTMLSlotElement;
template<typename T> class EventSender;
typedef EventSender<HTMLDetailsElement> DetailEventSender;
class HTMLDetailsElement final : public HTMLElement {
WTF_MAKE_ISO_ALLOCATED(HTMLDetailsElement);
public:
static Ref<HTMLDetailsElement> create(const QualifiedName& tagName, Document&);
~HTMLDetailsElement();
void toggleOpen();
bool isOpen() const { return m_isOpen; }
bool isActiveSummary(const HTMLSummaryElement&) const;
void dispatchPendingEvent(DetailEventSender*);
private:
HTMLDetailsElement(const QualifiedName&, Document&);
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
void parseAttribute(const QualifiedName&, const AtomString&) final;
void didAddUserAgentShadowRoot(ShadowRoot&) final;
bool hasCustomFocusLogic() const final { return true; }
bool isInteractiveContent() const final { return true; }
bool m_isOpen { false };
HTMLSlotElement* m_summarySlot { nullptr };
HTMLSummaryElement* m_defaultSummary { nullptr };
RefPtr<HTMLSlotElement> m_defaultSlot;
};
}