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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual bool stepMismatch() const; | 83 virtual bool stepMismatch() const; |
84 virtual bool tooLong() const; | 84 virtual bool tooLong() const; |
85 virtual bool typeMismatch() const; | 85 virtual bool typeMismatch() const; |
86 virtual bool valueMissing() const; | 86 virtual bool valueMissing() const; |
87 virtual String validationMessage() const; | 87 virtual String validationMessage() const; |
88 bool valid() const; | 88 bool valid() const; |
89 virtual void setCustomValidity(const String&); | 89 virtual void setCustomValidity(const String&); |
90 | 90 |
91 void formAttributeTargetChanged(); | 91 void formAttributeTargetChanged(); |
92 | 92 |
| 93 typedef WillBeHeapVector<RawPtrWillBeMember<FormAssociatedElement> > List; |
| 94 |
93 protected: | 95 protected: |
94 FormAssociatedElement(); | 96 FormAssociatedElement(); |
95 | 97 |
96 void trace(Visitor*); | 98 void trace(Visitor*); |
97 void insertedInto(ContainerNode*); | 99 void insertedInto(ContainerNode*); |
98 void removedFrom(ContainerNode*); | 100 void removedFrom(ContainerNode*); |
99 void didMoveToNewDocument(Document& oldDocument); | 101 void didMoveToNewDocument(Document& oldDocument); |
100 | 102 |
101 // FIXME: Remove usage of setForm. resetFormOwner should be enough, and | 103 // FIXME: Remove usage of setForm. resetFormOwner should be enough, and |
102 // setForm is confusing. | 104 // setForm is confusing. |
103 void setForm(HTMLFormElement*); | 105 void setForm(HTMLFormElement*); |
104 void associateByParser(HTMLFormElement*); | 106 void associateByParser(HTMLFormElement*); |
105 void formAttributeChanged(); | 107 void formAttributeChanged(); |
106 | 108 |
107 // If you add an override of willChangeForm() or didChangeForm() to a class | 109 // If you add an override of willChangeForm() or didChangeForm() to a class |
108 // derived from this one, you will need to add a call to setForm(0) to the | 110 // derived from this one, you will need to add a call to setForm(0) to the |
109 // destructor of that class. | 111 // destructor of that class. |
110 virtual void willChangeForm(); | 112 virtual void willChangeForm(); |
111 virtual void didChangeForm(); | 113 virtual void didChangeForm(); |
112 | 114 |
113 String customValidationMessage() const; | 115 String customValidationMessage() const; |
114 | 116 |
115 private: | 117 private: |
116 #if !ENABLE(OILPAN) | 118 #if !ENABLE(OILPAN) |
117 virtual void refFormAssociatedElement() = 0; | 119 virtual void refFormAssociatedElement() = 0; |
118 virtual void derefFormAssociatedElement() = 0; | 120 virtual void derefFormAssociatedElement() = 0; |
119 #endif | 121 #endif |
120 | 122 |
121 void setFormAttributeTargetObserver(PassOwnPtr<FormAttributeTargetObserver>)
; | 123 void setFormAttributeTargetObserver(PassOwnPtrWillBeRawPtr<FormAttributeTarg
etObserver>); |
122 void resetFormAttributeTargetObserver(); | 124 void resetFormAttributeTargetObserver(); |
123 | 125 |
124 OwnPtr<FormAttributeTargetObserver> m_formAttributeTargetObserver; | 126 OwnPtrWillBeMember<FormAttributeTargetObserver> m_formAttributeTargetObserve
r; |
125 #if ENABLE(OILPAN) | 127 #if ENABLE(OILPAN) |
126 Member<HTMLFormElement> m_form; | 128 Member<HTMLFormElement> m_form; |
127 #else | 129 #else |
128 WeakPtr<HTMLFormElement> m_form; | 130 WeakPtr<HTMLFormElement> m_form; |
129 #endif | 131 #endif |
130 OwnPtrWillBeMember<ValidityState> m_validityState; | 132 OwnPtrWillBeMember<ValidityState> m_validityState; |
131 String m_customValidationMessage; | 133 String m_customValidationMessage; |
132 bool m_formWasSetByParser; | 134 bool m_formWasSetByParser; |
133 }; | 135 }; |
134 | 136 |
135 HTMLElement* toHTMLElement(FormAssociatedElement*); | 137 HTMLElement* toHTMLElement(FormAssociatedElement*); |
136 HTMLElement& toHTMLElement(FormAssociatedElement&); | 138 HTMLElement& toHTMLElement(FormAssociatedElement&); |
137 const HTMLElement* toHTMLElement(const FormAssociatedElement*); | 139 const HTMLElement* toHTMLElement(const FormAssociatedElement*); |
138 const HTMLElement& toHTMLElement(const FormAssociatedElement&); | 140 const HTMLElement& toHTMLElement(const FormAssociatedElement&); |
139 | 141 |
140 } // namespace | 142 } // namespace |
141 | 143 |
142 #endif // FormAssociatedElement_h | 144 #endif // FormAssociatedElement_h |
OLD | NEW |