summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-05-11 18:35:50 +0100
committerBen Murdoch <benm@google.com>2010-05-14 10:23:05 +0100
commit21939df44de1705786c545cd1bf519d47250322d (patch)
treeef56c310f5c0cdc379c2abb2e212308a3281ce20 /WebCore/bridge
parent4ff1d8891d520763f17675827154340c7c740f90 (diff)
downloadexternal_webkit-21939df44de1705786c545cd1bf519d47250322d.zip
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.gz
external_webkit-21939df44de1705786c545cd1bf519d47250322d.tar.bz2
Merge Webkit at r58956: Initial merge by Git.
Change-Id: I1d9fb60ea2c3f2ddc04c17a871acdb39353be228
Diffstat (limited to 'WebCore/bridge')
-rw-r--r--WebCore/bridge/jni/JNIBridge.cpp4
-rw-r--r--WebCore/bridge/jni/JNIBridge.h4
-rw-r--r--WebCore/bridge/jni/JNIUtility.cpp4
-rw-r--r--WebCore/bridge/jni/JNIUtility.h4
-rw-r--r--WebCore/bridge/jni/jni_jsobject.h6
-rw-r--r--WebCore/bridge/jni/jni_jsobject.mm4
-rw-r--r--WebCore/bridge/jni/jni_objc.mm4
-rw-r--r--WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp4
-rw-r--r--WebCore/bridge/jni/jsc/JNIBridgeJSC.h4
-rw-r--r--WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp4
-rw-r--r--WebCore/bridge/jni/jsc/JNIUtilityPrivate.h4
-rw-r--r--WebCore/bridge/jni/jsc/JavaClassJSC.cpp4
-rw-r--r--WebCore/bridge/jni/jsc/JavaClassJSC.h4
-rw-r--r--WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp4
-rw-r--r--WebCore/bridge/jni/jsc/JavaInstanceJSC.h4
-rw-r--r--WebCore/bridge/npapi.h130
-rw-r--r--WebCore/bridge/npruntime.h1
-rw-r--r--WebCore/bridge/nptypes.h214
-rw-r--r--WebCore/bridge/qt/qt_instance.cpp7
-rw-r--r--WebCore/bridge/qt/qt_runtime.cpp2
20 files changed, 300 insertions, 116 deletions
diff --git a/WebCore/bridge/jni/JNIBridge.cpp b/WebCore/bridge/jni/JNIBridge.cpp
index 28e8698..35a0d34 100644
--- a/WebCore/bridge/jni/JNIBridge.cpp
+++ b/WebCore/bridge/jni/JNIBridge.cpp
@@ -27,7 +27,7 @@
#include "config.h"
#include "JNIBridge.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "StringBuilder.h"
#include <wtf/text/CString.h>
@@ -178,4 +178,4 @@ jmethodID JavaMethod::methodID(jobject obj) const
return m_methodID;
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/JNIBridge.h b/WebCore/bridge/jni/JNIBridge.h
index 5d482a7..78202ae 100644
--- a/WebCore/bridge/jni/JNIBridge.h
+++ b/WebCore/bridge/jni/JNIBridge.h
@@ -27,7 +27,7 @@
#ifndef JNIBridge_h
#define JNIBridge_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "Bridge.h"
#include "JNIUtility.h"
@@ -118,6 +118,6 @@ private:
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JNIBridge_h
diff --git a/WebCore/bridge/jni/JNIUtility.cpp b/WebCore/bridge/jni/JNIUtility.cpp
index ece39ed..4b4f393 100644
--- a/WebCore/bridge/jni/JNIUtility.cpp
+++ b/WebCore/bridge/jni/JNIUtility.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "JNIUtility.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include <dlfcn.h>
@@ -340,4 +340,4 @@ jvalue getJNIField(jobject obj, JNIType type, const char* name, const char* sign
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/JNIUtility.h b/WebCore/bridge/jni/JNIUtility.h
index 0eb889c..5fb2138 100644
--- a/WebCore/bridge/jni/JNIUtility.h
+++ b/WebCore/bridge/jni/JNIUtility.h
@@ -26,7 +26,7 @@
#ifndef JNIUtility_h
#define JNIUtility_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include <JavaVM/jni.h>
@@ -270,6 +270,6 @@ T callJNIStaticMethod(jclass cls, const char* methodName, const char* methodSign
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JNIUtility_h
diff --git a/WebCore/bridge/jni/jni_jsobject.h b/WebCore/bridge/jni/jni_jsobject.h
index d78eb97..3c87043 100644
--- a/WebCore/bridge/jni/jni_jsobject.h
+++ b/WebCore/bridge/jni/jni_jsobject.h
@@ -26,7 +26,7 @@
#ifndef JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
#define JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include <JavaVM/jni.h>
#include <runtime/JSValue.h>
@@ -128,6 +128,10 @@ jstring KJS_JSObject_JSObjectToString(JNIEnv*, jclass, jlong nativeJSObject);
#endif // PLATFORM(MAC)
+<<<<<<< HEAD:WebCore/bridge/jni/jni_jsobject.h
#endif // ENABLE(MAC_JAVA_BRIDGE)
+=======
+#endif // ENABLE(JAVA_BRIDGE)
+>>>>>>> webkit.org at r58956:WebCore/bridge/jni/jni_jsobject.h
#endif // JAVASCRIPTCORE_BINDINGS_JNI_JSOBJECT_H
diff --git a/WebCore/bridge/jni/jni_jsobject.mm b/WebCore/bridge/jni/jni_jsobject.mm
index 5e036ab..3fb794b 100644
--- a/WebCore/bridge/jni/jni_jsobject.mm
+++ b/WebCore/bridge/jni/jni_jsobject.mm
@@ -26,7 +26,7 @@
#include "config.h"
#include "jni_jsobject.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "Frame.h"
#include "JavaRuntimeObject.h"
@@ -702,4 +702,4 @@ jstring KJS_JSObject_JSObjectToString (JNIEnv*, jclass, jlong nativeHandle)
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jni_objc.mm b/WebCore/bridge/jni/jni_objc.mm
index e2e71c5..8fa2c3f 100644
--- a/WebCore/bridge/jni/jni_objc.mm
+++ b/WebCore/bridge/jni/jni_objc.mm
@@ -25,7 +25,7 @@
#include "config.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#import <Foundation/Foundation.h>
#import "JNIUtility.h"
@@ -81,4 +81,4 @@ bool JSC::Bindings::dispatchJNICall(ExecState* exec, const void* targetAppletVie
return false;
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
index 6de1011..24e2b91 100644
--- a/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JNIBridgeJSC.cpp
@@ -27,7 +27,7 @@
#include "config.h"
#include "JNIBridgeJSC.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JNIUtilityPrivate.h"
#include "Logging.h"
@@ -442,4 +442,4 @@ unsigned int JavaArray::getLength() const
return m_length;
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jsc/JNIBridgeJSC.h b/WebCore/bridge/jni/jsc/JNIBridgeJSC.h
index 902bd4e..dd65417 100644
--- a/WebCore/bridge/jni/jsc/JNIBridgeJSC.h
+++ b/WebCore/bridge/jni/jsc/JNIBridgeJSC.h
@@ -27,7 +27,7 @@
#ifndef JNIBridgeJSC_h
#define JNIBridgeJSC_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "Bridge.h"
#include "JNIBridge.h"
@@ -84,6 +84,6 @@ private:
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JNIBridge_h
diff --git a/WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp b/WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp
index b48a757..2048d8e 100644
--- a/WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp
+++ b/WebCore/bridge/jni/jsc/JNIUtilityPrivate.cpp
@@ -27,7 +27,7 @@
#include "config.h"
#include "JNIUtilityPrivate.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JavaRuntimeObject.h"
#include "JNIBridgeJSC.h"
@@ -314,4 +314,4 @@ jvalue convertValueToJValue(ExecState* exec, RootObject* rootObject, JSValue val
} // end of namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jsc/JNIUtilityPrivate.h b/WebCore/bridge/jni/jsc/JNIUtilityPrivate.h
index 8d4652d..1266acd 100644
--- a/WebCore/bridge/jni/jsc/JNIUtilityPrivate.h
+++ b/WebCore/bridge/jni/jsc/JNIUtilityPrivate.h
@@ -27,7 +27,7 @@
#ifndef JNIUtilityPrivate_h
#define JNIUtilityPrivate_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JNIUtility.h"
#include <runtime/JSValue.h>
@@ -48,6 +48,6 @@ bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JNIUtilityPrivate_h
diff --git a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
index e1b8b4c..780c4fc 100644
--- a/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaClassJSC.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "JavaClassJSC.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JNIUtility.h"
#include "JSDOMWindow.h"
@@ -147,4 +147,4 @@ bool JavaClass::isStringClass() const
return !strcmp(m_name, "java.lang.String");
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jsc/JavaClassJSC.h b/WebCore/bridge/jni/jsc/JavaClassJSC.h
index 09b93e9..0527162 100644
--- a/WebCore/bridge/jni/jsc/JavaClassJSC.h
+++ b/WebCore/bridge/jni/jsc/JavaClassJSC.h
@@ -26,7 +26,7 @@
#ifndef JavaClassJSC_h
#define JavaClassJSC_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JNIBridgeJSC.h"
#include <wtf/HashMap.h>
@@ -57,6 +57,6 @@ private:
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JavaClassJSC_h
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index d8de40a..008d1ab 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -26,7 +26,7 @@
#include "config.h"
#include "JavaInstanceJSC.h"
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "JavaRuntimeObject.h"
#include "JNIBridgeJSC.h"
@@ -392,4 +392,4 @@ JObjectWrapper::~JObjectWrapper()
m_env->DeleteGlobalRef(m_instance);
}
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
index d395cc8..53b6132 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
@@ -26,7 +26,7 @@
#ifndef JavaInstanceJSC_h
#define JavaInstanceJSC_h
-#if ENABLE(MAC_JAVA_BRIDGE)
+#if ENABLE(JAVA_BRIDGE)
#include "Bridge.h"
#include "runtime_root.h"
@@ -107,6 +107,6 @@ protected:
} // namespace JSC
-#endif // ENABLE(MAC_JAVA_BRIDGE)
+#endif // ENABLE(JAVA_BRIDGE)
#endif // JavaInstanceJSC_h
diff --git a/WebCore/bridge/npapi.h b/WebCore/bridge/npapi.h
index f82d25e..38e0905 100644
--- a/WebCore/bridge/npapi.h
+++ b/WebCore/bridge/npapi.h
@@ -43,6 +43,8 @@
#ifndef _NPAPI_H_
#define _NPAPI_H_
+#include "nptypes.h"
+
#ifdef INCLUDE_JAVA
#include "jri.h" /* Java Runtime Interface */
#else
@@ -127,42 +129,6 @@
/* Definition of Basic Types */
/*----------------------------------------------------------------------*/
-/* QNX sets the _INT16 and friends defines, but does not typedef the types */
-#ifdef __QNXNTO__
-#undef _UINT16
-#undef _INT16
-#undef _UINT32
-#undef _INT32
-#endif
-
-#ifndef _UINT16
-#define _UINT16
-typedef unsigned short uint16;
-#endif
-
-#ifndef _UINT32
-#define _UINT32
-#ifdef __LP64__
-typedef unsigned int uint32;
-#else /* __LP64__ */
-typedef unsigned long uint32;
-#endif /* __LP64__ */
-#endif
-
-#ifndef _INT16
-#define _INT16
-typedef short int16;
-#endif
-
-#ifndef _INT32
-#define _INT32
-#ifdef __LP64__
-typedef int int32;
-#else /* __LP64__ */
-typedef long int32;
-#endif /* __LP64__ */
-#endif
-
#ifndef FALSE
#define FALSE (0)
#endif
@@ -174,8 +140,8 @@ typedef long int32;
#endif
typedef unsigned char NPBool;
-typedef int16 NPError;
-typedef int16 NPReason;
+typedef int16_t NPError;
+typedef int16_t NPReason;
typedef char* NPMIMEType;
@@ -207,8 +173,8 @@ typedef struct _NPStream
void* pdata; /* plug-in private data */
void* ndata; /* netscape private data */
const char* url;
- uint32 end;
- uint32 lastmodified;
+ uint32_t end;
+ uint32_t lastmodified;
void* notifyData;
const char* headers; /* Response headers from host.
* Exists only for >= NPVERS_HAS_RESPONSE_HEADERS.
@@ -225,25 +191,25 @@ typedef struct _NPStream
typedef struct _NPByteRange
{
- int32 offset; /* negative offset means from the end */
- uint32 length;
+ int32_t offset; /* negative offset means from the end */
+ uint32_t length;
struct _NPByteRange* next;
} NPByteRange;
typedef struct _NPSavedData
{
- int32 len;
+ int32_t len;
void* buf;
} NPSavedData;
typedef struct _NPRect
{
- uint16 top;
- uint16 left;
- uint16 bottom;
- uint16 right;
+ uint16_t top;
+ uint16_t left;
+ uint16_t bottom;
+ uint16_t right;
} NPRect;
@@ -264,12 +230,12 @@ enum {
typedef struct
{
- int32 type;
+ int32_t type;
} NPAnyCallbackStruct;
typedef struct
{
- int32 type;
+ int32_t type;
Display* display;
Visual* visual;
Colormap colormap;
@@ -278,7 +244,7 @@ typedef struct
typedef struct
{
- int32 type;
+ int32_t type;
FILE* fp;
} NPPrintCallbackStruct;
@@ -498,25 +464,25 @@ typedef struct _NPNSMenu NPNSMenu;
typedef struct _NPCocoaEvent {
NPCocoaEventType type;
- uint32 version;
+ uint32_t version;
union {
struct {
- uint32 modifierFlags;
+ uint32_t modifierFlags;
double pluginX;
double pluginY;
- int32 buttonNumber;
- int32 clickCount;
+ int32_t buttonNumber;
+ int32_t clickCount;
double deltaX;
double deltaY;
double deltaZ;
} mouse;
struct {
- uint32 modifierFlags;
+ uint32_t modifierFlags;
NPNSString *characters;
NPNSString *charactersIgnoringModifiers;
NPBool isARepeat;
- uint16 keyCode;
+ uint16_t keyCode;
} key;
struct {
CGContextRef context;
@@ -540,10 +506,10 @@ typedef struct _NPCocoaEvent {
typedef struct _NPWindow
{
void* window; /* Platform specific window handle */
- int32 x; /* Position of top left corner relative */
- int32 y; /* to a netscape page. */
- uint32 width; /* Maximum window size */
- uint32 height;
+ int32_t x; /* Position of top left corner relative */
+ int32_t y; /* to a netscape page. */
+ uint32_t width; /* Maximum window size */
+ uint32_t height;
NPRect clipRect; /* Clipping rectangle in port coordinates */
/* Used by MAC only. */
#if defined(XP_UNIX) || defined(XP_SYMBIAN)
@@ -570,7 +536,7 @@ typedef struct _NPEmbedPrint
typedef struct _NPPrint
{
- uint16 mode; /* NP_FULL or NP_EMBED */
+ uint16_t mode; /* NP_FULL or NP_EMBED */
union
{
NPFullPrint fullPrint; /* if mode is NP_FULL */
@@ -603,9 +569,9 @@ typedef QEvent NPEvent;
#elif defined(XP_WIN)
typedef struct _NPEvent
{
- uint16 event;
- uint32 wParam;
- uint32 lParam;
+ uint16_t event;
+ uintptr_t wParam;
+ uintptr_t lParam;
} NPEvent;
#elif defined (XP_UNIX)
typedef XEvent NPEvent;
@@ -691,8 +657,8 @@ typedef struct NP_GLContext
typedef struct NP_Port
{
CGrafPtr port; /* Grafport */
- int32 portx; /* position inside the topmost window */
- int32 porty;
+ int32_t portx; /* position inside the topmost window */
+ int32_t porty;
} NP_Port;
#endif /* NP_NO_QUICKDRAW */
@@ -815,22 +781,22 @@ char* NPP_GetMIMEDescription(void);
NPError NPP_Initialize(void);
void NPP_Shutdown(void);
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
- uint16 mode, int16 argc, char* argn[],
+ uint16_t mode, int16_t argc, char* argn[],
char* argv[], NPSavedData* saved);
NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable,
- uint16* stype);
+ uint16_t* stype);
NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
-int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
-int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
- int32 len, void* buffer);
+int32_t NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
+int32_t NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32_t offset,
+ int32_t len, void* buffer);
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
const char* fname);
void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
-int16 NPP_HandleEvent(NPP instance, void* event);
+int16_t NPP_HandleEvent(NPP instance, void* event);
void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData);
jref NP_LOADDS NPP_GetJavaClass(void);
@@ -850,24 +816,24 @@ NPError NPN_GetURLNotify(NPP instance, const char* url,
NPError NPN_GetURL(NPP instance, const char* url,
const char* target);
NPError NPN_PostURLNotify(NPP instance, const char* url,
- const char* target, uint32 len,
+ const char* target, uint32_t len,
const char* buf, NPBool file,
void* notifyData);
NPError NPN_PostURL(NPP instance, const char* url,
- const char* target, uint32 len,
+ const char* target, uint32_t len,
const char* buf, NPBool file);
NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
NPError NPN_NewStream(NPP instance, NPMIMEType type,
const char* target, NPStream** stream);
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len,
+int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len,
void* buffer);
NPError NPN_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
void NPN_Status(NPP instance, const char* message);
const char* NPN_UserAgent(NPP instance);
-void* NPN_MemAlloc(uint32 size);
+void* NPN_MemAlloc(uint32_t size);
void NPN_MemFree(void* ptr);
-uint32 NPN_MemFlush(uint32 size);
+uint32_t NPN_MemFlush(uint32_t size);
void NPN_ReloadPlugins(NPBool reloadPages);
JRIEnv* NPN_GetJavaEnv(void);
jref NPN_GetJavaPeer(NPP instance);
@@ -881,11 +847,11 @@ void NPN_ForceRedraw(NPP instance);
void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled);
void NPN_PopPopupsEnabledState(NPP instance);
void NPN_PluginThreadAsyncCall(NPP instance, void (*func) (void *), void *userData);
-NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32* len);
-NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32 len);
-NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32 port, const char* scheme, const char *realm, char** username, uint32* ulen, char** password, uint32* plen);
-uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32 timerID));
-void NPN_UnscheduleTimer(NPP instance, uint32 timerID);
+NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const char* url, char** value, uint32_t* len);
+NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const char* url, const char* value, uint32_t len);
+NPError NPN_GetAuthenticationInfo(NPP instance, const char* protocol, const char* host, int32_t port, const char* scheme, const char *realm, char** username, uint32_t* ulen, char** password, uint32_t* plen);
+uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
+void NPN_UnscheduleTimer(NPP instance, uint32_t timerID);
NPError NPN_PopUpContextMenu(NPP instance, NPMenu* menu);
NPBool NPN_ConvertPoint(NPP instance, double sourceX, double sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY, NPCoordinateSpace destSpace);
diff --git a/WebCore/bridge/npruntime.h b/WebCore/bridge/npruntime.h
index 8a285be..d5ebcb2 100644
--- a/WebCore/bridge/npruntime.h
+++ b/WebCore/bridge/npruntime.h
@@ -72,7 +72,6 @@
extern "C" {
#endif
-#include <stdint.h>
#include "npapi.h"
/*
diff --git a/WebCore/bridge/nptypes.h b/WebCore/bridge/nptypes.h
new file mode 100644
index 0000000..11e9683
--- /dev/null
+++ b/WebCore/bridge/nptypes.h
@@ -0,0 +1,214 @@
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * mozilla.org.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Johnny Stenback <jst@mozilla.org> (Original author)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * Header file for ensuring that C99 types ([u]int32_t and bool) are
+ * available.
+ */
+
+#if defined(WIN32) || defined(OS2)
+ /*
+ * Win32 and OS/2 don't know C99, so define [u]int_16/32 here. The bool
+ * is predefined tho, both in C and C++.
+ */
+ typedef short int16_t;
+ typedef unsigned short uint16_t;
+ typedef int int32_t;
+ typedef unsigned int uint32_t;
+#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX)
+ /*
+ * AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
+ * but not bool for C.
+ */
+ #include <inttypes.h>
+
+ #ifndef __cplusplus
+ typedef int bool;
+ #endif
+#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
+ /*
+ * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
+ * u_int32_t.
+ */
+ #include <sys/types.h>
+
+ /*
+ * BSD/OS ships no header that defines uint32_t, nor bool (for C)
+ */
+ #if defined(bsdi)
+ typedef u_int32_t uint32_t;
+
+ #if !defined(__cplusplus)
+ typedef int bool;
+ #endif
+ #else
+ /*
+ * FreeBSD and OpenBSD define uint32_t and bool.
+ */
+ #include <inttypes.h>
+ #include <stdbool.h>
+ #endif
+#elif defined(BEOS)
+ #include <inttypes.h>
+#else
+ /*
+ * For those that ship a standard C99 stdint.h header file, include
+ * it. Can't do the same for stdbool.h tho, since some systems ship
+ * with a stdbool.h file that doesn't compile!
+ */
+ #include <stdint.h>
+
+ #ifndef __cplusplus
+ #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
+ #include <stdbool.h>
+ #else
+ /*
+ * GCC 2.91 can't deal with a typedef for bool, but a #define
+ * works.
+ */
+ #define bool int
+ #endif
+ #endif
+#endif
+/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * mozilla.org.
+ * Portions created by the Initial Developer are Copyright (C) 2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Johnny Stenback <jst@mozilla.org> (Original author)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * Header file for ensuring that C99 types ([u]int32_t and bool) are
+ * available.
+ */
+
+#if defined(WIN32) || defined(OS2)
+ /*
+ * Win32 and OS/2 don't know C99, so define [u]int_16/32 here. The bool
+ * is predefined tho, both in C and C++.
+ */
+ typedef short int16_t;
+ typedef unsigned short uint16_t;
+ typedef int int32_t;
+ typedef unsigned int uint32_t;
+#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX)
+ /*
+ * AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
+ * but not bool for C.
+ */
+ #include <inttypes.h>
+
+ #ifndef __cplusplus
+ typedef int bool;
+ #endif
+#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
+ /*
+ * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
+ * u_int32_t.
+ */
+ #include <sys/types.h>
+
+ /*
+ * BSD/OS ships no header that defines uint32_t, nor bool (for C)
+ */
+ #if defined(bsdi)
+ typedef u_int32_t uint32_t;
+
+ #if !defined(__cplusplus)
+ typedef int bool;
+ #endif
+ #else
+ /*
+ * FreeBSD and OpenBSD define uint32_t and bool.
+ */
+ #include <inttypes.h>
+ #include <stdbool.h>
+ #endif
+#elif defined(BEOS)
+ #include <inttypes.h>
+#else
+ /*
+ * For those that ship a standard C99 stdint.h header file, include
+ * it. Can't do the same for stdbool.h tho, since some systems ship
+ * with a stdbool.h file that doesn't compile!
+ */
+ #include <stdint.h>
+
+ #ifndef __cplusplus
+ #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
+ #include <stdbool.h>
+ #else
+ /*
+ * GCC 2.91 can't deal with a typedef for bool, but a #define
+ * works.
+ */
+ #define bool int
+ #endif
+ #endif
+#endif
diff --git a/WebCore/bridge/qt/qt_instance.cpp b/WebCore/bridge/qt/qt_instance.cpp
index 4e39371..f6f368b 100644
--- a/WebCore/bridge/qt/qt_instance.cpp
+++ b/WebCore/bridge/qt/qt_instance.cpp
@@ -171,10 +171,11 @@ QtInstance* QtInstance::getInstance(JSObject* object)
Class* QtInstance::getClass() const
{
- if (!m_object)
- return 0;
- if (!m_class)
+ if (!m_class) {
+ if (!m_object)
+ return 0;
m_class = QtClass::classForObject(m_object);
+ }
return m_class;
}
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 40ff6a1..1775815 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -897,7 +897,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
QVariantMap::const_iterator i = map.constBegin();
while (i != map.constEnd()) {
QString s = i.key();
- JSValue val = convertQVariantToValue(exec, root, i.value());
+ JSValue val = convertQVariantToValue(exec, root.get(), i.value());
if (val) {
PutPropertySlot slot;
ret->put(exec, Identifier(exec, (const UChar *)s.constData(), s.length()), val, slot);