summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLDetailsElement.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLDetailsElement.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/HTMLDetailsElement.h')
-rw-r--r--Source/WebCore/html/HTMLDetailsElement.h34
1 files changed, 21 insertions, 13 deletions
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<typename T> class EventSender;
+typedef EventSender<HTMLDetailsElement> DetailEventSender;
+
class HTMLDetailsElement final : public HTMLElement {
public:
- static PassRefPtr<HTMLDetailsElement> create(const QualifiedName& tagName, Document& document);
+ static Ref<HTMLDetailsElement> 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<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
- virtual bool childShouldCreateRenderer(const Node&) const override;
- virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
+ RenderPtr<RenderElement> 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<HTMLSlotElement> m_defaultSlot;
};
-NODE_TYPE_CASTS(HTMLDetailsElement)
-
} // namespace WebCore
-
-#endif // HTMLDetailsElement_h