Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Side by Side Diff: Source/WebCore/html/HTMLFormControlElement.h

Issue 10542040: Merge 118725 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 virtual ~HTMLFormControlElement(); 44 virtual ~HTMLFormControlElement();
45 45
46 HTMLFormElement* form() const { return FormAssociatedElement::form(); } 46 HTMLFormElement* form() const { return FormAssociatedElement::form(); }
47 47
48 String formEnctype() const; 48 String formEnctype() const;
49 void setFormEnctype(const String&); 49 void setFormEnctype(const String&);
50 String formMethod() const; 50 String formMethod() const;
51 void setFormMethod(const String&); 51 void setFormMethod(const String&);
52 bool formNoValidate() const; 52 bool formNoValidate() const;
53 53
54 void updateFieldSetAndLegendAncestor() const;
55 void ancestorDisabledStateWasChanged(); 54 void ancestorDisabledStateWasChanged();
56 55
57 virtual void reset() { } 56 virtual void reset() { }
58 57
59 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches Renderer; } 58 virtual bool formControlValueMatchesRenderer() const { return m_valueMatches Renderer; }
60 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend erer = b; } 59 virtual void setFormControlValueMatchesRenderer(bool b) { m_valueMatchesRend erer = b; }
61 60
62 virtual bool wasChangedSinceLastFormControlChangeEvent() const; 61 virtual bool wasChangedSinceLastFormControlChangeEvent() const;
63 virtual void setChangedSinceLastFormControlChangeEvent(bool); 62 virtual void setChangedSinceLastFormControlChangeEvent(bool);
64 63
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 virtual void derefFormAssociatedElement() { deref(); } 142 virtual void derefFormAssociatedElement() { deref(); }
144 143
145 virtual bool isFormControlElement() const { return true; } 144 virtual bool isFormControlElement() const { return true; }
146 145
147 virtual short tabIndex() const; 146 virtual short tabIndex() const;
148 147
149 virtual HTMLFormElement* virtualForm() const; 148 virtual HTMLFormElement* virtualForm() const;
150 virtual bool isDefaultButtonForForm() const; 149 virtual bool isDefaultButtonForForm() const;
151 virtual bool isValidFormControlElement(); 150 virtual bool isValidFormControlElement();
152 String visibleValidationMessage() const; 151 String visibleValidationMessage() const;
152 void updateAncestorDisabledState() const;
153 153
154 mutable HTMLFieldSetElement* m_fieldSetAncestor;
155 mutable HTMLLegendElement* m_legendAncestor;
156 OwnPtr<ValidationMessage> m_validationMessage; 154 OwnPtr<ValidationMessage> m_validationMessage;
157 mutable bool m_fieldSetAncestorValid : 1;
158 bool m_disabled : 1; 155 bool m_disabled : 1;
159 bool m_readOnly : 1; 156 bool m_readOnly : 1;
160 bool m_required : 1; 157 bool m_required : 1;
161 bool m_valueMatchesRenderer : 1; 158 bool m_valueMatchesRenderer : 1;
162 159
160 enum AncestorDisabledState { AncestorDisabledStateUnknown, AncestorDisabledS tateEnabled, AncestorDisabledStateDisabled };
161 mutable AncestorDisabledState m_ancestorDisabledState;
163 enum DataListAncestorState { Unknown, InsideDataList, NotInsideDataList }; 162 enum DataListAncestorState { Unknown, InsideDataList, NotInsideDataList };
164 mutable enum DataListAncestorState m_dataListAncestorState; 163 mutable enum DataListAncestorState m_dataListAncestorState;
165 164
166 // The initial value of m_willValidate depends on the derived class. We can' t 165 // The initial value of m_willValidate depends on the derived class. We can' t
167 // initialize it with a virtual function in the constructor. m_willValidate 166 // initialize it with a virtual function in the constructor. m_willValidate
168 // is not deterministic as long as m_willValidateInitialized is false. 167 // is not deterministic as long as m_willValidateInitialized is false.
169 mutable bool m_willValidateInitialized: 1; 168 mutable bool m_willValidateInitialized: 1;
170 mutable bool m_willValidate : 1; 169 mutable bool m_willValidate : 1;
171 170
172 // Cache of validity()->valid(). 171 // Cache of validity()->valid().
173 // But "candidate for constraint validation" doesn't affect m_isValid. 172 // But "candidate for constraint validation" doesn't affect m_isValid.
174 bool m_isValid : 1; 173 bool m_isValid : 1;
175 174
176 bool m_wasChangedSinceLastFormControlChangeEvent : 1; 175 bool m_wasChangedSinceLastFormControlChangeEvent : 1;
177 176
178 bool m_hasAutofocused : 1; 177 bool m_hasAutofocused : 1;
179 }; 178 };
180 179
181 } // namespace 180 } // namespace
182 181
183 #endif 182 #endif
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLFieldSetElement.cpp ('k') | Source/WebCore/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698