OLD | NEW |
1 /* | 1 /* |
2 This file is part of the WebKit open source project. | 2 This file is part of the WebKit open source project. |
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! | 3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 v8::Local<v8::Signature> defaultSignature; | 181 v8::Local<v8::Signature> defaultSignature; |
182 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar
get", v8::Persistent<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCo
unt, | 182 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar
get", v8::Persistent<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCo
unt, |
183 0, 0, | 183 0, 0, |
184 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is
olate, currentWorldType); | 184 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is
olate, currentWorldType); |
185 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. | 185 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. |
186 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); | 186 v8::Local<v8::ObjectTemplate> instance = desc->InstanceTemplate(); |
187 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); | 187 v8::Local<v8::ObjectTemplate> proto = desc->PrototypeTemplate(); |
188 UNUSED_PARAM(instance); // In some cases, it will not be used. | 188 UNUSED_PARAM(instance); // In some cases, it will not be used. |
189 UNUSED_PARAM(proto); // In some cases, it will not be used. | 189 UNUSED_PARAM(proto); // In some cases, it will not be used. |
190 setCollectionIndexedGetter<TestEventTarget, Node>(desc); | 190 desc->InstanceTemplate()->SetIndexedPropertyHandler(V8TestEventTarget::index
edPropertyGetter, 0, 0, 0, nodeCollectionIndexedPropertyEnumerator<TestEventTarg
et>); |
191 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestEventTarget::namedPr
opertyGetter, 0, 0, 0, 0); | 191 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestEventTarget::namedPr
opertyGetter, 0, 0, 0, 0); |
192 desc->InstanceTemplate()->MarkAsUndetectable(); | 192 desc->InstanceTemplate()->MarkAsUndetectable(); |
193 | 193 |
194 // Custom Signature 'dispatchEvent' | 194 // Custom Signature 'dispatchEvent' |
195 const int dispatchEventArgc = 1; | 195 const int dispatchEventArgc = 1; |
196 v8::Handle<v8::FunctionTemplate> dispatchEventArgv[dispatchEventArgc] = { V8
PerIsolateData::from(isolate)->rawTemplate(&V8Event::info, currentWorldType) }; | 196 v8::Handle<v8::FunctionTemplate> dispatchEventArgv[dispatchEventArgc] = { V8
PerIsolateData::from(isolate)->rawTemplate(&V8Event::info, currentWorldType) }; |
197 v8::Handle<v8::Signature> dispatchEventSignature = v8::Signature::New(desc,
dispatchEventArgc, dispatchEventArgv); | 197 v8::Handle<v8::Signature> dispatchEventSignature = v8::Signature::New(desc,
dispatchEventArgc, dispatchEventArgv); |
198 proto->Set(v8::String::NewSymbol("dispatchEvent"), v8::FunctionTemplate::New
(TestEventTargetV8Internal::dispatchEventMethodCallback, v8Undefined(), dispatch
EventSignature)); | 198 proto->Set(v8::String::NewSymbol("dispatchEvent"), v8::FunctionTemplate::New
(TestEventTargetV8Internal::dispatchEventMethodCallback, v8Undefined(), dispatch
EventSignature)); |
199 | 199 |
200 // Custom toString template | 200 // Custom toString template |
(...skipping 20 matching lines...) Expand all Loading... |
221 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); | 221 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWor
ldType); |
222 } | 222 } |
223 | 223 |
224 bool V8TestEventTarget::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::I
solate* isolate) | 224 bool V8TestEventTarget::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::I
solate* isolate) |
225 { | 225 { |
226 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) | 226 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, MainWorld) |
227 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) | 227 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, IsolatedWo
rld) |
228 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); | 228 || V8PerIsolateData::from(isolate)->hasInstance(&info, value, WorkerWorl
d); |
229 } | 229 } |
230 | 230 |
| 231 v8::Handle<v8::Value> V8TestEventTarget::indexedPropertyGetter(uint32_t index, c
onst v8::AccessorInfo& info) |
| 232 { |
| 233 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); |
| 234 TestEventTarget* collection = toNative(info.Holder()); |
| 235 RefPtr<Node> element = collection->item(index); |
| 236 if (!element) |
| 237 return v8Undefined(); |
| 238 return toV8(element.release(), info.Holder(), info.GetIsolate()); |
| 239 } |
231 EventTarget* V8TestEventTarget::toEventTarget(v8::Handle<v8::Object> object) | 240 EventTarget* V8TestEventTarget::toEventTarget(v8::Handle<v8::Object> object) |
232 { | 241 { |
233 return toNative(object); | 242 return toNative(object); |
234 } | 243 } |
235 | 244 |
236 v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) | 245 v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::Strin
g> name, const v8::AccessorInfo& info) |
237 { | 246 { |
238 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 247 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
239 return v8Undefined(); | 248 return v8Undefined(); |
240 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 249 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 installPerContextProperties(wrapper, impl.get(), isolate); | 282 installPerContextProperties(wrapper, impl.get(), isolate); |
274 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); | 283 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD
ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep
endent); |
275 return wrapper; | 284 return wrapper; |
276 } | 285 } |
277 void V8TestEventTarget::derefObject(void* object) | 286 void V8TestEventTarget::derefObject(void* object) |
278 { | 287 { |
279 static_cast<TestEventTarget*>(object)->deref(); | 288 static_cast<TestEventTarget*>(object)->deref(); |
280 } | 289 } |
281 | 290 |
282 } // namespace WebCore | 291 } // namespace WebCore |
OLD | NEW |