From 11cf7efcd131d5dba01cf9dd6da2d9a71e4140bf Mon Sep 17 00:00:00 2001 From: Josh Aas Date: Fri, 4 May 2012 22:36:27 -0400 Subject: [PATCH] Bug 751602: Compile fixes for NPAPI drawing models. r=bas --- dom/plugins/base/nsNPAPIPluginInstance.h | 4 +++- dom/plugins/ipc/PluginInstanceParent.cpp | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h index 6b9efd5af816..5f0618ea7ab1 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.h +++ b/dom/plugins/base/nsNPAPIPluginInstance.h @@ -69,12 +69,14 @@ class nsIOutputStream; const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncWin; #elif defined(MOZ_X11) const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncX; -#else +#elif defined(XP_MACOSX) #ifndef NP_NO_QUICKDRAW const NPDrawingModel kDefaultDrawingModel = NPDrawingModelQuickDraw; #else const NPDrawingModel kDefaultDrawingModel = NPDrawingModelCoreGraphics; #endif +#else +const NPDrawingModel kDefaultDrawingModel = static_cast(0); #endif class nsNPAPITimer diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 6f72de0aba12..654e65329a1a 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -421,15 +421,21 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginDrawingModel( mNotifySink = new NotificationSink(this); container->SetCompositionNotifySink(mNotifySink); - } else if (drawingModel == NPDrawingModelSyncWin || -#ifdef XP_MACOSX + } else if ( +#if defined(XP_WIN) + drawingModel == NPDrawingModelSyncWin +#elif defined(XP_MACOSX) #ifndef NP_NO_QUICKDRAW drawingModel == NPDrawingModelQuickDraw || #endif drawingModel == NPDrawingModelOpenGL || - drawingModel == NPDrawingModelCoreGraphics || + drawingModel == NPDrawingModelCoreGraphics +#elif defined(MOZ_X11) + drawingModel == NPDrawingModelSyncX +#else + false #endif - drawingModel == NPDrawingModelSyncX) { + ) { *shmem = null_t(); ImageContainer *container = GetImageContainer();