1 /*
2  * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
4  *           (C) 2000 Dirk Mueller (mueller@kde.org)
5  * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public License
18  * along with this library; see the file COPYING.LIB.  If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  *
22  */
23 
24 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_FIELD_SET_ELEMENT_H_
25 #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_FIELD_SET_ELEMENT_H_
26 
27 #include "third_party/blink/renderer/core/core_export.h"
28 #include "third_party/blink/renderer/core/html/forms/html_form_control_element.h"
29 
30 namespace blink {
31 
32 class HTMLCollection;
33 
34 class CORE_EXPORT HTMLFieldSetElement final : public HTMLFormControlElement {
35   DEFINE_WRAPPERTYPEINFO();
36 
37  public:
38   explicit HTMLFieldSetElement(Document&);
39 
40   HTMLLegendElement* Legend() const;
41   HTMLCollection* elements();
42 
43  protected:
44   void DisabledAttributeChanged() override;
45 
46  private:
IsEnumeratable()47   bool IsEnumeratable() const override { return true; }
48   bool SupportsFocus() const override;
49   LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override;
50   bool TypeShouldForceLegacyLayout() const final;
51   const AtomicString& FormControlType() const override;
RecalcWillValidate()52   bool RecalcWillValidate() const override { return false; }
53   bool MatchesValidityPseudoClasses() const final;
54   bool IsValidElement() final;
55   void ChildrenChanged(const ChildrenChange&) override;
AreAuthorShadowsAllowed()56   bool AreAuthorShadowsAllowed() const override { return false; }
57   bool IsSubmittableElement() override;
AlwaysCreateUserAgentShadowRoot()58   bool AlwaysCreateUserAgentShadowRoot() const override { return false; }
59 
60   Element* InvalidateDescendantDisabledStateAndFindFocusedOne(Element& base);
61 };
62 
63 }  // namespace blink
64 
65 #endif  // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_HTML_FIELD_SET_ELEMENT_H_
66