|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 #include "JSValidityState.h" |
|
23 |
|
24 #include "ValidityState.h" |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 using namespace JSC; |
|
28 |
|
29 namespace WebCore { |
|
30 |
|
31 ASSERT_CLASS_FITS_IN_CELL(JSValidityState); |
|
32 |
|
33 /* Hash table */ |
|
34 #if ENABLE(JIT) |
|
35 #define THUNK_GENERATOR(generator) , generator |
|
36 #else |
|
37 #define THUNK_GENERATOR(generator) |
|
38 #endif |
|
39 |
|
40 static const HashTableValue JSValidityStateTableValues[10] = |
|
41 { |
|
42 { "valueMissing", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateValueMissing), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
43 { "typeMismatch", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateTypeMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
44 { "patternMismatch", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStatePatternMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
45 { "tooLong", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateTooLong), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
46 { "rangeUnderflow", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateRangeUnderflow), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
47 { "rangeOverflow", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateRangeOverflow), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
48 { "stepMismatch", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateStepMismatch), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
49 { "customError", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateCustomError), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
50 { "valid", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsValidityStateValid), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
51 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
52 }; |
|
53 |
|
54 #undef THUNK_GENERATOR |
|
55 static JSC_CONST_HASHTABLE HashTable JSValidityStateTable = { 34, 31, JSValidityStateTableValues, 0 }; |
|
56 /* Hash table for prototype */ |
|
57 #if ENABLE(JIT) |
|
58 #define THUNK_GENERATOR(generator) , generator |
|
59 #else |
|
60 #define THUNK_GENERATOR(generator) |
|
61 #endif |
|
62 |
|
63 static const HashTableValue JSValidityStatePrototypeTableValues[1] = |
|
64 { |
|
65 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
66 }; |
|
67 |
|
68 #undef THUNK_GENERATOR |
|
69 static JSC_CONST_HASHTABLE HashTable JSValidityStatePrototypeTable = { 1, 0, JSValidityStatePrototypeTableValues, 0 }; |
|
70 const ClassInfo JSValidityStatePrototype::s_info = { "ValidityStatePrototype", 0, &JSValidityStatePrototypeTable, 0 }; |
|
71 |
|
72 JSObject* JSValidityStatePrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
73 { |
|
74 return getDOMPrototype<JSValidityState>(exec, globalObject); |
|
75 } |
|
76 |
|
77 const ClassInfo JSValidityState::s_info = { "ValidityState", 0, &JSValidityStateTable, 0 }; |
|
78 |
|
79 JSValidityState::JSValidityState(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<ValidityState> impl) |
|
80 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
81 , m_impl(impl) |
|
82 { |
|
83 } |
|
84 |
|
85 JSValidityState::~JSValidityState() |
|
86 { |
|
87 forgetDOMObject(this, impl()); |
|
88 } |
|
89 |
|
90 JSObject* JSValidityState::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
91 { |
|
92 return new (exec) JSValidityStatePrototype(globalObject, JSValidityStatePrototype::createStructure(globalObject->objectPrototype())); |
|
93 } |
|
94 |
|
95 bool JSValidityState::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
96 { |
|
97 return getStaticValueSlot<JSValidityState, Base>(exec, &JSValidityStateTable, this, propertyName, slot); |
|
98 } |
|
99 |
|
100 bool JSValidityState::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
101 { |
|
102 return getStaticValueDescriptor<JSValidityState, Base>(exec, &JSValidityStateTable, this, propertyName, descriptor); |
|
103 } |
|
104 |
|
105 JSValue jsValidityStateValueMissing(ExecState* exec, JSValue slotBase, const Identifier&) |
|
106 { |
|
107 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
108 UNUSED_PARAM(exec); |
|
109 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
110 JSValue result = jsBoolean(imp->valueMissing()); |
|
111 return result; |
|
112 } |
|
113 |
|
114 JSValue jsValidityStateTypeMismatch(ExecState* exec, JSValue slotBase, const Identifier&) |
|
115 { |
|
116 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
117 UNUSED_PARAM(exec); |
|
118 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
119 JSValue result = jsBoolean(imp->typeMismatch()); |
|
120 return result; |
|
121 } |
|
122 |
|
123 JSValue jsValidityStatePatternMismatch(ExecState* exec, JSValue slotBase, const Identifier&) |
|
124 { |
|
125 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
126 UNUSED_PARAM(exec); |
|
127 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
128 JSValue result = jsBoolean(imp->patternMismatch()); |
|
129 return result; |
|
130 } |
|
131 |
|
132 JSValue jsValidityStateTooLong(ExecState* exec, JSValue slotBase, const Identifier&) |
|
133 { |
|
134 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
135 UNUSED_PARAM(exec); |
|
136 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
137 JSValue result = jsBoolean(imp->tooLong()); |
|
138 return result; |
|
139 } |
|
140 |
|
141 JSValue jsValidityStateRangeUnderflow(ExecState* exec, JSValue slotBase, const Identifier&) |
|
142 { |
|
143 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
144 UNUSED_PARAM(exec); |
|
145 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
146 JSValue result = jsBoolean(imp->rangeUnderflow()); |
|
147 return result; |
|
148 } |
|
149 |
|
150 JSValue jsValidityStateRangeOverflow(ExecState* exec, JSValue slotBase, const Identifier&) |
|
151 { |
|
152 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
153 UNUSED_PARAM(exec); |
|
154 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
155 JSValue result = jsBoolean(imp->rangeOverflow()); |
|
156 return result; |
|
157 } |
|
158 |
|
159 JSValue jsValidityStateStepMismatch(ExecState* exec, JSValue slotBase, const Identifier&) |
|
160 { |
|
161 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
162 UNUSED_PARAM(exec); |
|
163 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
164 JSValue result = jsBoolean(imp->stepMismatch()); |
|
165 return result; |
|
166 } |
|
167 |
|
168 JSValue jsValidityStateCustomError(ExecState* exec, JSValue slotBase, const Identifier&) |
|
169 { |
|
170 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
171 UNUSED_PARAM(exec); |
|
172 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
173 JSValue result = jsBoolean(imp->customError()); |
|
174 return result; |
|
175 } |
|
176 |
|
177 JSValue jsValidityStateValid(ExecState* exec, JSValue slotBase, const Identifier&) |
|
178 { |
|
179 JSValidityState* castedThis = static_cast<JSValidityState*>(asObject(slotBase)); |
|
180 UNUSED_PARAM(exec); |
|
181 ValidityState* imp = static_cast<ValidityState*>(castedThis->impl()); |
|
182 JSValue result = jsBoolean(imp->valid()); |
|
183 return result; |
|
184 } |
|
185 |
|
186 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, ValidityState* object) |
|
187 { |
|
188 return getDOMObjectWrapper<JSValidityState>(exec, globalObject, object); |
|
189 } |
|
190 ValidityState* toValidityState(JSC::JSValue value) |
|
191 { |
|
192 return value.inherits(&JSValidityState::s_info) ? static_cast<JSValidityState*>(asObject(value))->impl() : 0; |
|
193 } |
|
194 |
|
195 } |