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

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

Issue 271533009: Oilpan: Prepare to move FormAssociatedElement to Oilpan heap, part 1. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove using Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/FormAssociatedElement.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 22 matching lines...) Expand all
33 class HTMLFieldSetElement; 33 class HTMLFieldSetElement;
34 class HTMLFormElement; 34 class HTMLFormElement;
35 class HTMLLegendElement; 35 class HTMLLegendElement;
36 class ValidationMessage; 36 class ValidationMessage;
37 class ValidityState; 37 class ValidityState;
38 38
39 // HTMLFormControlElement is the default implementation of FormAssociatedElement , 39 // HTMLFormControlElement is the default implementation of FormAssociatedElement ,
40 // and form-associated element implementations should use HTMLFormControlElement 40 // and form-associated element implementations should use HTMLFormControlElement
41 // unless there is a special reason. 41 // unless there is a special reason.
42 class HTMLFormControlElement : public LabelableElement, public FormAssociatedEle ment { 42 class HTMLFormControlElement : public LabelableElement, public FormAssociatedEle ment {
43 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLFormControlElement);
44
43 public: 45 public:
44 virtual ~HTMLFormControlElement(); 46 virtual ~HTMLFormControlElement();
47 virtual void trace(Visitor*) OVERRIDE;
45 48
46 String formEnctype() const; 49 String formEnctype() const;
47 void setFormEnctype(const AtomicString&); 50 void setFormEnctype(const AtomicString&);
48 String formMethod() const; 51 String formMethod() const;
49 void setFormMethod(const AtomicString&); 52 void setFormMethod(const AtomicString&);
50 bool formNoValidate() const; 53 bool formNoValidate() const;
51 54
52 void ancestorDisabledStateWasChanged(); 55 void ancestorDisabledStateWasChanged();
53 56
54 void reset(); 57 void reset();
(...skipping 25 matching lines...) Expand all
80 virtual String resultForDialogSubmit(); 83 virtual String resultForDialogSubmit();
81 84
82 virtual bool canBeSuccessfulSubmitButton() const { return false; } 85 virtual bool canBeSuccessfulSubmitButton() const { return false; }
83 bool isSuccessfulSubmitButton() const; 86 bool isSuccessfulSubmitButton() const;
84 virtual bool isActivatedSubmit() const { return false; } 87 virtual bool isActivatedSubmit() const { return false; }
85 virtual void setActivatedSubmit(bool) { } 88 virtual void setActivatedSubmit(bool) { }
86 89
87 virtual bool willValidate() const OVERRIDE; 90 virtual bool willValidate() const OVERRIDE;
88 void updateVisibleValidationMessage(); 91 void updateVisibleValidationMessage();
89 void hideVisibleValidationMessage(); 92 void hideVisibleValidationMessage();
90 bool checkValidity(Vector<RefPtr<FormAssociatedElement> >* unhandledInvalidC ontrols = 0); 93 bool checkValidity(WillBeHeapVector<RefPtrWillBeMember<FormAssociatedElement > >* unhandledInvalidControls = 0);
91 // This must be called when a validation constraint or control value is chan ged. 94 // This must be called when a validation constraint or control value is chan ged.
92 void setNeedsValidityCheck(); 95 void setNeedsValidityCheck();
93 virtual void setCustomValidity(const String&) OVERRIDE FINAL; 96 virtual void setCustomValidity(const String&) OVERRIDE FINAL;
94 97
95 bool isReadOnly() const { return m_isReadOnly; } 98 bool isReadOnly() const { return m_isReadOnly; }
96 bool isDisabledOrReadOnly() const { return isDisabledFormControl() || m_isRe adOnly; } 99 bool isDisabledOrReadOnly() const { return isDisabledFormControl() || m_isRe adOnly; }
97 100
98 bool isAutofocusable() const; 101 bool isAutofocusable() const;
99 102
100 bool isAutofilled() const { return m_isAutofilled; } 103 bool isAutofilled() const { return m_isAutofilled; }
(...skipping 30 matching lines...) Expand all
131 virtual void didRecalcStyle(StyleRecalcChange) OVERRIDE FINAL; 134 virtual void didRecalcStyle(StyleRecalcChange) OVERRIDE FINAL;
132 135
133 // This must be called any time the result of willValidate() has changed. 136 // This must be called any time the result of willValidate() has changed.
134 void setNeedsWillValidateCheck(); 137 void setNeedsWillValidateCheck();
135 virtual bool recalcWillValidate() const; 138 virtual bool recalcWillValidate() const;
136 139
137 virtual void resetImpl() { } 140 virtual void resetImpl() { }
138 virtual bool supportsAutofocus() const; 141 virtual bool supportsAutofocus() const;
139 142
140 private: 143 private:
144 #if !ENABLE(OILPAN)
141 virtual void refFormAssociatedElement() OVERRIDE FINAL { ref(); } 145 virtual void refFormAssociatedElement() OVERRIDE FINAL { ref(); }
142 virtual void derefFormAssociatedElement() OVERRIDE FINAL { deref(); } 146 virtual void derefFormAssociatedElement() OVERRIDE FINAL { deref(); }
147 #endif
143 148
144 virtual bool isFormControlElement() const OVERRIDE FINAL { return true; } 149 virtual bool isFormControlElement() const OVERRIDE FINAL { return true; }
145 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true; } 150 virtual bool alwaysCreateUserAgentShadowRoot() const OVERRIDE { return true; }
146 151
147 virtual short tabIndex() const OVERRIDE FINAL; 152 virtual short tabIndex() const OVERRIDE FINAL;
148 153
149 virtual bool isDefaultButtonForForm() const OVERRIDE FINAL; 154 virtual bool isDefaultButtonForForm() const OVERRIDE FINAL;
150 virtual bool isValidFormControlElement() OVERRIDE FINAL; 155 virtual bool isValidFormControlElement() OVERRIDE FINAL;
151 void updateAncestorDisabledState() const; 156 void updateAncestorDisabledState() const;
152 157
(...skipping 26 matching lines...) Expand all
179 { 184 {
180 return element.isFormControlElement(); 185 return element.isFormControlElement();
181 } 186 }
182 187
183 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement); 188 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLFormControlElement);
184 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro l->isFormControlElement(), control.isFormControlElement()); 189 DEFINE_TYPE_CASTS(HTMLFormControlElement, FormAssociatedElement, control, contro l->isFormControlElement(), control.isFormControlElement());
185 190
186 } // namespace 191 } // namespace
187 192
188 #endif 193 #endif
OLDNEW
« no previous file with comments | « Source/core/html/FormAssociatedElement.cpp ('k') | Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698