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

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

Issue 646273004: Implement :valid and :invalid pseudoclass for <fieldset> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pull Created 6 years, 2 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
« no previous file with comments | « Source/core/html/HTMLFieldSetElement.cpp ('k') | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 virtual void refFormAssociatedElement() override final { ref(); } 150 virtual void refFormAssociatedElement() override final { ref(); }
151 virtual void derefFormAssociatedElement() override final { deref(); } 151 virtual void derefFormAssociatedElement() override final { deref(); }
152 #endif 152 #endif
153 153
154 virtual bool isFormControlElement() const override final { return true; } 154 virtual bool isFormControlElement() const override final { return true; }
155 virtual bool alwaysCreateUserAgentShadowRoot() const override { return true; } 155 virtual bool alwaysCreateUserAgentShadowRoot() const override { return true; }
156 156
157 virtual short tabIndex() const override final; 157 virtual short tabIndex() const override final;
158 158
159 virtual bool isDefaultButtonForForm() const override final; 159 virtual bool isDefaultButtonForForm() const override final;
160 virtual bool isValidElement() override final; 160 virtual bool isValidElement() override;
161 virtual bool matchesValidityPseudoClasses() const override final; 161 virtual bool matchesValidityPseudoClasses() const override;
162 void updateAncestorDisabledState() const; 162 void updateAncestorDisabledState() const;
163 163
164 bool isValidationMessageVisible() const; 164 bool isValidationMessageVisible() const;
165 ValidationMessageClient* validationMessageClient() const; 165 ValidationMessageClient* validationMessageClient() const;
166 166
167 // Requests validity recalc for the form owner, if one exists. 167 // Requests validity recalc for the form owner, if one exists.
168 void formOwnerSetNeedsValidityCheck(); 168 void formOwnerSetNeedsValidityCheck();
169 // Requests validity recalc for all ancestor fieldsets, if exist.
170 void fieldSetAncestorsSetNeedsValidityCheck(Node*);
169 171
170 bool m_disabled : 1; 172 bool m_disabled : 1;
171 bool m_isAutofilled : 1; 173 bool m_isAutofilled : 1;
172 bool m_isReadOnly : 1; 174 bool m_isReadOnly : 1;
173 bool m_isRequired : 1; 175 bool m_isRequired : 1;
174 bool m_hasValidationMessage : 1; 176 bool m_hasValidationMessage : 1;
175 177
176 enum AncestorDisabledState { AncestorDisabledStateUnknown, AncestorDisabledS tateEnabled, AncestorDisabledStateDisabled }; 178 enum AncestorDisabledState { AncestorDisabledStateUnknown, AncestorDisabledS tateEnabled, AncestorDisabledStateDisabled };
177 mutable AncestorDisabledState m_ancestorDisabledState; 179 mutable AncestorDisabledState m_ancestorDisabledState;
178 enum DataListAncestorState { Unknown, InsideDataList, NotInsideDataList }; 180 enum DataListAncestorState { Unknown, InsideDataList, NotInsideDataList };
(...skipping 17 matching lines...) Expand all
196 { 198 {
197 return element.isFormControlElement(); 199 return element.isFormControlElement();
198 } 200 }
199 201
200 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); 202 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement);
201 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro l->isFormControlElement(), control.isFormControlElement()); 203 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro l->isFormControlElement(), control.isFormControlElement());
202 204
203 } // namespace 205 } // namespace
204 206
205 #endif 207 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFieldSetElement.cpp ('k') | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698