WebCore/generated/JSPageTransitionEvent.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     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 "JSPageTransitionEvent.h"
       
    23 
       
    24 #include "PageTransitionEvent.h"
       
    25 #include <runtime/Error.h>
       
    26 #include <wtf/GetPtr.h>
       
    27 
       
    28 using namespace JSC;
       
    29 
       
    30 namespace WebCore {
       
    31 
       
    32 ASSERT_CLASS_FITS_IN_CELL(JSPageTransitionEvent);
       
    33 
       
    34 /* Hash table */
       
    35 #if ENABLE(JIT)
       
    36 #define THUNK_GENERATOR(generator) , generator
       
    37 #else
       
    38 #define THUNK_GENERATOR(generator)
       
    39 #endif
       
    40 
       
    41 static const HashTableValue JSPageTransitionEventTableValues[3] =
       
    42 {
       
    43     { "persisted", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsPageTransitionEventPersisted), (intptr_t)0 THUNK_GENERATOR(0) },
       
    44     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsPageTransitionEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    45     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    46 };
       
    47 
       
    48 #undef THUNK_GENERATOR
       
    49 static JSC_CONST_HASHTABLE HashTable JSPageTransitionEventTable = { 4, 3, JSPageTransitionEventTableValues, 0 };
       
    50 /* Hash table for constructor */
       
    51 #if ENABLE(JIT)
       
    52 #define THUNK_GENERATOR(generator) , generator
       
    53 #else
       
    54 #define THUNK_GENERATOR(generator)
       
    55 #endif
       
    56 
       
    57 static const HashTableValue JSPageTransitionEventConstructorTableValues[1] =
       
    58 {
       
    59     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    60 };
       
    61 
       
    62 #undef THUNK_GENERATOR
       
    63 static JSC_CONST_HASHTABLE HashTable JSPageTransitionEventConstructorTable = { 1, 0, JSPageTransitionEventConstructorTableValues, 0 };
       
    64 class JSPageTransitionEventConstructor : public DOMConstructorObject {
       
    65 public:
       
    66     JSPageTransitionEventConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    67 
       
    68     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    69     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    70     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    71     static const JSC::ClassInfo s_info;
       
    72     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    73     {
       
    74         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    75     }
       
    76 protected:
       
    77     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    78 };
       
    79 
       
    80 const ClassInfo JSPageTransitionEventConstructor::s_info = { "PageTransitionEventConstructor", 0, &JSPageTransitionEventConstructorTable, 0 };
       
    81 
       
    82 JSPageTransitionEventConstructor::JSPageTransitionEventConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    83     : DOMConstructorObject(JSPageTransitionEventConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    84 {
       
    85     putDirect(exec->propertyNames().prototype, JSPageTransitionEventPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    86 }
       
    87 
       
    88 bool JSPageTransitionEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    89 {
       
    90     return getStaticValueSlot<JSPageTransitionEventConstructor, DOMObject>(exec, &JSPageTransitionEventConstructorTable, this, propertyName, slot);
       
    91 }
       
    92 
       
    93 bool JSPageTransitionEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
    94 {
       
    95     return getStaticValueDescriptor<JSPageTransitionEventConstructor, DOMObject>(exec, &JSPageTransitionEventConstructorTable, this, propertyName, descriptor);
       
    96 }
       
    97 
       
    98 /* Hash table for prototype */
       
    99 #if ENABLE(JIT)
       
   100 #define THUNK_GENERATOR(generator) , generator
       
   101 #else
       
   102 #define THUNK_GENERATOR(generator)
       
   103 #endif
       
   104 
       
   105 static const HashTableValue JSPageTransitionEventPrototypeTableValues[2] =
       
   106 {
       
   107     { "initPageTransitionEvent", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsPageTransitionEventPrototypeFunctionInitPageTransitionEvent), (intptr_t)4 THUNK_GENERATOR(0) },
       
   108     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   109 };
       
   110 
       
   111 #undef THUNK_GENERATOR
       
   112 static JSC_CONST_HASHTABLE HashTable JSPageTransitionEventPrototypeTable = { 2, 1, JSPageTransitionEventPrototypeTableValues, 0 };
       
   113 const ClassInfo JSPageTransitionEventPrototype::s_info = { "PageTransitionEventPrototype", 0, &JSPageTransitionEventPrototypeTable, 0 };
       
   114 
       
   115 JSObject* JSPageTransitionEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   116 {
       
   117     return getDOMPrototype<JSPageTransitionEvent>(exec, globalObject);
       
   118 }
       
   119 
       
   120 bool JSPageTransitionEventPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   121 {
       
   122     return getStaticFunctionSlot<JSObject>(exec, &JSPageTransitionEventPrototypeTable, this, propertyName, slot);
       
   123 }
       
   124 
       
   125 bool JSPageTransitionEventPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   126 {
       
   127     return getStaticFunctionDescriptor<JSObject>(exec, &JSPageTransitionEventPrototypeTable, this, propertyName, descriptor);
       
   128 }
       
   129 
       
   130 const ClassInfo JSPageTransitionEvent::s_info = { "PageTransitionEvent", &JSEvent::s_info, &JSPageTransitionEventTable, 0 };
       
   131 
       
   132 JSPageTransitionEvent::JSPageTransitionEvent(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<PageTransitionEvent> impl)
       
   133     : JSEvent(structure, globalObject, impl)
       
   134 {
       
   135 }
       
   136 
       
   137 JSObject* JSPageTransitionEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   138 {
       
   139     return new (exec) JSPageTransitionEventPrototype(globalObject, JSPageTransitionEventPrototype::createStructure(JSEventPrototype::self(exec, globalObject)));
       
   140 }
       
   141 
       
   142 bool JSPageTransitionEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   143 {
       
   144     return getStaticValueSlot<JSPageTransitionEvent, Base>(exec, &JSPageTransitionEventTable, this, propertyName, slot);
       
   145 }
       
   146 
       
   147 bool JSPageTransitionEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   148 {
       
   149     return getStaticValueDescriptor<JSPageTransitionEvent, Base>(exec, &JSPageTransitionEventTable, this, propertyName, descriptor);
       
   150 }
       
   151 
       
   152 JSValue jsPageTransitionEventPersisted(ExecState* exec, JSValue slotBase, const Identifier&)
       
   153 {
       
   154     JSPageTransitionEvent* castedThis = static_cast<JSPageTransitionEvent*>(asObject(slotBase));
       
   155     UNUSED_PARAM(exec);
       
   156     PageTransitionEvent* imp = static_cast<PageTransitionEvent*>(castedThis->impl());
       
   157     JSValue result = jsBoolean(imp->persisted());
       
   158     return result;
       
   159 }
       
   160 
       
   161 JSValue jsPageTransitionEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   162 {
       
   163     JSPageTransitionEvent* domObject = static_cast<JSPageTransitionEvent*>(asObject(slotBase));
       
   164     return JSPageTransitionEvent::getConstructor(exec, domObject->globalObject());
       
   165 }
       
   166 JSValue JSPageTransitionEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   167 {
       
   168     return getDOMConstructor<JSPageTransitionEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   169 }
       
   170 
       
   171 EncodedJSValue JSC_HOST_CALL jsPageTransitionEventPrototypeFunctionInitPageTransitionEvent(ExecState* exec)
       
   172 {
       
   173     JSValue thisValue = exec->hostThisValue();
       
   174     if (!thisValue.inherits(&JSPageTransitionEvent::s_info))
       
   175         return throwVMTypeError(exec);
       
   176     JSPageTransitionEvent* castedThis = static_cast<JSPageTransitionEvent*>(asObject(thisValue));
       
   177     PageTransitionEvent* imp = static_cast<PageTransitionEvent*>(castedThis->impl());
       
   178     const String& typeArg = ustringToString(exec->argument(0).toString(exec));
       
   179     bool canBubbleArg = exec->argument(1).toBoolean(exec);
       
   180     bool cancelableArg = exec->argument(2).toBoolean(exec);
       
   181     bool persisted = exec->argument(3).toBoolean(exec);
       
   182 
       
   183     imp->initPageTransitionEvent(typeArg, canBubbleArg, cancelableArg, persisted);
       
   184     return JSValue::encode(jsUndefined());
       
   185 }
       
   186 
       
   187 
       
   188 }