[webkit-reviews] review granted: [Bug 20784] move npapi.h to C99 integer types : [Attachment 54816] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 30 12:07:58 PDT 2010


Timothy Hatcher <timothy at hatcher.name> has granted Anders Carlsson
<andersca at apple.com>'s request for review:
Bug 20784: move npapi.h to C99 integer types
https://bugs.webkit.org/show_bug.cgi?id=20784

Attachment 54816: Patch
https://bugs.webkit.org/attachment.cgi?id=54816&action=review

------- Additional Comments from Timothy Hatcher <timothy at hatcher.name>
> Index: WebCore/ChangeLog
> ===================================================================
> --- WebCore/ChangeLog (revision 58588)
> +++ WebCore/ChangeLog (working copy)
> @@ -1,3 +1,41 @@
> +2010-04-30  Anders Carlsson	<andersca at apple.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Next step towards fixing
> +	   
> +	   https://bugs.webkit.org/show_bug.cgi?id=20784
> +	   move npapi.h to C99 integer types
> +
> +	   Use the C99 types everywhere. The "old" types are still around but
will be removed
> +	   in a subsequent commit.
> +
> +	   * bridge/npapi.h:
> +	   (_NPCocoaEvent::):
> +	   * plugins/PluginPackage.h:
> +	   * plugins/PluginStream.cpp:
> +	   (WebCore::PluginStream::deliverData):
> +	   * plugins/PluginStream.h:
> +	   * plugins/PluginView.cpp:
> +	   (WebCore::PluginView::postURLNotify):
> +	   (WebCore::PluginView::postURL):
> +	   (WebCore::PluginView::write):
> +	   (WebCore::PluginView::handlePost):
> +	   * plugins/PluginView.h:
> +	   * plugins/PluginViewNone.cpp:
> +	   (WebCore::PluginView::handlePostReadFile):
> +	   * plugins/npapi.cpp:
> +	   (NPN_MemAlloc):
> +	   (NPN_MemFlush):
> +	   (NPN_PostURLNotify):
> +	   (NPN_PostURL):
> +	   (NPN_Write):
> +	   * plugins/npfunctions.h:
> +	   * plugins/win/PluginPackageWin.cpp:
> +	   (WebCore::PluginPackage::NPVersion):
> +	   * plugins/win/PluginViewWin.cpp:
> +	   (WebCore::PluginView::handlePostReadFile):
> +
>  2010-04-30  Brady Eidson  <beidson at apple.com>
>  
>	   Reviewed by Eric Carlson.
> Index: WebCore/bridge/npapi.h
> ===================================================================
> --- WebCore/bridge/npapi.h	(revision 58585)
> +++ WebCore/bridge/npapi.h	(working copy)
> @@ -176,8 +176,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;
>  
>  
> @@ -209,8 +209,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.
> @@ -227,25 +227,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;
>  
>  
> @@ -486,25 +486,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;
> @@ -528,10 +528,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)
> @@ -558,7 +558,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 */
> @@ -591,7 +591,7 @@ typedef QEvent NPEvent;
>  #elif defined(XP_WIN)
>  typedef struct _NPEvent
>  {
> -    uint16	event;
> +    uint16_t   event;
>      uintptr_t   wParam;
>      uintptr_t   lParam;
>  } NPEvent;
> @@ -803,22 +803,22 @@ char*			 NPP_GetMIMEDesc
>  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);
> @@ -838,24 +838,24 @@ NPError     NPN_GetURLNotify(NPP instanc
>  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);
> @@ -869,11 +869,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);
>      
> Index: WebCore/plugins/PluginPackage.h
> ===================================================================
> --- WebCore/plugins/PluginPackage.h	(revision 58585)
> +++ WebCore/plugins/PluginPackage.h	(working copy)
> @@ -55,7 +55,7 @@ namespace WebCore {
>	   const String& path() const { return m_path; }
>	   const String& fileName() const { return m_fileName; }
>	   const String& parentDirectory() const { return m_parentDirectory; }
> -	   uint16 NPVersion() const;
> +	   uint16_t NPVersion() const;
>	   time_t lastModified() const { return m_lastModified; }
>  
>	   const MIMEToDescriptionsMap& mimeToDescriptions() const { return
m_mimeToDescriptions; }
> Index: WebCore/plugins/PluginStream.cpp
> ===================================================================
> --- WebCore/plugins/PluginStream.cpp	(revision 58585)
> +++ WebCore/plugins/PluginStream.cpp	(working copy)
> @@ -336,20 +336,20 @@ void PluginStream::deliverData()
>      if (!m_stream.ndata || m_deliveryData->size() == 0)
>	   return;
>  
> -    int32 totalBytes = m_deliveryData->size();
> -    int32 totalBytesDelivered = 0;
> +    int32_t totalBytes = m_deliveryData->size();
> +    int32_t totalBytesDelivered = 0;
>  
>      if (m_loader)
>	   m_loader->setDefersLoading(true);
>      while (totalBytesDelivered < totalBytes) {
> -	   int32 deliveryBytes = m_pluginFuncs->writeready(m_instance,
&m_stream);
> +	   int32_t deliveryBytes = m_pluginFuncs->writeready(m_instance,
&m_stream);
>  
>	   if (deliveryBytes <= 0) {
>	       m_delayDeliveryTimer.startOneShot(0);
>	       break;
>	   } else {
>	       deliveryBytes = min(deliveryBytes, totalBytes -
totalBytesDelivered);
> -	       int32 dataLength = deliveryBytes;
> +	       int32_t dataLength = deliveryBytes;
>	       char* data = m_deliveryData->data() + totalBytesDelivered;
>  
>	       // Write the data
> Index: WebCore/plugins/PluginStream.h
> ===================================================================
> --- WebCore/plugins/PluginStream.h	(revision 58585)
> +++ WebCore/plugins/PluginStream.h	(working copy)
> @@ -109,8 +109,8 @@ namespace WebCore {
>  
>	   const NPPluginFuncs* m_pluginFuncs;
>	   NPP m_instance;
> -	   uint16 m_transferMode;
> -	   int32 m_offset;
> +	   uint16_t m_transferMode;
> +	   int32_t m_offset;
>	   WTF::CString m_headers;
>	   WTF::CString m_path;
>	   NPReason m_reason;
> Index: WebCore/plugins/PluginView.cpp
> ===================================================================
> --- WebCore/plugins/PluginView.cpp	(revision 58585)
> +++ WebCore/plugins/PluginView.cpp	(working copy)
> @@ -582,12 +582,12 @@ NPError PluginView::getURL(const char* u
>      return load(frameLoadRequest, false, 0);
>  }
>  
> -NPError PluginView::postURLNotify(const char* url, const char* target,
uint32 len, const char* buf, NPBool file, void* notifyData)
> +NPError PluginView::postURLNotify(const char* url, const char* target,
uint32_t len, const char* buf, NPBool file, void* notifyData)
>  {
>      return handlePost(url, target, len, buf, file, notifyData, true, true);
>  }
>  
> -NPError PluginView::postURL(const char* url, const char* target, uint32 len,
const char* buf, NPBool file)
> +NPError PluginView::postURL(const char* url, const char* target, uint32_t
len, const char* buf, NPBool file)
>  {
>      // As documented, only allow headers to be specified via NPP_PostURL
when using a file.
>      return handlePost(url, target, len, buf, file, 0, false, file);
> @@ -600,7 +600,7 @@ NPError PluginView::newStream(NPMIMEType
>      return NPERR_GENERIC_ERROR;
>  }
>  
> -int32 PluginView::write(NPStream* stream, int32 len, void* buffer)
> +int32_t PluginView::write(NPStream* stream, int32_t len, void* buffer)
>  {
>      notImplemented();
>      // Unsupported
> @@ -1136,7 +1136,7 @@ static inline HTTPHeaderMap parseRFC822H
>      return headerFields;
>  }
>  
> -NPError PluginView::handlePost(const char* url, const char* target, uint32
len, const char* buf, bool file, void* notifyData, bool sendNotification, bool
allowHeaders)
> +NPError PluginView::handlePost(const char* url, const char* target, uint32_t
len, const char* buf, bool file, void* notifyData, bool sendNotification, bool
allowHeaders)
>  {
>      if (!url || !len || !buf)
>	   return NPERR_INVALID_PARAM;
> Index: WebCore/plugins/PluginView.h
> ===================================================================
> --- WebCore/plugins/PluginView.h	(revision 58585)
> +++ WebCore/plugins/PluginView.h	(working copy)
> @@ -129,10 +129,10 @@ namespace WebCore {
>	   // NPN functions
>	   NPError getURLNotify(const char* url, const char* target, void*
notifyData);
>	   NPError getURL(const char* url, const char* target);
> -	   NPError postURLNotify(const char* url, const char* target, uint32
len, const char* but, NPBool file, void* notifyData);
> -	   NPError postURL(const char* url, const char* target, uint32 len,
const char* but, NPBool file);
> +	   NPError postURLNotify(const char* url, const char* target, uint32_t
len, const char* but, NPBool file, void* notifyData);
> +	   NPError postURL(const char* url, const char* target, uint32_t len,
const char* but, NPBool file);
>	   NPError newStream(NPMIMEType type, const char* target, NPStream**
stream);
> -	   int32 write(NPStream* stream, int32 len, void* buffer);
> +	   int32_t write(NPStream* stream, int32_t len, void* buffer);
>	   NPError destroyStream(NPStream* stream, NPReason reason);
>	   const char* userAgent();
>  #if ENABLE(NETSCAPE_PLUGIN_API)
> @@ -232,8 +232,8 @@ namespace WebCore {
>	   void platformDestroy();
>	   static void setCurrentPluginView(PluginView*);
>	   NPError load(const FrameLoadRequest&, bool sendNotification, void*
notifyData);
> -	   NPError handlePost(const char* url, const char* target, uint32 len,
const char* buf, bool file, void* notifyData, bool sendNotification, bool
allowHeaders);
> -	   NPError handlePostReadFile(Vector<char>& buffer, uint32 len, const
char* buf);
> +	   NPError handlePost(const char* url, const char* target, uint32_t
len, const char* buf, bool file, void* notifyData, bool sendNotification, bool
allowHeaders);
> +	   NPError handlePostReadFile(Vector<char>& buffer, uint32_t len, const
char* buf);
>	   static void freeStringArray(char** stringArray, int length);
>	   void setCallingPlugin(bool) const;
>  
> Index: WebCore/plugins/PluginViewNone.cpp
> ===================================================================
> --- WebCore/plugins/PluginViewNone.cpp	(revision 58585)
> +++ WebCore/plugins/PluginViewNone.cpp	(working copy)
> @@ -62,7 +62,7 @@ void PluginView::setNPWindowRect(const I
>  {
>  }
>  
> -NPError PluginView::handlePostReadFile(Vector<char>&, uint32, const char*)
> +NPError PluginView::handlePostReadFile(Vector<char>&, uint32_t, const char*)

>  {
>      return 0;
>  }
> Index: WebCore/plugins/npapi.cpp
> ===================================================================
> --- WebCore/plugins/npapi.cpp (revision 58585)
> +++ WebCore/plugins/npapi.cpp (working copy)
> @@ -43,7 +43,7 @@ static PluginView* pluginViewForInstance
>      return PluginView::currentPluginView();
>  }
>  
> -void* NPN_MemAlloc(uint32 size)
> +void* NPN_MemAlloc(uint32_t size)
>  {
>      return malloc(size);
>  }
> @@ -53,7 +53,7 @@ void NPN_MemFree(void* ptr)
>      free(ptr);
>  }
>  
> -uint32 NPN_MemFlush(uint32 size)
> +uint32_t NPN_MemFlush(uint32_t size)
>  {
>      // Do nothing
>      return 0;
> @@ -79,12 +79,12 @@ NPError NPN_GetURL(NPP instance, const c
>      return pluginViewForInstance(instance)->getURL(url, target);
>  }
>  
> -NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target,
uint32 len, const char* buf, NPBool file, void* notifyData)
> +NPError NPN_PostURLNotify(NPP instance, const char* url, const char* target,
uint32_t len, const char* buf, NPBool file, void* notifyData)
>  {
>      return pluginViewForInstance(instance)->postURLNotify(url, target, len,
buf, file, notifyData);
>  }
>  
> -NPError NPN_PostURL(NPP instance, const char* url, const char* target,
uint32 len, const char* buf, NPBool file)
> +NPError NPN_PostURL(NPP instance, const char* url, const char* target,
uint32_t len, const char* buf, NPBool file)
>  {
>      return pluginViewForInstance(instance)->postURL(url, target, len, buf,
file);
>  }
> @@ -94,7 +94,7 @@ NPError NPN_NewStream(NPP instance, NPMI
>      return pluginViewForInstance(instance)->newStream(type, target, stream);

>  }
>  
> -int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
> +int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)

>  {
>      return pluginViewForInstance(instance)->write(stream, len, buffer);
>  }
> Index: WebCore/plugins/npfunctions.h
> ===================================================================
> --- WebCore/plugins/npfunctions.h	(revision 58585)
> +++ WebCore/plugins/npfunctions.h	(working copy)
> @@ -40,16 +40,16 @@ extern "C" {
>  #endif
>  
>  typedef NPError (*NPN_GetURLNotifyProcPtr)(NPP instance, const char* URL,
const char* window, void* notifyData);
> -typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* URL,
const char* window, uint32 len, const char* buf, NPBool file, void*
notifyData);
> +typedef NPError (*NPN_PostURLNotifyProcPtr)(NPP instance, const char* URL,
const char* window, uint32_t len, const char* buf, NPBool file, void*
notifyData);
>  typedef NPError (*NPN_RequestReadProcPtr)(NPStream* stream, NPByteRange*
rangeList);
>  typedef NPError (*NPN_NewStreamProcPtr)(NPP instance, NPMIMEType type, const
char* window, NPStream** stream);
> -typedef int32 (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32 len,
void* buffer);
> +typedef int32_t (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t
len, void* buffer);
>  typedef NPError (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream,
NPReason reason);
>  typedef void (*NPN_StatusProcPtr)(NPP instance, const char* message);
>  typedef const char*(*NPN_UserAgentProcPtr)(NPP instance);
> -typedef void* (*NPN_MemAllocProcPtr)(uint32 size);
> +typedef void* (*NPN_MemAllocProcPtr)(uint32_t size);
>  typedef void (*NPN_MemFreeProcPtr)(void* ptr);
> -typedef uint32 (*NPN_MemFlushProcPtr)(uint32 size);
> +typedef uint32_t (*NPN_MemFlushProcPtr)(uint32_t size);
>  typedef void (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
>  typedef NPError (*NPN_GetValueProcPtr)(NPP instance, NPNVariable variable,
void *ret_value);
>  typedef NPError (*NPN_SetValueProcPtr)(NPP instance, NPPVariable variable,
void *value);
> @@ -57,18 +57,18 @@ typedef void (*NPN_InvalidateRectProcPtr
>  typedef void (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
>  typedef void (*NPN_ForceRedrawProcPtr)(NPP instance);
>  typedef NPError (*NPN_GetURLProcPtr)(NPP instance, const char* URL, const
char* window);
> -typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* URL, const
char* window, uint32 len, const char* buf, NPBool file);
> +typedef NPError (*NPN_PostURLProcPtr)(NPP instance, const char* URL, const
char* window, uint32_t len, const char* buf, NPBool file);
>  typedef void* (*NPN_GetJavaEnvProcPtr)(void);
>  typedef void* (*NPN_GetJavaPeerProcPtr)(NPP instance);
>  typedef void  (*NPN_PushPopupsEnabledStateProcPtr)(NPP instance, NPBool
enabled);
>  typedef void  (*NPN_PopPopupsEnabledStateProcPtr)(NPP instance);
>  typedef void (*NPN_PluginThreadAsyncCallProcPtr)(NPP npp, void (*func)(void
*), void *userData);
> -typedef NPError (*NPN_GetValueForURLProcPtr)(NPP npp, NPNURLVariable
variable, const char* url, char** value, uint32* len);
> -typedef NPError (*NPN_SetValueForURLProcPtr)(NPP npp, NPNURLVariable
variable, const char* url, const char* value, uint32 len);
> -typedef NPError (*NPN_GetAuthenticationInfoProcPtr)(NPP npp, const char*
protocol, const char* host, int32 port, const char* scheme, const char *realm,
char** username, uint32* ulen, char** password, uint32* plen);
> +typedef NPError (*NPN_GetValueForURLProcPtr)(NPP npp, NPNURLVariable
variable, const char* url, char** value, uint32_t* len);
> +typedef NPError (*NPN_SetValueForURLProcPtr)(NPP npp, NPNURLVariable
variable, const char* url, const char* value, uint32_t len);
> +typedef NPError (*NPN_GetAuthenticationInfoProcPtr)(NPP npp, 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);
>  
> -typedef uint32 (*NPN_ScheduleTimerProcPtr)(NPP npp, uint32 interval, NPBool
repeat, void (*timerFunc)(NPP npp, uint32 timerID));
> -typedef void (*NPN_UnscheduleTimerProcPtr)(NPP npp, uint32 timerID);
> +typedef uint32_t (*NPN_ScheduleTimerProcPtr)(NPP npp, uint32_t interval,
NPBool repeat, void (*timerFunc)(NPP npp, uint32_t timerID));
> +typedef void (*NPN_UnscheduleTimerProcPtr)(NPP npp, uint32_t timerID);
>  typedef NPError (*NPN_PopUpContextMenuProcPtr)(NPP instance, NPMenu* menu);
>  typedef NPBool (*NPN_ConvertPointProcPtr)(NPP npp, double sourceX, double
sourceY, NPCoordinateSpace sourceSpace, double *destX, double *destY,
NPCoordinateSpace destSpace);
>  
> @@ -96,16 +96,16 @@ typedef void (*NPN_SetExceptionProcPtr) 
>  typedef bool (*NPN_EnumerateProcPtr) (NPP npp, NPObject *npobj, NPIdentifier
**identifier, uint32_t *count);
>  typedef bool (*NPN_ConstructProcPtr)(NPP npp, NPObject* obj, const NPVariant
*args, uint32_t argCount, NPVariant *result);	 
>  
> -typedef NPError (*NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance,
uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
> +typedef NPError (*NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance,
uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
>  typedef NPError (*NPP_DestroyProcPtr)(NPP instance, NPSavedData** save);
>  typedef NPError (*NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
> -typedef NPError (*NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable, uint16* stype);
> +typedef NPError (*NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable, uint16_t* stype);
>  typedef NPError (*NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream,
NPReason reason);
>  typedef void (*NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream,
const char* fname);
> -typedef int32 (*NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
> -typedef int32 (*NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t
offset, int32_t len, void* buffer);
> +typedef int32_t (*NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
> +typedef int32_t (*NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t
offset, int32_t len, void* buffer);
>  typedef void (*NPP_PrintProcPtr)(NPP instance, NPPrint* platformPrint);
> -typedef int16 (*NPP_HandleEventProcPtr)(NPP instance, void* event);
> +typedef int16_t (*NPP_HandleEventProcPtr)(NPP instance, void* event);
>  typedef void (*NPP_URLNotifyProcPtr)(NPP instance, const char* URL, NPReason
reason, void* notifyData);
>  typedef NPError (*NPP_GetValueProcPtr)(NPP instance, NPPVariable variable,
void *ret_value);
>  typedef NPError (*NPP_SetValueProcPtr)(NPP instance, NPNVariable variable,
void *value);
> @@ -114,8 +114,8 @@ typedef void *(*NPP_GetJavaClassProcPtr)
>  typedef void* JRIGlobalRef; //not using this right now
>  
>  typedef struct _NPNetscapeFuncs {
> -    uint16 size;
> -    uint16 version;
> +    uint16_t size;
> +    uint16_t version;
>      
>      NPN_GetURLProcPtr geturl;
>      NPN_PostURLProcPtr posturl;
> @@ -173,8 +173,8 @@ typedef struct _NPNetscapeFuncs {
>  } NPNetscapeFuncs;
>  
>  typedef struct _NPPluginFuncs {
> -    uint16 size;
> -    uint16 version;
> +    uint16_t size;
> +    uint16_t version;
>      NPP_NewProcPtr newp;
>      NPP_DestroyProcPtr destroy;
>      NPP_SetWindowProcPtr setwindow;
> Index: WebCore/plugins/win/PluginPackageWin.cpp
> ===================================================================
> --- WebCore/plugins/win/PluginPackageWin.cpp	(revision 58585)
> +++ WebCore/plugins/win/PluginPackageWin.cpp	(working copy)
> @@ -335,7 +335,7 @@ bool PluginPackage::equal(const PluginPa
>      return true;
>  }
>  
> -uint16 PluginPackage::NPVersion() const
> +uint16_t PluginPackage::NPVersion() const
>  {
>      return NP_VERSION_MINOR;
>  }
> Index: WebCore/plugins/win/PluginViewWin.cpp
> ===================================================================
> --- WebCore/plugins/win/PluginViewWin.cpp	(revision 58585)
> +++ WebCore/plugins/win/PluginViewWin.cpp	(working copy)
> @@ -834,7 +834,7 @@ void PluginView::setNPWindowRect(const I
>      }
>  }
>  
> -NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32 len,
const char* buf)
> +NPError PluginView::handlePostReadFile(Vector<char>& buffer, uint32_t len,
const char* buf)
>  {
>      String filename(buf, len);
>  
> Index: WebKit/mac/ChangeLog
> ===================================================================
> --- WebKit/mac/ChangeLog	(revision 58588)
> +++ WebKit/mac/ChangeLog	(working copy)
> @@ -1,3 +1,63 @@
> +2010-04-30  Anders Carlsson	<andersca at apple.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Next step towards fixing
> +	   
> +	   https://bugs.webkit.org/show_bug.cgi?id=20784
> +	   move npapi.h to C99 integer types
> +
> +	   Use the C99 types everywhere. The "old" types are still around but
will be removed
> +	   in a subsequent commit.
> +
> +	   * Plugins/WebBaseNetscapePluginStream.h:
> +	   * Plugins/WebBaseNetscapePluginStream.mm:
> +	   (WebNetscapePluginStream::deliverData):
> +	   * Plugins/WebNetscapePluginView.h:
> +	   * Plugins/WebNetscapePluginView.mm:
> +	   (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
> +	   (-[WebNetscapePluginView
getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLengt
h:password:passwordLength:]):
> +	   * Plugins/npapi.mm:
> +	   (NPN_MemAlloc):
> +	   (NPN_MemFlush):
> +	   (NPN_PostURLNotify):
> +	   (NPN_PostURL):
> +	   (NPN_Write):
> +	   (NPN_ScheduleTimer):
> +	   (NPN_UnscheduleTimer):
> +	   (NPN_GetValueForURL):
> +	   (NPN_SetValueForURL):
> +	   (NPN_GetAuthenticationInfo):
> +	   (WKN_CheckIfAllowedToLoadURL):
> +	   (WKN_CancelCheckIfAllowedToLoadURL):
> +
> +2010-04-29  Anders Carlsson	<andersca at apple.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Need a short description and bug URL (OOPS!)
> +
> +	   * Plugins/WebBaseNetscapePluginStream.h:
> +	   * Plugins/WebBaseNetscapePluginStream.mm:
> +	   (WebNetscapePluginStream::deliverData):
> +	   * Plugins/WebNetscapePluginView.h:
> +	   * Plugins/WebNetscapePluginView.mm:
> +	   (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
> +	   (-[WebNetscapePluginView
getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLengt
h:password:passwordLength:]):
> +	   * Plugins/npapi.mm:
> +	   (NPN_MemAlloc):
> +	   (NPN_MemFlush):
> +	   (NPN_PostURLNotify):
> +	   (NPN_PostURL):
> +	   (NPN_Write):
> +	   (NPN_ScheduleTimer):
> +	   (NPN_UnscheduleTimer):
> +	   (NPN_GetValueForURL):
> +	   (NPN_SetValueForURL):
> +	   (NPN_GetAuthenticationInfo):
> +	   (WKN_CheckIfAllowedToLoadURL):
> +	   (WKN_CancelCheckIfAllowedToLoadURL):
> +
>  2010-04-29  Anders Carlsson	<andersca at apple.com>
>  
>	   Reviewed by Dan Bernstein.
> Index: WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
> ===================================================================
> --- WebKit/mac/Plugins/WebBaseNetscapePluginStream.h	(revision 58585)
> +++ WebKit/mac/Plugins/WebBaseNetscapePluginStream.h	(working copy)
> @@ -105,7 +105,7 @@ private:
>  
>      NPP m_plugin;
>      uint16 m_transferMode;
> -    int32 m_offset;
> +    int32_t m_offset;
>      NPStream m_stream;
>      RetainPtr<NSString> m_path;
>      int m_fileDescriptor;
> Index: WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
> ===================================================================
> --- WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm (revision 58585)
> +++ WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm (working copy)
> @@ -507,12 +507,12 @@ void WebNetscapePluginStream::deliverDat
>  
>      RefPtr<WebNetscapePluginStream> protect(this);
>  
> -    int32 totalBytes = [m_deliveryData.get() length];
> -    int32 totalBytesDelivered = 0;
> +    int32_t totalBytes = [m_deliveryData.get() length];
> +    int32_t totalBytesDelivered = 0;
>  
>      while (totalBytesDelivered < totalBytes) {
>	   PluginStopDeferrer deferrer(m_pluginView.get());
> -	   int32 deliveryBytes = m_pluginFuncs->writeready(m_plugin,
&m_stream);
> +	   int32_t deliveryBytes = m_pluginFuncs->writeready(m_plugin,
&m_stream);
>	   LOG(Plugins, "NPP_WriteReady responseURL=%@ bytes=%d",
m_responseURL.get(), deliveryBytes);
>  
>	   if (m_isTerminated)
> @@ -533,7 +533,7 @@ void WebNetscapePluginStream::deliverDat
>		  
cancelLoadAndDestroyStreamWithError(pluginCancelledConnectionError());
>		   return;
>	       }
> -	       deliveryBytes = min<int32>(deliveryBytes, [subdata length]);
> +	       deliveryBytes = min<int32_t>(deliveryBytes, [subdata length]);
>	       m_offset += deliveryBytes;
>	       totalBytesDelivered += deliveryBytes;
>	       LOG(Plugins, "NPP_Write responseURL=%@ bytes=%d
total-delivered=%d/%d", m_responseURL.get(), deliveryBytes, m_offset,
m_stream.end);
> Index: WebKit/mac/Plugins/WebNetscapePluginView.h
> ===================================================================
> --- WebKit/mac/Plugins/WebNetscapePluginView.h	(revision 58585)
> +++ WebKit/mac/Plugins/WebNetscapePluginView.h	(working copy)
> @@ -89,13 +89,13 @@ @interface WebNetscapePluginView : WebBa
>      BOOL inSetWindow;
>      BOOL shouldStopSoon;
>  
> -    uint32 currentTimerID;
> -    HashMap<uint32, PluginTimer*>* timers;
> +    uint32_t currentTimerID;
> +    HashMap<uint32_t, PluginTimer*>* timers;
>  
>      unsigned pluginFunctionCallDepth;
>      
> -    int32 specifiedHeight;
> -    int32 specifiedWidth;
> +    int32_t specifiedHeight;
> +    int32_t specifiedWidth;
>	       
>      HashSet<RefPtr<WebNetscapePluginStream> > streams;
>      RetainPtr<NSMutableDictionary> _pendingFrameLoads;
> @@ -104,7 +104,7 @@ @interface WebNetscapePluginView : WebBa
>      BOOL _isSilverlight;
>      
>      NSMutableDictionary *_containerChecksInProgress;
> -    uint32 _currentContainerCheckRequestID;
> +    uint32_t _currentContainerCheckRequestID;
>  }
>  
>  + (WebNetscapePluginView *)currentPluginView;
> @@ -146,8 +146,8 @@ // Returns the NPObject that represents 
>  - (void)handleMouseEntered:(NSEvent *)event;
>  - (void)handleMouseExited:(NSEvent *)event;
>  
> -- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const
char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool
allowed, void* context))callbackFunc context:(void*)context;
> -- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID;
> +- (uint32_t)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const
char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32_t checkID, NPBool
allowed, void* context))callbackFunc context:(void*)context;
> +- (void)cancelCheckIfAllowedToLoadURL:(uint32_t)checkID;
>  
>  @end
>  
> @@ -172,14 +172,14 @@ @interface WebNetscapePluginView (WebInt
>  - (void)forceRedraw;
>  - (NPError)getVariable:(NPNVariable)variable value:(void *)value;
>  - (NPError)setVariable:(NPPVariable)variable value:(void *)value;
> -- (uint32)scheduleTimerWithInterval:(uint32)interval repeat:(NPBool)repeat
timerFunc:(void (*)(NPP npp, uint32 timerID))timerFunc;
> -- (void)unscheduleTimer:(uint32)timerID;
> +- (uint32_t)scheduleTimerWithInterval:(uint32_t)interval
repeat:(NPBool)repeat timerFunc:(void (*)(NPP npp, uint32_t timerID))timerFunc;

> +- (void)unscheduleTimer:(uint32_t)timerID;
>  - (NPError)popUpContextMenu:(NPMenu *)menu;
> -- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url
value:(char**)value length:(uint32*)length;
> -- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url
value:(const char*)value length:(uint32)length;
> -- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol
host:(const char*)host port:(int32)port scheme:(const char*)scheme realm:(const
char*)realm
> -				       username:(char**)username
usernameLength:(uint32*)usernameLength 
> -				       password:(char**)password
passwordLength:(uint32*)passwordLength;
> +- (NPError)getVariable:(NPNURLVariable)variable forURL:(const char*)url
value:(char**)value length:(uint32_t*)length;
> +- (NPError)setVariable:(NPNURLVariable)variable forURL:(const char*)url
value:(const char*)value length:(uint32_t)length;
> +- (NPError)getAuthenticationInfoWithProtocol:(const char*) protocol
host:(const char*)host port:(int32_t)port scheme:(const char*)scheme
realm:(const char*)realm
> +				       username:(char**)username
usernameLength:(uint32_t*)usernameLength 
> +				       password:(char**)password
passwordLength:(uint32_t*)passwordLength;
>  - (char*)resolveURL:(const char*)url forTarget:(const char*)target;
>  @end
>  
> Index: WebKit/mac/Plugins/WebNetscapePluginView.mm
> ===================================================================
> --- WebKit/mac/Plugins/WebNetscapePluginView.mm	(revision 58585)
> +++ WebKit/mac/Plugins/WebNetscapePluginView.mm	(working copy)
> @@ -306,10 +306,10 @@ - (PortState)saveAndSetNewPortStateForUp
>  #endif
>      
>      window.type = NPWindowTypeWindow;
> -    window.x = (int32)boundsInWindow.origin.x; 
> -    window.y = (int32)boundsInWindow.origin.y;
> -    window.width = static_cast<uint32>(NSWidth(boundsInWindow));
> -    window.height = static_cast<uint32>(NSHeight(boundsInWindow));
> +    window.x = (int32_t)boundsInWindow.origin.x; 
> +    window.y = (int32_t)boundsInWindow.origin.y;
> +    window.width = static_cast<uint32_t>(NSWidth(boundsInWindow));
> +    window.height = static_cast<uint32_t>(NSHeight(boundsInWindow));
>      
>      // "Clip-out" the plug-in when:
>      // 1) it's not really in a window or off-screen or has no height or
width.
> @@ -2255,9 +2255,9 @@ - (NPError)setVariable:(NPNURLVariable)v
>      return NPERR_GENERIC_ERROR;
>  }
>  
> -- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr
host:(const char*)hostStr port:(int32)port scheme:(const char*)schemeStr
realm:(const char*)realmStr
> -				       username:(char**)usernameStr
usernameLength:(uint32*)usernameLength 
> -				       password:(char**)passwordStr
passwordLength:(uint32*)passwordLength
> +- (NPError)getAuthenticationInfoWithProtocol:(const char*)protocolStr
host:(const char*)hostStr port:(int32_t)port scheme:(const char*)schemeStr
realm:(const char*)realmStr
> +				       username:(char**)usernameStr
usernameLength:(uint32_t*)usernameLength 
> +				       password:(char**)passwordStr
passwordLength:(uint32_t*)passwordLength
>  {
>      if (!protocolStr || !hostStr || !schemeStr || !realmStr || !usernameStr
|| !usernameLength || !passwordStr || !passwordLength)
>	   return NPERR_GENERIC_ERROR;
> Index: WebKit/mac/Plugins/npapi.mm
> ===================================================================
> --- WebKit/mac/Plugins/npapi.mm	(revision 58585)
> +++ WebKit/mac/Plugins/npapi.mm	(working copy)
> @@ -39,7 +39,7 @@ WebNetscapePluginView *pluginViewForInst
>  
>  // general plug-in to browser functions
>  
> -void* NPN_MemAlloc(uint32 size)
> +void* NPN_MemAlloc(uint32_t size)
>  {
>      return malloc(size);
>  }
> @@ -49,7 +49,7 @@ void NPN_MemFree(void* ptr)
>      free(ptr);
>  }
>  
> -uint32 NPN_MemFlush(uint32 size)
> +uint32_t NPN_MemFlush(uint32_t size)
>  {
>      LOG(Plugins, "NPN_MemFlush");
>      return size;
> @@ -89,12 +89,12 @@ NPError NPN_GetURL(NPP instance, const c
>      return [pluginViewForInstance(instance) getURL:URL target:target];
>  }
>  
> -NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target,
uint32 len, const char* buf, NPBool file, void* notifyData)
> +NPError NPN_PostURLNotify(NPP instance, const char* URL, const char* target,
uint32_t len, const char* buf, NPBool file, void* notifyData)
>  {
>      return [pluginViewForInstance(instance) postURLNotify:URL target:target
len:len buf:buf file:file notifyData:notifyData];
>  }
>  
> -NPError NPN_PostURL(NPP instance, const char* URL, const char* target,
uint32 len, const char* buf, NPBool file)
> +NPError NPN_PostURL(NPP instance, const char* URL, const char* target,
uint32_t len, const char* buf, NPBool file)
>  {
>      return [pluginViewForInstance(instance) postURL:URL target:target
len:len buf:buf file:file];
>  }
> @@ -104,7 +104,7 @@ NPError NPN_NewStream(NPP instance, NPMI
>      return [pluginViewForInstance(instance) newStream:type target:target
stream:stream];
>  }
>  
> -int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
> +int32_t NPN_Write(NPP instance, NPStream* stream, int32_t len, void* buffer)

>  {
>      return [pluginViewForInstance(instance) write:stream len:len
buffer:buffer];
>  }
> @@ -176,12 +176,12 @@ void NPN_PluginThreadAsyncCall(NPP insta
>      PluginMainThreadScheduler::scheduler().scheduleCall(instance, func,
userData);
>  }
>  
> -uint32 NPN_ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, void
(*timerFunc)(NPP npp, uint32 timerID))
> +uint32_t NPN_ScheduleTimer(NPP instance, uint32_t interval, NPBool repeat,
void (*timerFunc)(NPP npp, uint32_t timerID))
>  {
>      return [pluginViewForInstance(instance)
scheduleTimerWithInterval:interval repeat:repeat timerFunc:timerFunc];
>  }
>  
> -void NPN_UnscheduleTimer(NPP instance, uint32 timerID)
> +void NPN_UnscheduleTimer(NPP instance, uint32_t timerID)
>  {
>      [pluginViewForInstance(instance) unscheduleTimer:timerID];
>  }
> @@ -191,17 +191,17 @@ NPError NPN_PopUpContextMenu(NPP instanc
>      return [pluginViewForInstance(instance) popUpContextMenu:menu];
>  }
>  
> -NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const
char* url, char** value, uint32* len)
> +NPError NPN_GetValueForURL(NPP instance, NPNURLVariable variable, const
char* url, char** value, uint32_t* len)
>  {
>      return [pluginViewForInstance(instance) getVariable:variable forURL:url
value:value length:len];
>  }
>  
> -NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const
char* url, const char* value, uint32 len)
> +NPError NPN_SetValueForURL(NPP instance, NPNURLVariable variable, const
char* url, const char* value, uint32_t len)
>  {
>      return [pluginViewForInstance(instance) setVariable:variable forURL:url
value:value length: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)
> +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)
>  {
>      return [pluginViewForInstance(instance)
getAuthenticationInfoWithProtocol:protocol 
>									   
host:host 
> @@ -217,12 +217,12 @@ NPBool NPN_ConvertPoint(NPP instance, do
>      return [pluginViewForInstance(instance) convertFromX:sourceX
andY:sourceY space:sourceSpace toX:destX andY:destY space:destSpace];
>  }
>  
> -uint32 WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const
char* frame, void (*callbackFunc)(NPP npp, uint32, NPBool, void*), void*
context)
> +uint32_t WKN_CheckIfAllowedToLoadURL(NPP instance, const char* url, const
char* frame, void (*callbackFunc)(NPP npp, uint32_t, NPBool, void*), void*
context)
>  {
>      return [pluginViewForInstance(instance) checkIfAllowedToLoadURL:url
frame:frame callbackFunc:callbackFunc context:context];
>  }
>  
> -void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32 checkID)
> +void WKN_CancelCheckIfAllowedToLoadURL(NPP instance, uint32_t checkID)
>  {
>      [pluginViewForInstance(instance) cancelCheckIfAllowedToLoadURL:checkID];

>  }
> Index: WebKitTools/ChangeLog
> ===================================================================
> --- WebKitTools/ChangeLog	(revision 58588)
> +++ WebKitTools/ChangeLog	(working copy)
> @@ -1,3 +1,57 @@
> +2010-04-30  Anders Carlsson	<andersca at apple.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Next step towards fixing
> +	   
> +	   https://bugs.webkit.org/show_bug.cgi?id=20784
> +	   move npapi.h to C99 integer types
> +
> +	   Use the C99 types everywhere. The "old" types are still around but
will be removed
> +	   in a subsequent commit.
> +
> +	   * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
> +	   (int32VariantToIdentifier):
> +	   (doubleVariantToIdentifier):
> +	   (testIdentifierToInt):
> +	   (testGetIntIdentifier):
> +	   * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
> +	   (NPP_New):
> +	   (NPP_NewStream):
> +	   (NPP_WriteReady):
> +	   (NPP_Write):
> +	   (NPP_HandleEvent):
> +	   * DumpRenderTree/win/TestNetscapePlugin/main.cpp:
> +	   (NPP_New):
> +	   (NPP_NewStream):
> +	   (NPP_WriteReady):
> +	   (NPP_Write):
> +	   (NPP_HandleEvent):
> +
> +2010-04-29  Anders Carlsson	<andersca at apple.com>
> +
> +	   Reviewed by NOBODY (OOPS!).
> +
> +	   Need a short description and bug URL (OOPS!)
> +
> +	   * DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp:
> +	   (int32VariantToIdentifier):
> +	   (doubleVariantToIdentifier):
> +	   (testIdentifierToInt):
> +	   (testGetIntIdentifier):
> +	   * DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp:
> +	   (NPP_New):
> +	   (NPP_NewStream):
> +	   (NPP_WriteReady):
> +	   (NPP_Write):
> +	   (NPP_HandleEvent):
> +	   * DumpRenderTree/win/TestNetscapePlugin/main.cpp:
> +	   (NPP_New):
> +	   (NPP_NewStream):
> +	   (NPP_WriteReady):
> +	   (NPP_Write):
> +	   (NPP_HandleEvent):
> +
>  2010-04-30  Steve Block  <steveblock at google.com>
>  
>	   Reviewed by Jeremy Orlow.
> Index: WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp

> ===================================================================
> --- WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp   
(revision 58585)
> +++ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp   
(working copy)
> @@ -357,7 +357,7 @@ static NPIdentifier stringVariantToIdent
>  static NPIdentifier int32VariantToIdentifier(NPVariant variant)
>  {
>      assert(NPVARIANT_IS_INT32(variant));
> -    int32 integer = NPVARIANT_TO_INT32(variant);
> +    int32_t integer = NPVARIANT_TO_INT32(variant);
>      return browser->getintidentifier(integer);
>  }
>  
> @@ -366,7 +366,7 @@ static NPIdentifier doubleVariantToIdent
>      assert(NPVARIANT_IS_DOUBLE(variant));
>      double value = NPVARIANT_TO_DOUBLE(variant);
>      // Sadly there is no "getdoubleidentifier"
> -    int32 integer = static_cast<int32>(value);
> +    int32_t integer = static_cast<int32_t>(value);
>      return browser->getintidentifier(integer);
>  }
>  
> @@ -402,7 +402,7 @@ static bool testIdentifierToInt(PluginOb
>      NPIdentifier identifier = variantToIdentifier(args[0]);
>      if (!identifier)
>	   return false;
> -    int32 integer = browser->intfromidentifier(identifier);
> +    int32_t integer = browser->intfromidentifier(identifier);
>      INT32_TO_NPVARIANT(integer, *result);
>      return true;
>  }
> @@ -552,7 +552,7 @@ static bool testGetIntIdentifier(PluginO
>	   return false;
>  
>      NPIdentifier identifier =
browser->getintidentifier((int)NPVARIANT_TO_DOUBLE(args[0]));
> -    INT32_TO_NPVARIANT((int32)(long long)identifier, *result);
> +    INT32_TO_NPVARIANT((int32_t)(long long)identifier, *result);
>      return true;
>  }
>  
> Index: WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp
> ===================================================================
> --- WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp   
(revision 58585)
> +++ WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp   
(working copy)
> @@ -66,7 +66,7 @@ void NP_Shutdown(void)
>  
>  static void executeScript(const PluginObject* obj, const char* script);
>  
> -NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16
argc, char *argn[], char *argv[], NPSavedData *saved)
> +NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t
argc, char *argn[], char *argv[], NPSavedData *saved)
>  {
>      bool forceCarbon = false;
>  
> @@ -219,7 +219,7 @@ static void executeScript(const PluginOb
>      browser->releasevariantvalue(&browserResult);
>  }
>  
> -NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
NPBool seekable, uint16 *stype)
> +NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
NPBool seekable, uint16_t *stype)
>  {
>      PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
>      obj->stream = stream;
> @@ -252,12 +252,12 @@ NPError NPP_DestroyStream(NPP instance, 
>      return NPERR_NO_ERROR;
>  }
>  
> -int32 NPP_WriteReady(NPP instance, NPStream *stream)
> +int32_t NPP_WriteReady(NPP instance, NPStream *stream)
>  {
>      return 0;
>  }
>  
> -int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len,
void *buffer)
> +int32_t NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t
len, void *buffer)
>  {
>      return 0;
>  }
> @@ -401,7 +401,7 @@ static int16_t handleEventCocoa(NPP inst
>      return 0;
>  }
>  
> -int16 NPP_HandleEvent(NPP instance, void *event)
> +int16_t NPP_HandleEvent(NPP instance, void *event)
>  {
>      PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
>      if (!obj->eventLogging)
> Index: WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp
> ===================================================================
> --- WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp       
(revision 58585)
> +++ WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp       
(working copy)
> @@ -85,13 +85,13 @@ static void executeScript(const PluginOb
>      browser->releasevariantvalue(&browserResult);
>  }
>  
> -NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16
argc, char *argn[], char *argv[], NPSavedData *saved)
> +NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t
argc, char *argn[], char *argv[], NPSavedData *saved)
>  {
>      if (browser->version >= 14) {
>	   PluginObject* obj = (PluginObject*)browser->createobject(instance,
getPluginClass());
>	   instance->pdata = obj;
>  
> -	   for (int16 i = 0; i < argc; i++) {
> +	   for (int16_t i = 0; i < argc; i++) {
>	       if (_stricmp(argn[i], "onstreamload") == 0 &&
!obj->onStreamLoad)
>		   obj->onStreamLoad = _strdup(argv[i]);
>	       else if (_stricmp(argn[i], "onStreamDestroy") == 0 &&
!obj->onStreamDestroy)
> @@ -166,7 +166,7 @@ NPError NPP_SetWindow(NPP instance, NPWi
>      return NPERR_NO_ERROR;
>  }
>  
> -NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
NPBool seekable, uint16 *stype)
> +NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
NPBool seekable, uint16_t *stype)
>  {
>      PluginObject* obj = (PluginObject*)instance->pdata;
>  
> @@ -196,12 +196,12 @@ NPError NPP_DestroyStream(NPP instance, 
>      return NPERR_NO_ERROR;
>  }
>  
> -int32 NPP_WriteReady(NPP instance, NPStream *stream)
> +int32_t NPP_WriteReady(NPP instance, NPStream *stream)
>  {
>      return 0;
>  }
>  
> -int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len,
void *buffer)
> +int32_t NPP_Write(NPP instance, NPStream *stream, int32_t offset, int32_t
len, void *buffer)
>  {
>      return 0;
>  }
> @@ -214,7 +214,7 @@ void NPP_Print(NPP instance, NPPrint *pl
>  {
>  }
>  
> -int16 NPP_HandleEvent(NPP instance, void *event)
> +int16_t NPP_HandleEvent(NPP instance, void *event)
>  {
>      PluginObject *obj = (PluginObject*)instance->pdata;
>      if (!obj->eventLogging)
WebKitTools/ChangeLog:35
 +	    Need a short description and bug URL (OOPS!)
Double change log.


More information about the webkit-reviews mailing list