diff options
Diffstat (limited to 'Source/WebCore/html/HTMLFieldSetElement.h')
-rw-r--r-- | Source/WebCore/html/HTMLFieldSetElement.h | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/Source/WebCore/html/HTMLFieldSetElement.h b/Source/WebCore/html/HTMLFieldSetElement.h index 0cf0d0ed2..441a218b4 100644 --- a/Source/WebCore/html/HTMLFieldSetElement.h +++ b/Source/WebCore/html/HTMLFieldSetElement.h @@ -21,50 +21,58 @@ * */ -#ifndef HTMLFieldSetElement_h -#define HTMLFieldSetElement_h +#pragma once #include "HTMLFormControlElement.h" +#include <wtf/HashSet.h> namespace WebCore { class FormAssociatedElement; -class HTMLCollection; +class HTMLFormControlsCollection; +class RenderFieldSet; class HTMLFieldSetElement final : public HTMLFormControlElement { public: - static PassRefPtr<HTMLFieldSetElement> create(const QualifiedName&, Document&, HTMLFormElement*); + static Ref<HTMLFieldSetElement> create(const QualifiedName&, Document&, HTMLFormElement*); HTMLLegendElement* legend() const; - PassRefPtr<HTMLCollection> elements(); + + Ref<HTMLFormControlsCollection> elements(); + Ref<HTMLCollection> elementsForNativeBindings(); const Vector<FormAssociatedElement*>& associatedElements() const; unsigned length() const; -protected: - virtual void disabledAttributeChanged() override; + void addInvalidDescendant(const HTMLFormControlElement&); + void removeInvalidDescendant(const HTMLFormControlElement&); + + RenderFieldSet* renderer() const; private: HTMLFieldSetElement(const QualifiedName&, Document&, HTMLFormElement*); + ~HTMLFieldSetElement(); + + bool isEnumeratable() const final { return true; } + bool supportsFocus() const final; + RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; + const AtomicString& formControlType() const final; + bool computeWillValidate() const final { return false; } + void disabledAttributeChanged() final; + void disabledStateChanged() final; + void childrenChanged(const ChildChange&) final; + void didMoveToNewDocument(Document& oldDocument) final; - virtual bool isEnumeratable() const override { return true; } - virtual bool supportsFocus() const override; - virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override; - virtual const AtomicString& formControlType() const override; - virtual bool recalcWillValidate() const override { return false; } - virtual void childrenChanged(const ChildChange&) override; - virtual bool areAuthorShadowsAllowed() const override { return false; } + bool matchesValidPseudoClass() const final; + bool matchesInvalidPseudoClass() const final; - static void invalidateDisabledStateUnder(Element*); - void refreshElementsIfNeeded() const; + void updateAssociatedElements() const; mutable Vector<FormAssociatedElement*> m_associatedElements; - // When dom tree is modified, we have to refresh the m_associatedElements array. - mutable uint64_t m_documentVersion; + // When the DOM tree is modified, we have to refresh the m_associatedElements array. + mutable uint64_t m_documentVersion { 0 }; + HashSet<const HTMLFormControlElement*> m_invalidDescendants; + bool m_hasDisabledAttribute { false }; }; -NODE_TYPE_CASTS(HTMLFieldSetElement) - } // namespace - -#endif |