diff options
author | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-04-06 10:36:47 (GMT) |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@nokia.com> | 2010-04-06 10:36:47 (GMT) |
commit | bb35b65bbfba82e0dd0ac306d3dab54436cdaff6 (patch) | |
tree | 8174cb262a960ff7b2e4aa8f1aaf154db71d2636 /src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp | |
parent | 4b27d0d887269583a0f76e922948f8c25e96ab88 (diff) | |
download | Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.zip Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.gz Qt-bb35b65bbfba82e0dd0ac306d3dab54436cdaff6.tar.bz2 |
Update src/3rdparty/webkit from trunk.
Imported from 839d8709327f925aacb3b6362c06152594def97e
in branch qtwebkit-2.0 of repository
git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit.git
Rubber-stamped-by: Simon Hausmann
Diffstat (limited to 'src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp index be50fac..78022dc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSGeolocation.cpp @@ -19,11 +19,12 @@ */ #include "config.h" + +#if ENABLE(GEOLOCATION) + #include "JSGeolocation.h" #include "Geolocation.h" -#include "Geoposition.h" -#include "JSGeoposition.h" #include <runtime/Error.h> #include <wtf/GetPtr.h> @@ -33,28 +34,13 @@ namespace WebCore { ASSERT_CLASS_FITS_IN_CELL(JSGeolocation); -/* Hash table */ - -static const HashTableValue JSGeolocationTableValues[2] = -{ - { "lastPosition", DontDelete|ReadOnly, (intptr_t)jsGeolocationLastPosition, (intptr_t)0 }, - { 0, 0, 0, 0 } -}; - -static JSC_CONST_HASHTABLE HashTable JSGeolocationTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSGeolocationTableValues, 0 }; -#else - { 2, 1, JSGeolocationTableValues, 0 }; -#endif - /* Hash table for prototype */ static const HashTableValue JSGeolocationPrototypeTableValues[4] = { - { "getCurrentPosition", DontDelete|Function, (intptr_t)jsGeolocationPrototypeFunctionGetCurrentPosition, (intptr_t)3 }, - { "watchPosition", DontDelete|Function, (intptr_t)jsGeolocationPrototypeFunctionWatchPosition, (intptr_t)3 }, - { "clearWatch", DontDelete|Function, (intptr_t)jsGeolocationPrototypeFunctionClearWatch, (intptr_t)1 }, + { "getCurrentPosition", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsGeolocationPrototypeFunctionGetCurrentPosition), (intptr_t)3 }, + { "watchPosition", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsGeolocationPrototypeFunctionWatchPosition), (intptr_t)3 }, + { "clearWatch", DontDelete|Function, (intptr_t)static_cast<NativeFunction>(jsGeolocationPrototypeFunctionClearWatch), (intptr_t)1 }, { 0, 0, 0, 0 } }; @@ -82,7 +68,7 @@ bool JSGeolocationPrototype::getOwnPropertyDescriptor(ExecState* exec, const Ide return getStaticFunctionDescriptor<JSObject>(exec, &JSGeolocationPrototypeTable, this, propertyName, descriptor); } -const ClassInfo JSGeolocation::s_info = { "Geolocation", 0, &JSGeolocationTable, 0 }; +const ClassInfo JSGeolocation::s_info = { "Geolocation", 0, 0, 0 }; JSGeolocation::JSGeolocation(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Geolocation> impl) : DOMObjectWithGlobalPointer(structure, globalObject) @@ -100,24 +86,6 @@ JSObject* JSGeolocation::createPrototype(ExecState* exec, JSGlobalObject* global return new (exec) JSGeolocationPrototype(JSGeolocationPrototype::createStructure(globalObject->objectPrototype())); } -bool JSGeolocation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) -{ - return getStaticValueSlot<JSGeolocation, Base>(exec, &JSGeolocationTable, this, propertyName, slot); -} - -bool JSGeolocation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) -{ - return getStaticValueDescriptor<JSGeolocation, Base>(exec, &JSGeolocationTable, this, propertyName, descriptor); -} - -JSValue jsGeolocationLastPosition(ExecState* exec, const Identifier&, const PropertySlot& slot) -{ - JSGeolocation* castedThis = static_cast<JSGeolocation*>(asObject(slot.slotBase())); - UNUSED_PARAM(exec); - Geolocation* imp = static_cast<Geolocation*>(castedThis->impl()); - return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->lastPosition())); -} - JSValue JSC_HOST_CALL jsGeolocationPrototypeFunctionGetCurrentPosition(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); @@ -159,3 +127,5 @@ Geolocation* toGeolocation(JSC::JSValue value) } } + +#endif // ENABLE(GEOLOCATION) |