OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 29 matching lines...) Expand all Loading... |
40 class HTMLFormControlsCollection; | 40 class HTMLFormControlsCollection; |
41 class HTMLImageElement; | 41 class HTMLImageElement; |
42 | 42 |
43 class HTMLFormElement final : public HTMLElement { | 43 class HTMLFormElement final : public HTMLElement { |
44 DEFINE_WRAPPERTYPEINFO(); | 44 DEFINE_WRAPPERTYPEINFO(); |
45 public: | 45 public: |
46 static PassRefPtrWillBeRawPtr<HTMLFormElement> create(Document&); | 46 static PassRefPtrWillBeRawPtr<HTMLFormElement> create(Document&); |
47 virtual ~HTMLFormElement(); | 47 virtual ~HTMLFormElement(); |
48 virtual void trace(Visitor*) override; | 48 virtual void trace(Visitor*) override; |
49 | 49 |
50 virtual bool matchesValidityPseudoClasses() const override final; | |
51 virtual bool isValidElement() override final; | |
52 void setNeedsValidityCheck(); | 50 void setNeedsValidityCheck(); |
53 | 51 |
54 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> elements(); | 52 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> elements(); |
55 void getNamedElements(const AtomicString&, WillBeHeapVector<RefPtrWillBeMemb
er<Element> >&); | 53 void getNamedElements(const AtomicString&, WillBeHeapVector<RefPtrWillBeMemb
er<Element> >&); |
56 | 54 |
57 unsigned length() const; | 55 unsigned length() const; |
58 HTMLElement* item(unsigned index); | 56 HTMLElement* item(unsigned index); |
59 | 57 |
60 String enctype() const { return m_attributes.encodingType(); } | 58 String enctype() const { return m_attributes.encodingType(); } |
61 void setEnctype(const AtomicString&); | 59 void setEnctype(const AtomicString&); |
(...skipping 28 matching lines...) Expand all Loading... |
90 const AtomicString& action() const; | 88 const AtomicString& action() const; |
91 | 89 |
92 String method() const; | 90 String method() const; |
93 void setMethod(const AtomicString&); | 91 void setMethod(const AtomicString&); |
94 | 92 |
95 bool wasUserSubmitted() const; | 93 bool wasUserSubmitted() const; |
96 | 94 |
97 HTMLFormControlElement* defaultButton() const; | 95 HTMLFormControlElement* defaultButton() const; |
98 | 96 |
99 bool checkValidity(); | 97 bool checkValidity(); |
| 98 virtual bool matchesValidityPseudoClasses() const override final; |
| 99 virtual bool isValidElement() override final; |
100 | 100 |
101 enum AutocompleteResult { | 101 enum AutocompleteResult { |
102 AutocompleteResultSuccess, | 102 AutocompleteResultSuccess, |
103 AutocompleteResultErrorDisabled, | 103 AutocompleteResultErrorDisabled, |
104 AutocompleteResultErrorCancel, | 104 AutocompleteResultErrorCancel, |
105 AutocompleteResultErrorInvalid, | 105 AutocompleteResultErrorInvalid, |
106 }; | 106 }; |
107 | 107 |
108 void requestAutocomplete(); | 108 void requestAutocomplete(); |
109 void finishRequestAutocomplete(AutocompleteResult); | 109 void finishRequestAutocomplete(AutocompleteResult); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con
st; | 145 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con
st; |
146 void collectImageElements(Node& root, WillBeHeapVector<RawPtrWillBeMember<HT
MLImageElement> >&); | 146 void collectImageElements(Node& root, WillBeHeapVector<RawPtrWillBeMember<HT
MLImageElement> >&); |
147 | 147 |
148 // Returns true if the submission should proceed. | 148 // Returns true if the submission should proceed. |
149 bool validateInteractively(Event*); | 149 bool validateInteractively(Event*); |
150 | 150 |
151 // Validates each of the controls, and stores controls of which 'invalid' | 151 // Validates each of the controls, and stores controls of which 'invalid' |
152 // event was not canceled to the specified vector. Returns true if there | 152 // event was not canceled to the specified vector. Returns true if there |
153 // are any invalid controls in this form. | 153 // are any invalid controls in this form. |
154 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe
mber<FormAssociatedElement> >*); | 154 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe
mber<FormAssociatedElement> >*, CheckValidityEventBehavior); |
155 | 155 |
156 Element* elementFromPastNamesMap(const AtomicString&); | 156 Element* elementFromPastNamesMap(const AtomicString&); |
157 void addToPastNamesMap(Element*, const AtomicString& pastName); | 157 void addToPastNamesMap(Element*, const AtomicString& pastName); |
158 void removeFromPastNamesMap(HTMLElement&); | 158 void removeFromPastNamesMap(HTMLElement&); |
159 | 159 |
160 typedef WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<Element> > PastNa
mesMap; | 160 typedef WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<Element> > PastNa
mesMap; |
161 | 161 |
162 FormSubmission::Attributes m_attributes; | 162 FormSubmission::Attributes m_attributes; |
163 OwnPtrWillBeMember<PastNamesMap> m_pastNamesMap; | 163 OwnPtrWillBeMember<PastNamesMap> m_pastNamesMap; |
164 | 164 |
(...skipping 18 matching lines...) Expand all Loading... |
183 bool m_isInResetFunction : 1; | 183 bool m_isInResetFunction : 1; |
184 | 184 |
185 bool m_wasDemoted : 1; | 185 bool m_wasDemoted : 1; |
186 | 186 |
187 OwnPtrWillBeMember<GenericEventQueue> m_pendingAutocompleteEventsQueue; | 187 OwnPtrWillBeMember<GenericEventQueue> m_pendingAutocompleteEventsQueue; |
188 }; | 188 }; |
189 | 189 |
190 } // namespace blink | 190 } // namespace blink |
191 | 191 |
192 #endif // HTMLFormElement_h | 192 #endif // HTMLFormElement_h |
OLD | NEW |