From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/HTMLDetailsElement.h | 34 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'Source/WebCore/html/HTMLDetailsElement.h') diff --git a/Source/WebCore/html/HTMLDetailsElement.h b/Source/WebCore/html/HTMLDetailsElement.h index a0a18a654..f1c46ff35 100644 --- a/Source/WebCore/html/HTMLDetailsElement.h +++ b/Source/WebCore/html/HTMLDetailsElement.h @@ -18,34 +18,42 @@ * */ -#ifndef HTMLDetailsElement_h -#define HTMLDetailsElement_h +#pragma once #include "HTMLElement.h" namespace WebCore { +class HTMLSlotElement; + +template class EventSender; +typedef EventSender DetailEventSender; + class HTMLDetailsElement final : public HTMLElement { public: - static PassRefPtr create(const QualifiedName& tagName, Document& document); + static Ref create(const QualifiedName& tagName, Document&); + ~HTMLDetailsElement(); + void toggleOpen(); - Element* findMainSummary() const; + bool isOpen() const { return m_isOpen; } + bool isActiveSummary(const HTMLSummaryElement&) const; + void dispatchPendingEvent(DetailEventSender*); + private: HTMLDetailsElement(const QualifiedName&, Document&); - virtual RenderPtr createElementRenderer(PassRef) override; - virtual bool childShouldCreateRenderer(const Node&) const override; - virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; + RenderPtr createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; + void parseAttribute(const QualifiedName&, const AtomicString&) final; - virtual void didAddUserAgentShadowRoot(ShadowRoot*) override; + void didAddUserAgentShadowRoot(ShadowRoot*) final; + bool hasCustomFocusLogic() const final { return true; } - bool m_isOpen; + bool m_isOpen { false }; + HTMLSlotElement* m_summarySlot { nullptr }; + HTMLSummaryElement* m_defaultSummary { nullptr }; + RefPtr m_defaultSlot; }; -NODE_TYPE_CASTS(HTMLDetailsElement) - } // namespace WebCore - -#endif // HTMLDetailsElement_h -- cgit v1.2.1