diff -r 000000000000 -r 4f2f89ce4247 WebCore/generated/JSNavigation.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebCore/generated/JSNavigation.cpp Fri Sep 17 09:02:29 2010 +0300 @@ -0,0 +1,161 @@ +/* + This file is part of the WebKit open source project. + This file has been generated by generate-bindings.pl. DO NOT MODIFY! + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "config.h" + +#if ENABLE(WEB_TIMING) + +#include "JSNavigation.h" + +#include "Navigation.h" +#include +#include + +using namespace JSC; + +namespace WebCore { + +ASSERT_CLASS_FITS_IN_CELL(JSNavigation); + +/* Hash table */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSNavigationTableValues[3] = +{ + { "type", DontDelete | ReadOnly, (intptr_t)static_cast(jsNavigationType), (intptr_t)0 THUNK_GENERATOR(0) }, + { "redirectCount", DontDelete | ReadOnly, (intptr_t)static_cast(jsNavigationRedirectCount), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSNavigationTable = { 5, 3, JSNavigationTableValues, 0 }; +/* Hash table for prototype */ +#if ENABLE(JIT) +#define THUNK_GENERATOR(generator) , generator +#else +#define THUNK_GENERATOR(generator) +#endif + +static const HashTableValue JSNavigationPrototypeTableValues[4] = +{ + { "NAVIGATE", DontDelete | ReadOnly, (intptr_t)static_cast(jsNavigationNAVIGATE), (intptr_t)0 THUNK_GENERATOR(0) }, + { "RELOAD", DontDelete | ReadOnly, (intptr_t)static_cast(jsNavigationRELOAD), (intptr_t)0 THUNK_GENERATOR(0) }, + { "BACK_FORWARD", DontDelete | ReadOnly, (intptr_t)static_cast(jsNavigationBACK_FORWARD), (intptr_t)0 THUNK_GENERATOR(0) }, + { 0, 0, 0, 0 THUNK_GENERATOR(0) } +}; + +#undef THUNK_GENERATOR +static JSC_CONST_HASHTABLE HashTable JSNavigationPrototypeTable = { 8, 7, JSNavigationPrototypeTableValues, 0 }; +const ClassInfo JSNavigationPrototype::s_info = { "NavigationPrototype", 0, &JSNavigationPrototypeTable, 0 }; + +JSObject* JSNavigationPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype(exec, globalObject); +} + +bool JSNavigationPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSNavigationPrototypeTable, this, propertyName, slot); +} + +bool JSNavigationPrototype::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSNavigationPrototypeTable, this, propertyName, descriptor); +} + +const ClassInfo JSNavigation::s_info = { "Navigation", 0, &JSNavigationTable, 0 }; + +JSNavigation::JSNavigation(NonNullPassRefPtr structure, JSDOMGlobalObject* globalObject, PassRefPtr impl) + : DOMObjectWithGlobalPointer(structure, globalObject) + , m_impl(impl) +{ +} + +JSNavigation::~JSNavigation() +{ + forgetDOMObject(this, impl()); +} + +JSObject* JSNavigation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSNavigationPrototype(globalObject, JSNavigationPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSNavigation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot(exec, &JSNavigationTable, this, propertyName, slot); +} + +bool JSNavigation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) +{ + return getStaticValueDescriptor(exec, &JSNavigationTable, this, propertyName, descriptor); +} + +JSValue jsNavigationType(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSNavigation* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + Navigation* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->type()); + return result; +} + +JSValue jsNavigationRedirectCount(ExecState* exec, JSValue slotBase, const Identifier&) +{ + JSNavigation* castedThis = static_cast(asObject(slotBase)); + UNUSED_PARAM(exec); + Navigation* imp = static_cast(castedThis->impl()); + JSValue result = jsNumber(exec, imp->redirectCount()); + return result; +} + +// Constant getters + +JSValue jsNavigationNAVIGATE(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(0)); +} + +JSValue jsNavigationRELOAD(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(1)); +} + +JSValue jsNavigationBACK_FORWARD(ExecState* exec, JSValue, const Identifier&) +{ + return jsNumber(exec, static_cast(2)); +} + +JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, Navigation* object) +{ + return getDOMObjectWrapper(exec, globalObject, object); +} +Navigation* toNavigation(JSC::JSValue value) +{ + return value.inherits(&JSNavigation::s_info) ? static_cast(asObject(value))->impl() : 0; +} + +} + +#endif // ENABLE(WEB_TIMING)