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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual bool stepMismatch() const; | 78 virtual bool stepMismatch() const; |
79 virtual bool tooLong() const; | 79 virtual bool tooLong() const; |
80 virtual bool typeMismatch() const; | 80 virtual bool typeMismatch() const; |
81 virtual bool valueMissing() const; | 81 virtual bool valueMissing() const; |
82 virtual String validationMessage() const; | 82 virtual String validationMessage() const; |
83 bool valid() const; | 83 bool valid() const; |
84 virtual void setCustomValidity(const String&); | 84 virtual void setCustomValidity(const String&); |
85 | 85 |
86 void formAttributeTargetChanged(); | 86 void formAttributeTargetChanged(); |
87 | 87 |
88 // We can't pass FormAssociatedElement pointer into Visitor::visit function | 88 // We can't pass FormAssociatedElement pointer into Visitor::mark function |
89 // directly because it does not coincide with the actual start of the object | 89 // directly because it does not coincide with the actual start of the object |
90 // and visitor has to access object header. Thus we need a helper method | 90 // and visitor has to access object header. Thus we need a helper method |
91 // that would correctly adjust the pointer before passing it into the | 91 // that will adjust the pointer before passing it into the visitor. |
92 // visitor. | 92 virtual void adjustAndMark(Visitor*) const = 0; |
93 virtual void visitWith(Visitor*) const = 0; | |
94 void trace(Visitor*); | 93 void trace(Visitor*); |
95 | 94 |
96 HTMLElement* asHTMLElement(); | 95 HTMLElement* asHTMLElement(); |
97 const HTMLElement* asHTMLElement() const; | 96 const HTMLElement* asHTMLElement() const; |
98 | 97 |
99 protected: | 98 protected: |
100 FormAssociatedElement(); | 99 FormAssociatedElement(); |
101 | 100 |
102 void insertedInto(ContainerNode*); | 101 void insertedInto(ContainerNode*); |
103 void removedFrom(ContainerNode*); | 102 void removedFrom(ContainerNode*); |
(...skipping 14 matching lines...) Expand all Loading... |
118 void resetFormAttributeTargetObserver(); | 117 void resetFormAttributeTargetObserver(); |
119 | 118 |
120 OwnPtr<FormAttributeTargetObserver> m_formAttributeTargetObserver; | 119 OwnPtr<FormAttributeTargetObserver> m_formAttributeTargetObserver; |
121 Member<HTMLFormElement> m_form; | 120 Member<HTMLFormElement> m_form; |
122 Member<ValidityState> m_validityState; | 121 Member<ValidityState> m_validityState; |
123 String m_customValidationMessage; | 122 String m_customValidationMessage; |
124 }; | 123 }; |
125 | 124 |
126 template<> class TraceTrait<FormAssociatedElement> { | 125 template<> class TraceTrait<FormAssociatedElement> { |
127 public: | 126 public: |
128 static void visit(Visitor* visitor, const FormAssociatedElement* self) { sel
f->visitWith(visitor); } | 127 static void mark(Visitor* visitor, const FormAssociatedElement* self) { self
->adjustAndMark(visitor); } |
129 static intptr_t getTypeMarker() { return 0; } | 128 static intptr_t getTypeMarker() { return 0; } |
130 static void checkTypeMarker(Visitor*, const FormAssociatedElement*) { } | 129 static void checkTypeMarker(Visitor*, const FormAssociatedElement*) { } |
131 static void trace(Visitor* visitor, void* self) { static_cast<FormAssociated
Element*>(self)->trace(visitor); } | 130 static void trace(Visitor* visitor, void* self) { static_cast<FormAssociated
Element*>(self)->trace(visitor); } |
132 }; | 131 }; |
133 | 132 |
134 } // namespace | 133 } // namespace |
135 | 134 |
136 #endif // FormAssociatedElement_h | 135 #endif // FormAssociatedElement_h |
OLD | NEW |