PR pkg/48840: Don't assume cocoa toolkit just because OS_ARCH is Darwin
This commit is contained in:
parent
449e1755d2
commit
72e2921e30
30 changed files with 2228 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.148 2014/05/28 15:11:29 pho Exp $
|
||||
$NetBSD: distinfo,v 1.149 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
SHA1 (firefox-29.0.1.source.tar.bz2) = 2819ef63403de2bcfff5496bd21a3b8cb5dfce82
|
||||
RMD160 (firefox-29.0.1.source.tar.bz2) = f728179a12a46824971ca01cf79eb0318e4775c5
|
||||
|
@ -29,6 +29,7 @@ SHA1 (patch-config_stl__wrappers_ostream) = 7be7fe36704ffbdc070a113b46b4f391a598
|
|||
SHA1 (patch-config_system-headers) = e6d68f60e24a29fd72c7d40c3001cabd5ea17361
|
||||
SHA1 (patch-config_system__wrappers_unwind.h) = b3bdac0710179b9c8f8eabd824216d0114504491
|
||||
SHA1 (patch-content_base_src_Makefile.in) = 44016467828b787343444ba62c12637988e0f903
|
||||
SHA1 (patch-content_base_src_nsObjectLoadingContent.cpp) = f1daf958a99024c78bcc82598a65b748c507f4e3
|
||||
SHA1 (patch-content_media_AudioStream.cpp) = 70021dfd1cc86e8999f144b49a23bfb27dd24157
|
||||
SHA1 (patch-content_media_AudioStream.h) = 905a0ff67c131fbf50670b5836bff84f1284d0c4
|
||||
SHA1 (patch-content_media_Makefile.in) = 7aaac3bac94c9463ca324e05ebab4b9858f46fc5
|
||||
|
@ -48,12 +49,27 @@ SHA1 (patch-content_svg_content_src_nsSVGFilters.cpp) = ed8810687e5f5b60b64c5128
|
|||
SHA1 (patch-content_svg_content_src_nsSVGFilters.h) = 37ead5c8f14551d843be8bc09be254175b38b4d7
|
||||
SHA1 (patch-dom_indexedDB_IDBEvents.cpp) = 4b3c649fe0119b8b883cd4bcf25a594510096d50
|
||||
SHA1 (patch-dom_indexedDB_IDBEvents.h) = 7558cd531ae408736e38efa2fdbff218e2d2124f
|
||||
SHA1 (patch-dom_plugins_base_PluginPRLibrary.cpp) = fd68ac57888cca50b908fc2e156148744174f68c
|
||||
SHA1 (patch-dom_plugins_base_PluginPRLibrary.h) = 20bd00d335459c81ddf339e48c2bcd644528955e
|
||||
SHA1 (patch-dom_plugins_base_npapi.h) = f0c9fa4ffbd6589afef70b69b08f1c03daa55676
|
||||
SHA1 (patch-dom_plugins_base_npfunctions.h) = 2ebb18a7d33ec035fc30e0bcd9af8b12958e6485
|
||||
SHA1 (patch-dom_plugins_base_nsNPAPIPlugin.cpp) = 34f1abd35f972d0a335007e76b3b259a99e623eb
|
||||
SHA1 (patch-dom_plugins_base_nsNPAPIPluginInstance.cpp) = c27d8663b220ae2132121c6ccda315eb507b99b3
|
||||
SHA1 (patch-dom_plugins_base_nsNPAPIPluginInstance.h) = 2608d67d9a0e01eb58e3ef0b3f4c6af375dabc33
|
||||
SHA1 (patch-dom_plugins_base_nsPluginHost.cpp) = e1f5547cab0b4035c23d3fb98f484b8da36fd232
|
||||
SHA1 (patch-dom_plugins_base_nsPluginInstanceOwner.cpp) = a1646ed6a8ad9e829c6bdfe9c537636ede3ae29e
|
||||
SHA1 (patch-dom_plugins_base_nsPluginInstanceOwner.h) = 69c9c0f5d37639e4677d31e9d19be0d9151ae810
|
||||
SHA1 (patch-dom_plugins_ipc_PluginInstanceChild.cpp) = bc842a298b93a2ab2cc89e2e65099eb172d4e805
|
||||
SHA1 (patch-dom_plugins_ipc_PluginInstanceChild.h) = 9fa825bd2e8b0430814ccb8ad2110d0121aec6b8
|
||||
SHA1 (patch-dom_plugins_ipc_PluginInstanceParent.cpp) = 5ad46b7d9e9e7cd7340d3fded46f93947a65a69f
|
||||
SHA1 (patch-dom_plugins_ipc_PluginLibrary.h) = 95c0ca0ce07bd4b7d27b18a293f946d32fddb44a
|
||||
SHA1 (patch-dom_plugins_ipc_PluginMessageUtils.cpp) = 197d24b62d2579abfa27bd8da5cd0f2e52175163
|
||||
SHA1 (patch-dom_plugins_ipc_PluginMessageUtils.h) = 66d653b2d765c74dba738e2f9a7b9f6aab44b465
|
||||
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.cpp) = 69b0a51d733cd52e7d200052362e0faf4ec918f1
|
||||
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.cpp) = 2f3bac291304f885889cbd5e6aaa0aae50d849a1
|
||||
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 0a7f3167e939822013ae6195406657453578453e
|
||||
SHA1 (patch-dom_system_OSFileConstants.cpp) = 6c45e3d5fa3369432ff59871a8cbc6176f297794
|
||||
SHA1 (patch-dom_plugins_ipc_PluginModuleParent.cpp) = cb9e0690ccd1e746b4a40bb17c0d43bfb762f21c
|
||||
SHA1 (patch-dom_plugins_ipc_PluginModuleParent.h) = f0e11d0f781222202d1fd86835907e2e428d8c7e
|
||||
SHA1 (patch-dom_system_OSFileConstants.cpp) = 3defa673b428415d6b72103b8f1892d5c976d0ef
|
||||
SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = a2a0652d0eac018fda06e729bf5ba786dd8a3866
|
||||
SHA1 (patch-gfx__skia__include__core__SkPreConfig.h) = 6f99cf0eb5d4617d529c378707f537bc1e5cb28f
|
||||
SHA1 (patch-gfx_gl_GLContext.cpp) = 80625c5745722fdf05f9b03d00a43043da59d5e6
|
||||
|
@ -73,6 +89,8 @@ SHA1 (patch-gfx_src_nsDeviceContext.cpp) = 9f6102ef7b66508f5ca8b2754331e59c7ccf7
|
|||
SHA1 (patch-gfx_thebes_Makefile.in) = 16b63bc42870aa8c042416c6e04b3513981ca6f0
|
||||
SHA1 (patch-gfx_thebes_gfxFont.cpp) = 7888a16944c4b6371a8bdeb3fc70ed395de8e1ea
|
||||
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = e5df11499b1ec14e1d4c9a1408c0611d1c4e0574
|
||||
SHA1 (patch-image_src_imgFrame.cpp) = 242d2373234a36f37fb37a14bb54311f11643328
|
||||
SHA1 (patch-image_src_imgFrame.h) = 9082d396e731f64b13ec6c49ec44b3a4133cac36
|
||||
SHA1 (patch-intl_hyphenation_src_hnjalloc.h) = 7fcc7b0fcf5a33486214197e925fbc8e6e22e2ee
|
||||
SHA1 (patch-intl_unicharutil_util_Makefile.in) = c8f37cc420ba26b63c66fbbf69b13a8b4fea43fc
|
||||
SHA1 (patch-ipc_chromium_Makefile.in) = 3a1f5b218217fc8e5e9a07195054618071c38059
|
||||
|
@ -98,6 +116,7 @@ SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
|
|||
SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
|
||||
SHA1 (patch-js_src_gc_Memory.cpp) = 3db31553ec6f7b1fac4fd4ce11b77be1ea4208b8
|
||||
SHA1 (patch-js_src_jsmath.cpp) = 7d4993ae91e9b5e6820358165603819aefb586f9
|
||||
SHA1 (patch-layout_generic_nsObjectFrame.cpp) = 5ea44d7cf6eac92e5e7e3fc8fc063be89910f6d6
|
||||
SHA1 (patch-mb) = b661abce429a88554fca6c930b4dbf71ba6bb5cb
|
||||
SHA1 (patch-media_libcubeb_src_Makefile.in) = 671fff09dedc1aa7aea251b4856c12d78b19b23b
|
||||
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 5ef0de0ac875334e959ff0d4bfa43a2e5ab087b9
|
||||
|
@ -134,12 +153,18 @@ SHA1 (patch-pb) = 97c9b2e4cefd524dc6ba825f71c3da2a761aa1f4
|
|||
SHA1 (patch-pc) = 8b2baa88f0983a2fef4f801cf6b1ae425f6c813a
|
||||
SHA1 (patch-rc) = 2733724442a2cb49c5091146fd7e6001af686121
|
||||
SHA1 (patch-security_manager_ssl_src_nsNSSComponent.cpp) = c4c96b7d3cb0c5dbcfe3820fd52421eec2592452
|
||||
SHA1 (patch-toolkit_components_downloads_nsDownloadManager.cpp) = 551ff33446cc1b99a4f3c1bd3a5db257bd10b68a
|
||||
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__allthreads.jsm) = 12f5722de5d59f06236cad3d188c9503387805c1
|
||||
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__back.jsm) = 274b06bd4bfea5b6d7d67c0d39a484d179ed560c
|
||||
SHA1 (patch-toolkit_library_Makefile.in) = 481172e5c62b862633708106a1708a941c9ffb9d
|
||||
SHA1 (patch-toolkit_profile_nsToolkitProfileService.cpp) = 142cff366da213d1283ce32ae371915f3cf76f88
|
||||
SHA1 (patch-toolkit_toolkit.mozbuild) = 0993d50cc02c2b421e6de087dfb0a9cb30562c6b
|
||||
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 6ee6fba04a3ecc6596f8aed67f752a1075901fa8
|
||||
SHA1 (patch-toolkit_xre_nsAppRunner.cpp) = cfa9c6624139a2ee4fb0c720b987c2888bb8a078
|
||||
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 524b391a0bb1c9775a187b50570a980ca9e7f7f7
|
||||
SHA1 (patch-toolkit_xre_nsXREDirProvider.cpp) = 74786b02b50cff00544a1005c3273243ef367939
|
||||
SHA1 (patch-uriloader_exthandler_nsExternalHelperAppService.cpp) = 65f882f3eda21cc78e7ea0ad03bef9ab98b7056e
|
||||
SHA1 (patch-widget_shared_NativeKeyToDOMKeyName.h) = 7b05b2521a41ebb85fde88d1125171983cd22345
|
||||
SHA1 (patch-widget_xpwidgets_nsBaseWidget.cpp) = f55df2e11aabf60d8c99700bc97f2c22b3195c48
|
||||
SHA1 (patch-xb) = 30eea880b40cee45d1235d3292fead4b5a54bbaa
|
||||
SHA1 (patch-xc) = 8575fdac2b47966ccfb5e1cc7ca8505163e358c9
|
||||
SHA1 (patch-xe) = ca4c87dbf9bb09e0e6c270d0fa76fc69a7d6df7f
|
||||
|
@ -156,4 +181,5 @@ SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_xptcinvoke__asm__mips.S) = b2b81fc
|
|||
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_xptcinvoke__gcc__x86__unix.cpp) = 8cd42915cd32756b55894a773a1e6d7c012b4467
|
||||
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_xptcstubs__asm__mips.S) = 1bb4baf0baa223cd87a8cb85b16b37c368c45b94
|
||||
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_xptcstubs__gcc__x86__unix.cpp) = e9e336817c172187f3e15ddf539a8a2176e3e952
|
||||
SHA1 (patch-xpfe_appshell_src_nsWebShellWindow.cpp) = df88844e4fdf596f19a526a670eef8155093c6ea
|
||||
SHA1 (patch-xulrunner_installer_Makefile.in) = 9d32ff87d0962c0406ed38de995c0350dd372e49
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-content_base_src_nsObjectLoadingContent.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- content/base/src/nsObjectLoadingContent.cpp.orig 2014-05-06 22:55:16.000000000 +0000
|
||||
+++ content/base/src/nsObjectLoadingContent.cpp
|
||||
@@ -2786,7 +2786,7 @@ nsObjectLoadingContent::DoStopPlugin(nsP
|
||||
return;
|
||||
}
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
aInstanceOwner->HidePluginWindow();
|
||||
#endif
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
$NetBSD: patch-dom_plugins_base_PluginPRLibrary.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/PluginPRLibrary.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/PluginPRLibrary.cpp
|
||||
@@ -63,7 +63,7 @@ PluginPRLibrary::NP_Initialize(NPNetscap
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
-#elif defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#elif defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
nsresult
|
||||
PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs,
|
||||
NPPluginFuncs* pFuncs, NPError* error)
|
||||
@@ -149,7 +149,7 @@ nsresult
|
||||
PluginPRLibrary::NP_GetValue(void *future, NPPVariable aVariable,
|
||||
void *aValue, NPError* error)
|
||||
{
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
if (mNP_GetValue) {
|
||||
*error = mNP_GetValue(future, aVariable, aValue);
|
||||
} else {
|
||||
@@ -164,7 +164,7 @@ PluginPRLibrary::NP_GetValue(void *futur
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
nsresult
|
||||
PluginPRLibrary::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ PluginPRLibrary::GetImageContainer(NPP i
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
nsresult
|
||||
PluginPRLibrary::IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing)
|
||||
{
|
90
www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h
Normal file
90
www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h
Normal file
|
@ -0,0 +1,90 @@
|
|||
$NetBSD: patch-dom_plugins_base_PluginPRLibrary.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/PluginPRLibrary.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/PluginPRLibrary.h
|
||||
@@ -17,17 +17,17 @@ class PluginPRLibrary : public PluginLib
|
||||
{
|
||||
public:
|
||||
PluginPRLibrary(const char* aFilePath, PRLibrary* aLibrary) :
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
mNP_Initialize(nullptr),
|
||||
#else
|
||||
mNP_Initialize(nullptr),
|
||||
#endif
|
||||
mNP_Shutdown(nullptr),
|
||||
mNP_GetMIMEDescription(nullptr),
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
mNP_GetValue(nullptr),
|
||||
#endif
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
mNP_GetEntryPoints(nullptr),
|
||||
#endif
|
||||
mNPP_New(nullptr),
|
||||
@@ -60,19 +60,19 @@ public:
|
||||
|
||||
mNP_GetMIMEDescription = (NP_GetMIMEDescriptionFunc)
|
||||
PR_FindFunctionSymbol(mLibrary, "NP_GetMIMEDescription");
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
if (!mNP_GetMIMEDescription)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
mNP_GetValue = (NP_GetValueFunc)
|
||||
PR_FindFunctionSymbol(mLibrary, "NP_GetValue");
|
||||
if (!mNP_GetValue)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
mNP_GetEntryPoints = (NP_GetEntryPointsFunc)
|
||||
PR_FindFunctionSymbol(mLibrary, "NP_GetEntryPoints");
|
||||
if (!mNP_GetEntryPoints)
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_GONK)
|
||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs,
|
||||
NPPluginFuncs* pFuncs, NPError* error);
|
||||
#else
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
||||
void *aValue, NPError* error);
|
||||
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
virtual nsresult NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error);
|
||||
#endif
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
virtual nsresult GetImageContainer(NPP instance, mozilla::layers::ImageContainer** aContainer);
|
||||
virtual nsresult GetImageSize(NPP instance, nsIntSize* aSize);
|
||||
virtual bool IsOOP() MOZ_OVERRIDE { return false; }
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
virtual nsresult IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing);
|
||||
virtual nsresult ContentsScaleFactorChanged(NPP instance, double aContentsScaleFactor);
|
||||
#endif
|
||||
@@ -127,10 +127,10 @@ private:
|
||||
NP_InitializeFunc mNP_Initialize;
|
||||
NP_ShutdownFunc mNP_Shutdown;
|
||||
NP_GetMIMEDescriptionFunc mNP_GetMIMEDescription;
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
NP_GetValueFunc mNP_GetValue;
|
||||
#endif
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
NP_GetEntryPointsFunc mNP_GetEntryPoints;
|
||||
#endif
|
||||
NPP_NewProcPtr mNPP_New;
|
87
www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp
Normal file
87
www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp
Normal file
|
@ -0,0 +1,87 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsNPAPIPlugin.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsNPAPIPlugin.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsNPAPIPlugin.cpp
|
||||
@@ -302,7 +302,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPlug
|
||||
prefFile.Cut(0, slashPos + 1);
|
||||
ToLowerCase(prefFile);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#if defined(__i386__)
|
||||
nsAutoCString prefGroupKey("dom.ipc.plugins.enabled.i386.");
|
||||
#elif defined(__x86_64__)
|
||||
@@ -364,7 +364,7 @@ nsNPAPIPlugin::RunPluginOOP(const nsPlug
|
||||
|
||||
if (!prefSet) {
|
||||
oopPluginsEnabled =
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#if defined(__i386__)
|
||||
Preferences::GetBool("dom.ipc.plugins.enabled.i386", false);
|
||||
#elif defined(__x86_64__)
|
||||
@@ -417,7 +417,7 @@ nsNPAPIPlugin::CreatePlugin(nsPluginTag
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
-#if defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID)
|
||||
+#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID)
|
||||
if (!pluginLib->HasRequiredFunctions()) {
|
||||
NS_WARNING("Not all necessary functions exposed by plugin, it will not load.");
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -443,7 +443,7 @@ nsNPAPIPlugin::CreatePlugin(nsPluginTag
|
||||
if (rv != NS_OK || pluginCallError != NPERR_NO_ERROR) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
// NP_Initialize must be called before NP_GetEntryPoints on Mac OS X.
|
||||
// We need to match WebKit's behavior.
|
||||
rv = pluginLib->NP_Initialize(&sBrowserFuncs, &pluginCallError);
|
||||
@@ -1892,7 +1892,7 @@ _getvalue(NPP npp, NPNVariable variable,
|
||||
PluginDestructionGuard guard(npp);
|
||||
|
||||
switch(variable) {
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
case NPNVxDisplay : {
|
||||
#if defined(MOZ_X11)
|
||||
if (npp) {
|
||||
@@ -2027,7 +2027,7 @@ _getvalue(NPP npp, NPNVariable variable,
|
||||
}
|
||||
|
||||
case NPNVSupportsWindowless: {
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || \
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || \
|
||||
(defined(MOZ_X11) && (defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)))
|
||||
*(NPBool*)result = true;
|
||||
#else
|
||||
@@ -2089,7 +2089,7 @@ _getvalue(NPP npp, NPNVariable variable,
|
||||
return *(char**)result ? NPERR_NO_ERROR : NPERR_GENERIC_ERROR;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
case NPNVpluginDrawingModel: {
|
||||
if (npp) {
|
||||
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance*)npp->ndata;
|
||||
@@ -2376,7 +2376,7 @@ _setvalue(NPP npp, NPPVariable variable,
|
||||
// actual pointer value is checked rather than its content
|
||||
// when passing booleans
|
||||
case NPPVpluginWindowBool: {
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// This setting doesn't apply to OS X (only to Windows and Unix/Linux).
|
||||
// See https://developer.mozilla.org/En/NPN_SetValue#section_5. Return
|
||||
// NPERR_NO_ERROR here to conform to other browsers' behavior on OS X
|
||||
@@ -2420,7 +2420,7 @@ _setvalue(NPP npp, NPPVariable variable,
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
case NPPVpluginEventModel: {
|
||||
if (inst) {
|
||||
inst->SetEventModel((NPEventModel)NS_PTR_TO_INT32(result));
|
|
@ -0,0 +1,42 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsNPAPIPluginInstance.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsNPAPIPluginInstance.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsNPAPIPluginInstance.cpp
|
||||
@@ -807,7 +807,7 @@ void nsNPAPIPluginInstance::RedrawPlugin
|
||||
mOwner->RedrawPlugin();
|
||||
}
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
void nsNPAPIPluginInstance::SetEventModel(NPEventModel aModel)
|
||||
{
|
||||
// the event model needs to be set for the object frame immediately
|
||||
@@ -1092,7 +1092,7 @@ nsNPAPIPluginInstance* nsNPAPIPluginInst
|
||||
|
||||
nsresult nsNPAPIPluginInstance::GetDrawingModel(int32_t* aModel)
|
||||
{
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
*aModel = (int32_t)mDrawingModel;
|
||||
return NS_OK;
|
||||
#else
|
||||
@@ -1102,7 +1102,7 @@ nsresult nsNPAPIPluginInstance::GetDrawi
|
||||
|
||||
nsresult nsNPAPIPluginInstance::IsRemoteDrawingCoreAnimation(bool* aDrawing)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!mPlugin)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@@ -1118,7 +1118,7 @@ nsresult nsNPAPIPluginInstance::IsRemote
|
||||
|
||||
nsresult nsNPAPIPluginInstance::ContentsScaleFactorChanged(double aContentsScaleFactor)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!mPlugin)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsNPAPIPluginInstance.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsNPAPIPluginInstance.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsNPAPIPluginInstance.h
|
||||
@@ -41,7 +41,7 @@ class nsPluginInstanceOwner;
|
||||
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncWin;
|
||||
#elif defined(MOZ_X11)
|
||||
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelSyncX;
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
#ifndef NP_NO_QUICKDRAW
|
||||
const NPDrawingModel kDefaultDrawingModel = NPDrawingModelQuickDraw; // Not supported
|
||||
#else
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
|
||||
void SetDrawingModel(NPDrawingModel aModel);
|
||||
void RedrawPlugin();
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
void SetEventModel(NPEventModel aModel);
|
||||
#endif
|
||||
|
33
www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp
Normal file
33
www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsPluginHost.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsPluginHost.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsPluginHost.cpp
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "nsIProtocolProxyService2.h"
|
||||
#include "nsIStreamConverterService.h"
|
||||
#include "nsIFile.h"
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
#include "nsILocalFileMac.h"
|
||||
#endif
|
||||
#include "nsISeekableStream.h"
|
||||
@@ -1605,7 +1605,7 @@ int64_t GetPluginLastModifiedTime(const
|
||||
{
|
||||
PRTime fileModTime = 0;
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// On OS X the date of a bundle's "contents" (i.e. of its Info.plist file)
|
||||
// is a much better guide to when it was last modified than the date of
|
||||
// its package directory. See bug 313700.
|
||||
@@ -2490,7 +2490,7 @@ nsPluginHost::ReadPluginInfo()
|
||||
if (!ReadSectionHeader(reader, "PLUGINS"))
|
||||
return rv;
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
bool hasFullPathInFileNameField = false;
|
||||
#else
|
||||
bool hasFullPathInFileNameField = (version < "0.11");
|
|
@ -0,0 +1,247 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsPluginInstanceOwner.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsPluginInstanceOwner.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsPluginInstanceOwner.cpp
|
||||
@@ -75,7 +75,7 @@ static NS_DEFINE_CID(kAppShellCID, NS_AP
|
||||
#include <winuser.h>
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include <Carbon/Carbon.h>
|
||||
#include "nsPluginUtilsOSX.h"
|
||||
#endif
|
||||
@@ -232,7 +232,7 @@ nsPluginInstanceOwner::EndUpdateBackgrou
|
||||
bool
|
||||
nsPluginInstanceOwner::UseAsyncRendering()
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (mUseAsyncRendering) {
|
||||
return true;
|
||||
}
|
||||
@@ -241,13 +241,13 @@ nsPluginInstanceOwner::UseAsyncRendering
|
||||
bool isOOP;
|
||||
bool result = (mInstance &&
|
||||
NS_SUCCEEDED(mInstance->GetIsOOP(&isOOP)) && isOOP
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
&& (!mPluginWindow ||
|
||||
mPluginWindow->type == NPWindowTypeDrawable)
|
||||
#endif
|
||||
);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (result) {
|
||||
mUseAsyncRendering = true;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ nsPluginInstanceOwner::nsPluginInstanceO
|
||||
mObjectFrame = nullptr;
|
||||
mContent = nullptr;
|
||||
mWidgetCreationComplete = false;
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
memset(&mCGPluginPortCopy, 0, sizeof(NP_CGContext));
|
||||
mInCGPaintLevel = 0;
|
||||
mSentInitialTopLevelWindowEvent = false;
|
||||
@@ -297,7 +297,7 @@ nsPluginInstanceOwner::nsPluginInstanceO
|
||||
mCachedAttrParamValues = nullptr;
|
||||
mLastMouseDownButtonType = -1;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#ifndef NP_NO_CARBON
|
||||
// We don't support Carbon, but it is still the default model for i386 NPAPI.
|
||||
mEventModel = NPEventModelCarbon;
|
||||
@@ -601,7 +601,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::Inv
|
||||
if (!mObjectFrame || !invalidRect || !mWidgetVisible)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
-#if defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID)
|
||||
+#if defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID)
|
||||
// Each time an asynchronously-drawing plugin sends a new surface to display,
|
||||
// the image in the ImageContainer is updated and InvalidateRect is called.
|
||||
// There are different side effects for (sync) Android plugins.
|
||||
@@ -609,7 +609,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::Inv
|
||||
mInstance->GetImageContainer(getter_AddRefs(container));
|
||||
#endif
|
||||
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
// Windowed plugins should not be calling NPN_InvalidateRect, but
|
||||
// Silverlight does and expects it to "work"
|
||||
if (mWidget) {
|
||||
@@ -728,7 +728,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::Get
|
||||
|
||||
NS_IMETHODIMP nsPluginInstanceOwner::SetEventModel(int32_t eventModel)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mEventModel = static_cast<NPEventModel>(eventModel);
|
||||
return NS_OK;
|
||||
#else
|
||||
@@ -741,7 +741,7 @@ NPError nsPluginInstanceOwner::ShowNativ
|
||||
if (!menu || !event)
|
||||
return NPERR_GENERIC_ERROR;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (GetEventModel() != NPEventModelCocoa)
|
||||
return NPERR_INCOMPATIBLE_VERSION_ERROR;
|
||||
|
||||
@@ -755,7 +755,7 @@ NPError nsPluginInstanceOwner::ShowNativ
|
||||
NPBool nsPluginInstanceOwner::ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace,
|
||||
double *destX, double *destY, NPCoordinateSpace destSpace)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!mWidget)
|
||||
return false;
|
||||
|
||||
@@ -1122,7 +1122,7 @@ nsresult nsPluginInstanceOwner::EnsureCa
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
|
||||
static void InitializeNPCocoaEvent(NPCocoaEvent* event)
|
||||
{
|
||||
@@ -1384,7 +1384,7 @@ nsPluginInstanceOwner::GetEventloopNesti
|
||||
uint32_t currentLevel = 0;
|
||||
if (appShell) {
|
||||
appShell->GetEventloopNestingLevel(¤tLevel);
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Cocoa widget code doesn't process UI events through the normal
|
||||
// appshell event loop, so it needs an additional count here.
|
||||
currentLevel++;
|
||||
@@ -1598,7 +1598,7 @@ nsresult nsPluginInstanceOwner::Dispatch
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow)) {
|
||||
// continue only for cases without child window
|
||||
return aFocusEvent->PreventDefault(); // consume event
|
||||
@@ -1622,7 +1622,7 @@ nsresult nsPluginInstanceOwner::Dispatch
|
||||
|
||||
nsresult nsPluginInstanceOwner::ProcessKeyPress(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
return DispatchKeyToPlugin(aKeyEvent);
|
||||
#else
|
||||
if (SendNativeEvents())
|
||||
@@ -1640,7 +1640,7 @@ nsresult nsPluginInstanceOwner::ProcessK
|
||||
|
||||
nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent)
|
||||
{
|
||||
-#if !defined(XP_MACOSX)
|
||||
+#if !defined(MOZ_WIDGET_COCOA)
|
||||
if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow))
|
||||
return aKeyEvent->PreventDefault(); // consume event
|
||||
// continue only for cases without child window
|
||||
@@ -1664,7 +1664,7 @@ nsresult nsPluginInstanceOwner::Dispatch
|
||||
nsresult
|
||||
nsPluginInstanceOwner::ProcessMouseDown(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
-#if !defined(XP_MACOSX)
|
||||
+#if !defined(MOZ_WIDGET_COCOA)
|
||||
if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow))
|
||||
return aMouseEvent->PreventDefault(); // consume event
|
||||
// continue only for cases without child window
|
||||
@@ -1697,7 +1697,7 @@ nsPluginInstanceOwner::ProcessMouseDown(
|
||||
|
||||
nsresult nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent* aMouseEvent)
|
||||
{
|
||||
-#if !defined(XP_MACOSX)
|
||||
+#if !defined(MOZ_WIDGET_COCOA)
|
||||
if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow))
|
||||
return aMouseEvent->PreventDefault(); // consume event
|
||||
// continue only for cases without child window
|
||||
@@ -1802,7 +1802,7 @@ nsEventStatus nsPluginInstanceOwner::Pro
|
||||
if (!mInstance || !mObjectFrame) // if mInstance is null, we shouldn't be here
|
||||
return nsEventStatus_eIgnore;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!mWidget)
|
||||
return nsEventStatus_eIgnore;
|
||||
|
||||
@@ -2338,7 +2338,7 @@ nsPluginInstanceOwner::Destroy()
|
||||
{
|
||||
SetFrame(nullptr);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
RemoveFromCARefreshTimer();
|
||||
if (mColorProfile)
|
||||
::CGColorSpaceRelease(mColorProfile);
|
||||
@@ -2394,7 +2394,7 @@ nsPluginInstanceOwner::Destroy()
|
||||
|
||||
// Paints are handled differently, so we just simulate an update event.
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
void nsPluginInstanceOwner::Paint(const gfxRect& aDirtyRect, CGContextRef cgContext)
|
||||
{
|
||||
if (!mInstance || !mObjectFrame)
|
||||
@@ -2813,7 +2813,7 @@ void* nsPluginInstanceOwner::GetPluginPo
|
||||
result = mWidget->GetNativeData(NS_NATIVE_GRAPHIC);
|
||||
else
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (GetDrawingModel() == NPDrawingModelCoreGraphics ||
|
||||
GetDrawingModel() == NPDrawingModelCoreAnimation ||
|
||||
GetDrawingModel() == NPDrawingModelInvalidatingCoreAnimation)
|
||||
@@ -2881,7 +2881,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::Cre
|
||||
mWidget->Show(false);
|
||||
mWidget->Enable(false);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Now that we have a widget we want to set the event model before
|
||||
// any events are processed.
|
||||
nsCOMPtr<nsIPluginWidget> pluginWidget = do_QueryInterface(mWidget);
|
||||
@@ -2942,7 +2942,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::Cre
|
||||
}
|
||||
|
||||
// Mac specific code to fix up the port location and clipping region
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
|
||||
void* nsPluginInstanceOwner::FixUpPluginWindow(int32_t inPaintState)
|
||||
{
|
||||
@@ -3062,7 +3062,7 @@ nsPluginInstanceOwner::HidePluginWindow(
|
||||
}
|
||||
}
|
||||
|
||||
-#else // XP_MACOSX
|
||||
+#else // MOZ_WIDGET_COCOA
|
||||
|
||||
void nsPluginInstanceOwner::UpdateWindowPositionAndClipRect(bool aSetWindow)
|
||||
{
|
||||
@@ -3137,7 +3137,7 @@ nsPluginInstanceOwner::UpdateDocumentAct
|
||||
}
|
||||
#endif
|
||||
}
|
||||
-#endif // XP_MACOSX
|
||||
+#endif // MOZ_WIDGET_COCOA
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPluginInstanceOwner::CallSetWindow()
|
||||
@@ -3163,7 +3163,7 @@ nsPluginInstanceOwner::GetContentsScaleF
|
||||
// On Mac, device pixels need to be translated to (and from) "display pixels"
|
||||
// for plugins. On other platforms, plugin coordinates are always in device
|
||||
// pixels.
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
nsIPresShell* presShell = nsContentUtils::FindPresShellForDocument(mContent->OwnerDoc());
|
||||
if (presShell) {
|
||||
scaleFactor = double(nsPresContext::AppUnitsPerCSSPixel())/
|
|
@ -0,0 +1,83 @@
|
|||
$NetBSD: patch-dom_plugins_base_nsPluginInstanceOwner.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/base/nsPluginInstanceOwner.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/base/nsPluginInstanceOwner.h
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "nsWeakReference.h"
|
||||
#include "gfxRect.h"
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "mozilla/gfx/QuartzSupport.h"
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#endif
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
#ifdef XP_WIN
|
||||
void Paint(const RECT& aDirty, HDC aDC);
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
void Paint(const gfxRect& aDirtyRect, CGContextRef cgContext);
|
||||
void RenderCoreAnimation(CGContextRef aCGContext, int aWidth, int aHeight);
|
||||
void DoCocoaEventDrawRect(const gfxRect& aDrawRect, CGContextRef cgContext);
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
nsEventStatus ProcessEvent(const mozilla::WidgetGUIEvent& anEvent);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
enum { ePluginPaintEnable, ePluginPaintDisable };
|
||||
|
||||
NPDrawingModel GetDrawingModel();
|
||||
@@ -194,11 +194,11 @@ public:
|
||||
// CoreGraphics drawing model).
|
||||
void BeginCGPaint();
|
||||
void EndCGPaint();
|
||||
-#else // XP_MACOSX
|
||||
+#else // MOZ_WIDGET_COCOA
|
||||
void UpdateWindowPositionAndClipRect(bool aSetWindow);
|
||||
void UpdateWindowVisibility(bool aVisible);
|
||||
void UpdateDocumentActiveState(bool aIsActive);
|
||||
-#endif // XP_MACOSX
|
||||
+#endif // MOZ_WIDGET_COCOA
|
||||
|
||||
void SetFrame(nsObjectFrame *aFrame);
|
||||
nsObjectFrame* GetFrame();
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
return mPluginWindow->type == NPWindowTypeDrawable &&
|
||||
(MatchPluginName("Shockwave Flash") ||
|
||||
MatchPluginName("Test Plug-in"));
|
||||
-#elif defined(MOZ_X11) || defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_X11) || defined(MOZ_WIDGET_COCOA)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -328,7 +328,7 @@ private:
|
||||
nsCOMPtr<nsIWidget> mWidget;
|
||||
nsRefPtr<nsPluginHost> mPluginHost;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
NP_CGContext mCGPluginPortCopy;
|
||||
int32_t mInCGPaintLevel;
|
||||
mozilla::RefPtr<MacIOSurface> mIOSurface;
|
||||
@@ -345,7 +345,7 @@ private:
|
||||
uint32_t mLastEventloopNestingLevel;
|
||||
bool mContentFocused;
|
||||
bool mWidgetVisible; // used on Mac to store our widget's visible state
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
bool mPluginPortChanged;
|
||||
#endif
|
||||
#ifdef MOZ_X11
|
||||
@@ -360,7 +360,7 @@ private:
|
||||
char **mCachedAttrParamNames;
|
||||
char **mCachedAttrParamValues;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
NPEventModel mEventModel;
|
||||
// This is a hack! UseAsyncRendering() can incorrectly return false
|
||||
// when we don't have an object frame (possible as of bug 90268).
|
|
@ -0,0 +1,209 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginInstanceChild.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginInstanceChild.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginInstanceChild.cpp
|
||||
@@ -84,11 +84,11 @@ const int kFlashWMUSERMessageThrottleDel
|
||||
|
||||
static const TCHAR kPluginIgnoreSubclassProperty[] = TEXT("PluginIgnoreSubclassProperty");
|
||||
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
#include "nsCocoaFeatures.h"
|
||||
#include "PluginUtilsOSX.h"
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
template<>
|
||||
struct RunnableMethodTraits<PluginInstanceChild>
|
||||
@@ -99,7 +99,7 @@ struct RunnableMethodTraits<PluginInstan
|
||||
|
||||
PluginInstanceChild::PluginInstanceChild(const NPPluginFuncs* aPluginIface)
|
||||
: mPluginIface(aPluginIface)
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
, mContentsScaleFactor(1.0)
|
||||
#endif
|
||||
, mDrawingModel(kDefaultDrawingModel)
|
||||
@@ -149,7 +149,7 @@ PluginInstanceChild::PluginInstanceChild
|
||||
mWindow.type = NPWindowTypeWindow;
|
||||
mData.ndata = (void*) this;
|
||||
mData.pdata = nullptr;
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
mWindow.ws_info = &mWsInfo;
|
||||
memset(&mWsInfo, 0, sizeof(mWsInfo));
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
@@ -158,7 +158,7 @@ PluginInstanceChild::PluginInstanceChild
|
||||
#else
|
||||
mWsInfo.display = DefaultXDisplay();
|
||||
#endif
|
||||
-#endif // MOZ_X11 && XP_UNIX && !XP_MACOSX
|
||||
+#endif // MOZ_X11 && XP_UNIX && !MOZ_WIDGET_COCOA
|
||||
#if defined(OS_WIN)
|
||||
memset(&mAlphaExtract, 0, sizeof(mAlphaExtract));
|
||||
#endif // OS_WIN
|
||||
@@ -378,7 +378,7 @@ PluginInstanceChild::NPN_GetValue(NPNVar
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
case NPNVsupportsCoreGraphicsBool: {
|
||||
*((NPBool*)aValue) = true;
|
||||
return NPERR_NO_ERROR;
|
||||
@@ -427,7 +427,7 @@ PluginInstanceChild::NPN_GetValue(NPNVar
|
||||
*static_cast<double*>(aValue) = mContentsScaleFactor;
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
-#endif /* XP_MACOSX */
|
||||
+#endif /* MOZ_WIDGET_COCOA */
|
||||
|
||||
#ifdef DEBUG
|
||||
case NPNVjavascriptEnabledBool:
|
||||
@@ -541,7 +541,7 @@ PluginInstanceChild::NPN_SetValue(NPPVar
|
||||
}
|
||||
mDrawingModel = drawingModel;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (drawingModel == NPDrawingModelCoreAnimation) {
|
||||
mCARefreshTimer = ScheduleTimer(DEFAULT_REFRESH_MS, true, CAUpdate);
|
||||
}
|
||||
@@ -553,7 +553,7 @@ PluginInstanceChild::NPN_SetValue(NPPVar
|
||||
return rv;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
case NPPVpluginEventModel: {
|
||||
NPError rv;
|
||||
int eventModel = (int16_t) (intptr_t) aValue;
|
||||
@@ -723,7 +723,7 @@ PluginInstanceChild::AnswerNPP_HandleEve
|
||||
event.event.xgraphicsexpose.drawable));
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Mac OS X does not define an NPEvent structure. It defines more specific types.
|
||||
NPCocoaEvent evcopy = event.event;
|
||||
// event.contentsScaleFactor <= 0 is a signal we shouldn't use it,
|
||||
@@ -775,7 +775,7 @@ PluginInstanceChild::AnswerNPP_HandleEve
|
||||
else
|
||||
*handled = mPluginIface->event(&mData, reinterpret_cast<void*>(&evcopy));
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Release any reference counted objects created in the child process.
|
||||
if (evcopy.type == NPCocoaEventKeyDown ||
|
||||
evcopy.type == NPCocoaEventKeyUp) {
|
||||
@@ -803,7 +803,7 @@ PluginInstanceChild::AnswerNPP_HandleEve
|
||||
return true;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
|
||||
bool
|
||||
PluginInstanceChild::AnswerNPP_HandleEvent_Shmem(const NPRemoteEvent& event,
|
||||
@@ -881,7 +881,7 @@ PluginInstanceChild::AnswerNPP_HandleEve
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
|
||||
void CallCGDraw(CGContextRef ref, void* aPluginInstance, nsIntRect aUpdateRect) {
|
||||
PluginInstanceChild* pluginInstance = (PluginInstanceChild*)aPluginInstance;
|
||||
@@ -1001,7 +1001,7 @@ PluginInstanceChild::RecvWindowPosChange
|
||||
bool
|
||||
PluginInstanceChild::RecvContentsScaleFactorChanged(const double& aContentsScaleFactor)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mContentsScaleFactor = aContentsScaleFactor;
|
||||
if (mShContext) {
|
||||
// Release the shared context so that it is reallocated
|
||||
@@ -1016,7 +1016,7 @@ PluginInstanceChild::RecvContentsScaleFa
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
// Create a new window from NPWindow
|
||||
bool PluginInstanceChild::CreateWindow(const NPRemoteWindow& aWindow)
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ PluginInstanceChild::AnswerNPP_SetWindow
|
||||
"Shouldn't be receiving NPP_SetWindow with layer rendering");
|
||||
AssertPluginThread();
|
||||
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
NS_ASSERTION(mWsInfo.display, "We should have a valid display!");
|
||||
|
||||
// The minimum info is sent over IPC to allow this
|
||||
@@ -1202,7 +1202,7 @@ PluginInstanceChild::AnswerNPP_SetWindow
|
||||
break;
|
||||
}
|
||||
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
mWindow.x = aWindow.x;
|
||||
mWindow.y = aWindow.y;
|
||||
@@ -2741,7 +2741,7 @@ PluginInstanceChild::DoAsyncSetWindow(co
|
||||
mWindow.height = aWindow.height;
|
||||
mWindow.clipRect = aWindow.clipRect;
|
||||
mWindow.type = aWindow.type;
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mContentsScaleFactor = aWindow.contentsScaleFactor;
|
||||
#endif
|
||||
|
||||
@@ -2901,7 +2901,7 @@ PluginInstanceChild::MaybeCreatePlatform
|
||||
bool
|
||||
PluginInstanceChild::EnsureCurrentBuffer(void)
|
||||
{
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
nsIntRect toInvalidate(0, 0, 0, 0);
|
||||
gfxIntSize winSize = gfxIntSize(mWindow.width, mWindow.height);
|
||||
|
||||
@@ -2947,7 +2947,7 @@ PluginInstanceChild::EnsureCurrentBuffer
|
||||
}
|
||||
|
||||
return true;
|
||||
-#else // XP_MACOSX
|
||||
+#else // MOZ_WIDGET_COCOA
|
||||
|
||||
if (!mDoubleBufferCARenderer.HasCALayer()) {
|
||||
void *caLayer = nullptr;
|
||||
@@ -3044,7 +3044,7 @@ PluginInstanceChild::UpdateWindowAttribu
|
||||
return;
|
||||
}
|
||||
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
// Adjusting the window isn't needed for OSX
|
||||
#ifndef XP_WIN
|
||||
// On Windows, we translate the device context, in order for the window
|
||||
@@ -3066,7 +3066,7 @@ PluginInstanceChild::UpdateWindowAttribu
|
||||
mWindow.clipRect.right = clipRect.XMost();
|
||||
mWindow.clipRect.bottom = clipRect.YMost();
|
||||
}
|
||||
-#endif // XP_MACOSX
|
||||
+#endif // MOZ_WIDGET_COCOA
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Windowless plugins on Windows need a WM_WINDOWPOSCHANGED event to update
|
||||
@@ -3995,7 +3995,7 @@ PluginInstanceChild::AnswerNPP_Destroy(N
|
||||
xt_client_xloop_destroy();
|
||||
}
|
||||
#endif
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
DeleteWindow();
|
||||
#endif
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginInstanceChild.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginInstanceChild.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginInstanceChild.h
|
||||
@@ -195,7 +195,7 @@ protected:
|
||||
virtual bool
|
||||
RecvNPP_DidComposite() MOZ_OVERRIDE;
|
||||
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
bool CreateWindow(const NPRemoteWindow& aWindow);
|
||||
void DeleteWindow();
|
||||
#endif
|
||||
@@ -361,7 +361,7 @@ private:
|
||||
const NPPluginFuncs* mPluginIface;
|
||||
NPP_t mData;
|
||||
NPWindow mWindow;
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
double mContentsScaleFactor;
|
||||
#endif
|
||||
int16_t mDrawingModel;
|
||||
@@ -383,7 +383,7 @@ private:
|
||||
PluginScriptableObjectChild* mCachedWindowActor;
|
||||
PluginScriptableObjectChild* mCachedElementActor;
|
||||
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
NPSetWindowCallbackStruct mWsInfo;
|
||||
#if (MOZ_WIDGET_GTK == 2)
|
||||
bool mXEmbed;
|
||||
@@ -468,7 +468,7 @@ private:
|
||||
bool CanPaintOnBackground();
|
||||
|
||||
bool IsVisible() {
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
return mWindow.clipRect.top != mWindow.clipRect.bottom &&
|
||||
mWindow.clipRect.left != mWindow.clipRect.right;
|
||||
#else
|
||||
@@ -553,7 +553,7 @@ private:
|
||||
// surface which is on ParentProcess side
|
||||
nsRefPtr<gfxASurface> mBackSurface;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Current IOSurface available for rendering
|
||||
// We can't use thebes gfxASurface like other platforms.
|
||||
PluginUtilsOSX::nsDoubleBufferCARenderer mDoubleBufferCARenderer;
|
|
@ -0,0 +1,179 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginInstanceParent.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginInstanceParent.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginInstanceParent.cpp
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "GLContext.h"
|
||||
#include "GLContextProvider.h"
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "MacIOSurfaceImage.h"
|
||||
#endif
|
||||
|
||||
@@ -48,9 +48,9 @@ UINT gOOPPPluginFocusEvent =
|
||||
extern const wchar_t* kFlashFullscreenClass;
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include <gdk/gdk.h>
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
using namespace mozilla::plugins;
|
||||
using namespace mozilla::layers;
|
||||
@@ -78,7 +78,7 @@ PluginInstanceParent::PluginInstancePare
|
||||
, mPluginWndProc(nullptr)
|
||||
, mNestedEventState(false)
|
||||
#endif // defined(XP_WIN)
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
, mShWidth(0)
|
||||
, mShHeight(0)
|
||||
, mShColorSpace(nullptr)
|
||||
@@ -202,7 +202,7 @@ PluginInstanceParent::AnswerNPN_GetValue
|
||||
HWND id;
|
||||
#elif defined(MOZ_X11)
|
||||
XID id;
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
intptr_t id;
|
||||
#elif defined(ANDROID)
|
||||
// TODO: Need Android impl
|
||||
@@ -357,7 +357,7 @@ PluginInstanceParent::AnswerNPN_SetValue
|
||||
{
|
||||
*shmem = null_t();
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (drawingModel == NPDrawingModelCoreAnimation ||
|
||||
drawingModel == NPDrawingModelInvalidatingCoreAnimation) {
|
||||
// We need to request CoreGraphics otherwise
|
||||
@@ -411,7 +411,7 @@ PluginInstanceParent::AnswerNPN_SetValue
|
||||
} else if (
|
||||
#if defined(XP_WIN)
|
||||
drawingModel == NPDrawingModelSyncWin
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
drawingModel == NPDrawingModelOpenGL ||
|
||||
drawingModel == NPDrawingModelCoreGraphics
|
||||
#elif defined(MOZ_X11)
|
||||
@@ -444,7 +444,7 @@ bool
|
||||
PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginEventModel(
|
||||
const int& eventModel, NPError* result)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
*result = mNPNIface->setvalue(mNPP, NPPVpluginEventModel,
|
||||
(void*)(intptr_t)eventModel);
|
||||
return true;
|
||||
@@ -564,7 +564,7 @@ PluginInstanceParent::RecvShow(const NPR
|
||||
}
|
||||
surface = gfxSharedImageSurface::Open(newSurface.get_Shmem());
|
||||
}
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
else if (newSurface.type() == SurfaceDescriptor::TIOSurfaceDescriptor) {
|
||||
IOSurfaceDescriptor iodesc = newSurface.get_IOSurfaceDescriptor();
|
||||
|
||||
@@ -674,7 +674,7 @@ PluginInstanceParent::AsyncSetWindow(NPW
|
||||
window.height = aWindow->height;
|
||||
window.clipRect = aWindow->clipRect;
|
||||
window.type = aWindow->type;
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
double scaleFactor = 1.0;
|
||||
mNPNIface->getvalue(mNPP, NPNVcontentsScaleFactor, &scaleFactor);
|
||||
window.contentsScaleFactor = scaleFactor;
|
||||
@@ -689,7 +689,7 @@ PluginInstanceParent::AsyncSetWindow(NPW
|
||||
nsresult
|
||||
PluginInstanceParent::GetImageContainer(ImageContainer** aContainer)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
MacIOSurface* ioSurface = nullptr;
|
||||
|
||||
if (mFrontIOSurface) {
|
||||
@@ -716,7 +716,7 @@ PluginInstanceParent::GetImageContainer(
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (ioSurface) {
|
||||
nsRefPtr<Image> image = container->CreateImage(ImageFormat::MAC_IOSURFACE);
|
||||
if (!image) {
|
||||
@@ -750,7 +750,7 @@ PluginInstanceParent::GetImageSize(nsInt
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (mFrontIOSurface) {
|
||||
*aSize = nsIntSize(mFrontIOSurface->GetWidth(), mFrontIOSurface->GetHeight());
|
||||
return NS_OK;
|
||||
@@ -763,7 +763,7 @@ PluginInstanceParent::GetImageSize(nsInt
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
nsresult
|
||||
PluginInstanceParent::IsRemoteDrawingCoreAnimation(bool *aDrawing)
|
||||
{
|
||||
@@ -778,7 +778,7 @@ PluginInstanceParent::ContentsScaleFacto
|
||||
bool rv = SendContentsScaleFactorChanged(aContentsScaleFactor);
|
||||
return rv ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
-#endif // #ifdef XP_MACOSX
|
||||
+#endif // #ifdef MOZ_WIDGET_COCOA
|
||||
|
||||
nsresult
|
||||
PluginInstanceParent::SetBackgroundUnknown()
|
||||
@@ -988,7 +988,7 @@ PluginInstanceParent::NPP_SetWindow(cons
|
||||
window.type = aWindow->type;
|
||||
#endif
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
double floatScaleFactor = 1.0;
|
||||
mNPNIface->getvalue(mNPP, NPNVcontentsScaleFactor, &floatScaleFactor);
|
||||
int scaleFactor = ceil(floatScaleFactor);
|
||||
@@ -1020,7 +1020,7 @@ PluginInstanceParent::NPP_SetWindow(cons
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
const NPSetWindowCallbackStruct* ws_info =
|
||||
static_cast<NPSetWindowCallbackStruct*>(aWindow->ws_info);
|
||||
window.visualID = ws_info->visual ? ws_info->visual->visualid : None;
|
||||
@@ -1165,14 +1165,14 @@ PluginInstanceParent::NPP_HandleEvent(vo
|
||||
{
|
||||
PLUGIN_LOG_DEBUG_FUNCTION;
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
NPCocoaEvent* npevent = reinterpret_cast<NPCocoaEvent*>(event);
|
||||
#else
|
||||
NPEvent* npevent = reinterpret_cast<NPEvent*>(event);
|
||||
#endif
|
||||
NPRemoteEvent npremoteevent;
|
||||
npremoteevent.event = *npevent;
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
double scaleFactor = 1.0;
|
||||
mNPNIface->getvalue(mNPP, NPNVcontentsScaleFactor, &scaleFactor);
|
||||
npremoteevent.contentsScaleFactor = scaleFactor;
|
||||
@@ -1266,7 +1266,7 @@ PluginInstanceParent::NPP_HandleEvent(vo
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (npevent->type == NPCocoaEventDrawRect) {
|
||||
if (mDrawingModel == NPDrawingModelCoreAnimation ||
|
||||
mDrawingModel == NPDrawingModelInvalidatingCoreAnimation) {
|
33
www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h
Normal file
33
www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginLibrary.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginLibrary.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginLibrary.h
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
virtual bool HasRequiredFunctions() = 0;
|
||||
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_GONK)
|
||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error) = 0;
|
||||
#else
|
||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) = 0;
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc) = 0;
|
||||
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
||||
void *aValue, NPError* error) = 0;
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
virtual nsresult NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error) = 0;
|
||||
#endif
|
||||
virtual nsresult NPP_New(NPMIMEType pluginType, NPP instance,
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
virtual nsresult GetImageContainer(NPP instance, mozilla::layers::ImageContainer** aContainer) = 0;
|
||||
virtual nsresult GetImageSize(NPP instance, nsIntSize* aSize) = 0;
|
||||
virtual bool IsOOP() = 0;
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
virtual nsresult IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing) = 0;
|
||||
virtual nsresult ContentsScaleFactorChanged(NPP instance, double aContentsScaleFactor) = 0;
|
||||
#endif
|
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginMessageUtils.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginMessageUtils.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginMessageUtils.cpp
|
||||
@@ -50,14 +50,14 @@ namespace plugins {
|
||||
|
||||
NPRemoteWindow::NPRemoteWindow() :
|
||||
window(0), x(0), y(0), width(0), height(0), type(NPWindowTypeDrawable)
|
||||
-#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
, visualID(0)
|
||||
, colormap(0)
|
||||
#endif /* XP_UNIX */
|
||||
#if defined(XP_WIN)
|
||||
,surfaceHandle(0)
|
||||
#endif
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
,contentsScaleFactor(1.0)
|
||||
#endif
|
||||
{
|
|
@ -1,8 +1,19 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2014/02/20 13:19:03 ryoon Exp $
|
||||
$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
--- dom/plugins/ipc/PluginModuleChild.cpp.orig 2013-05-11 19:19:27.000000000 +0000
|
||||
* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginModuleChild.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginModuleChild.cpp
|
||||
@@ -201,7 +201,7 @@ PluginModuleChild::Init(const std::strin
|
||||
@@ -111,7 +111,7 @@ PluginModuleChild::PluginModuleChild()
|
||||
memset(&mSavedData, 0, sizeof(mSavedData));
|
||||
gInstance = this;
|
||||
mUserAgent.SetIsVoid(true);
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mac_plugin_interposing::child::SetUpCocoaInterposing();
|
||||
#endif
|
||||
}
|
||||
@@ -197,7 +197,7 @@ PluginModuleChild::Init(const std::strin
|
||||
|
||||
// TODO: use PluginPRLibrary here
|
||||
|
||||
|
@ -11,7 +22,7 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2014/02/20 13:19:03 r
|
|||
mShutdownFunc =
|
||||
(NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
|
||||
|
||||
@@ -1836,7 +1836,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
|
||||
@@ -1825,7 +1825,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
|
||||
PLUGIN_LOG_DEBUG_METHOD;
|
||||
AssertPluginThread();
|
||||
|
||||
|
@ -20,7 +31,7 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2014/02/20 13:19:03 r
|
|||
return true;
|
||||
#elif defined(OS_WIN) || defined(OS_MACOSX)
|
||||
*_retval = mGetEntryPointsFunc(&mFunctions);
|
||||
@@ -1865,7 +1865,7 @@ PluginModuleChild::AnswerNP_Initialize(c
|
||||
@@ -1854,7 +1854,7 @@ PluginModuleChild::AnswerNP_Initialize(c
|
||||
SendBackUpXResources(FileDescriptor(xSocketFd));
|
||||
#endif
|
||||
|
||||
|
@ -29,3 +40,21 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2014/02/20 13:19:03 r
|
|||
*_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
|
||||
return true;
|
||||
#elif defined(OS_WIN) || defined(OS_MACOSX)
|
||||
@@ -1986,7 +1986,7 @@ PluginModuleChild::InitQuirksModes(const
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Whitelist Flash and Quicktime to support offline renderer
|
||||
NS_NAMED_LITERAL_CSTRING(flash, "application/x-shockwave-flash");
|
||||
NS_NAMED_LITERAL_CSTRING(quicktime, "QuickTime Plugin.plugin");
|
||||
@@ -2046,7 +2046,7 @@ PluginModuleChild::AnswerPPluginInstance
|
||||
|
||||
childInstance->Initialize();
|
||||
|
||||
-#if defined(XP_MACOSX) && defined(__i386__)
|
||||
+#if defined(MOZ_WIDGET_COCOA) && defined(__i386__)
|
||||
// If an i386 Mac OS X plugin has selected the Carbon event model then
|
||||
// we have to fail. We do not support putting Carbon event model plugins
|
||||
// out of process. Note that Carbon is the default model so out of process
|
||||
|
|
123
www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp
Normal file
123
www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp
Normal file
|
@ -0,0 +1,123 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginModuleParent.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginModuleParent.cpp.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginModuleParent.cpp
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
#include <glib.h>
|
||||
-#elif XP_MACOSX
|
||||
+#elif MOZ_WIDGET_COCOA
|
||||
#include "PluginInterposeOSX.h"
|
||||
#include "PluginUtilsOSX.h"
|
||||
#endif
|
||||
@@ -1181,7 +1181,7 @@ PluginModuleParent::EndUpdateBackground(
|
||||
return i->EndUpdateBackground(aCtx, aRect);
|
||||
}
|
||||
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_GONK)
|
||||
nsresult
|
||||
PluginModuleParent::NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error)
|
||||
{
|
||||
@@ -1298,7 +1298,7 @@ PluginModuleParent::NP_GetValue(void *fu
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
nsresult
|
||||
PluginModuleParent::NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error)
|
||||
{
|
||||
@@ -1411,7 +1411,7 @@ PluginModuleParent::NPP_GetSitesWithData
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
nsresult
|
||||
PluginModuleParent::IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing)
|
||||
{
|
||||
@@ -1431,7 +1431,7 @@ PluginModuleParent::ContentsScaleFactorC
|
||||
|
||||
return i->ContentsScaleFactorChanged(aContentsScaleFactor);
|
||||
}
|
||||
-#endif // #if defined(XP_MACOSX)
|
||||
+#endif // #if defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
bool
|
||||
PluginModuleParent::AnswerNPN_GetValue_WithBoolReturn(const NPNVariable& aVariable,
|
||||
@@ -1457,7 +1457,7 @@ PluginModuleParent::AnswerProcessSomeEve
|
||||
return true;
|
||||
}
|
||||
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
bool
|
||||
PluginModuleParent::AnswerProcessSomeEvents()
|
||||
{
|
||||
@@ -1523,7 +1523,7 @@ PluginModuleParent::RecvPluginShowWindow
|
||||
const size_t& aWidth, const size_t& aHeight)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
CGRect windowBound = ::CGRectMake(aX, aY, aWidth, aHeight);
|
||||
mac_plugin_interposing::parent::OnPluginShowWindow(aWindowId, windowBound, aModal);
|
||||
return true;
|
||||
@@ -1538,7 +1538,7 @@ bool
|
||||
PluginModuleParent::RecvPluginHideWindow(const uint32_t& aWindowId)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
mac_plugin_interposing::parent::OnPluginHideWindow(aWindowId, OtherSidePID());
|
||||
return true;
|
||||
#else
|
||||
@@ -1578,7 +1578,7 @@ bool
|
||||
PluginModuleParent::RecvSetCursor(const NSCursorInfo& aCursorInfo)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
mac_plugin_interposing::parent::OnSetCursor(aCursorInfo);
|
||||
return true;
|
||||
#else
|
||||
@@ -1592,7 +1592,7 @@ bool
|
||||
PluginModuleParent::RecvShowCursor(const bool& aShow)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
mac_plugin_interposing::parent::OnShowCursor(aShow);
|
||||
return true;
|
||||
#else
|
||||
@@ -1606,7 +1606,7 @@ bool
|
||||
PluginModuleParent::RecvPushCursor(const NSCursorInfo& aCursorInfo)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
mac_plugin_interposing::parent::OnPushCursor(aCursorInfo);
|
||||
return true;
|
||||
#else
|
||||
@@ -1620,7 +1620,7 @@ bool
|
||||
PluginModuleParent::RecvPopCursor()
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
mac_plugin_interposing::parent::OnPopCursor();
|
||||
return true;
|
||||
#else
|
||||
@@ -1634,7 +1634,7 @@ bool
|
||||
PluginModuleParent::RecvGetNativeCursorsSupported(bool* supported)
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
*supported =
|
||||
Preferences::GetBool("dom.ipc.plugins.nativeCursorSupport", false);
|
||||
return true;
|
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-dom_plugins_ipc_PluginModuleParent.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/plugins/ipc/PluginModuleParent.h.orig 2014-05-06 22:55:25.000000000 +0000
|
||||
+++ dom/plugins/ipc/PluginModuleParent.h
|
||||
@@ -251,7 +251,7 @@ private:
|
||||
gfxContext* aCtx,
|
||||
const nsIntRect& aRect) MOZ_OVERRIDE;
|
||||
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_GONK)
|
||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs, NPError* error);
|
||||
#else
|
||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error);
|
||||
@@ -260,7 +260,7 @@ private:
|
||||
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc);
|
||||
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
||||
void *aValue, NPError* error);
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(XP_OS2)
|
||||
virtual nsresult NP_GetEntryPoints(NPPluginFuncs* pFuncs, NPError* error);
|
||||
#endif
|
||||
virtual nsresult NPP_New(NPMIMEType pluginType, NPP instance,
|
||||
@@ -271,7 +271,7 @@ private:
|
||||
uint64_t maxAge);
|
||||
virtual nsresult NPP_GetSitesWithData(InfallibleTArray<nsCString>& result);
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
virtual nsresult IsRemoteDrawingCoreAnimation(NPP instance, bool *aDrawing);
|
||||
virtual nsresult ContentsScaleFactorChanged(NPP instance, double aContentsScaleFactor);
|
||||
#endif
|
|
@ -1,8 +1,10 @@
|
|||
$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.2 2014/04/30 15:07:18 ryoon Exp $
|
||||
$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.3 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
* NetBSD 5 does not support posix_spawn(3)
|
||||
|
||||
--- dom/system/OSFileConstants.cpp.orig 2014-04-18 02:02:50.000000000 +0000
|
||||
* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- dom/system/OSFileConstants.cpp.orig 2014-05-06 22:55:26.000000000 +0000
|
||||
+++ dom/system/OSFileConstants.cpp
|
||||
@@ -9,13 +9,17 @@
|
||||
|
||||
|
@ -24,6 +26,50 @@ $NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.2 2014/04/30 15:07:18 ryoon Ex
|
|||
#endif // defined(XP_UNIX)
|
||||
|
||||
#if defined(XP_LINUX)
|
||||
@@ -120,7 +124,7 @@ struct Paths {
|
||||
nsString winStartMenuProgsDir;
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
/**
|
||||
* The user's Library directory.
|
||||
*/
|
||||
@@ -130,7 +134,7 @@ struct Paths {
|
||||
* system.
|
||||
*/
|
||||
nsString macLocalApplicationsDir;
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
Paths()
|
||||
{
|
||||
@@ -147,10 +151,10 @@ struct Paths {
|
||||
winStartMenuProgsDir.SetIsVoid(true);
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
macUserLibDir.SetIsVoid(true);
|
||||
macLocalApplicationsDir.SetIsVoid(true);
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -287,10 +291,10 @@ nsresult InitOSFileConstants()
|
||||
GetPathToSpecialDir(NS_WIN_PROGRAMS_DIR, paths->winStartMenuProgsDir);
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
GetPathToSpecialDir(NS_MAC_USER_LIB_DIR, paths->macUserLibDir);
|
||||
GetPathToSpecialDir(NS_OSX_LOCAL_APPLICATIONS_DIR, paths->macLocalApplicationsDir);
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
gPaths = paths.forget();
|
||||
return NS_OK;
|
||||
@@ -526,10 +530,10 @@ static const dom::ConstantSpec gLibcProp
|
||||
// The size of |time_t|.
|
||||
{ "OSFILE_SIZEOF_TIME_T", INT_TO_JSVAL(sizeof (time_t)) },
|
||||
|
@ -37,3 +83,39 @@ $NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.2 2014/04/30 15:07:18 ryoon Ex
|
|||
|
||||
// Defining |dirent|.
|
||||
// Size
|
||||
@@ -836,7 +840,7 @@ bool DefineOSFileConstants(JSContext *cx
|
||||
// Note that we don't actually provide the full path, only the name of the
|
||||
// library, which is sufficient to link to the library using js-ctypes.
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// Under MacOS X, for some reason, libxul is called simply "XUL",
|
||||
// and we need to provide the full path.
|
||||
nsAutoString libxul;
|
||||
@@ -849,7 +853,7 @@ bool DefineOSFileConstants(JSContext *cx
|
||||
libxul.Append(NS_LITERAL_STRING(DLL_PREFIX));
|
||||
libxul.Append(NS_LITERAL_STRING("xul"));
|
||||
libxul.Append(NS_LITERAL_STRING(DLL_SUFFIX));
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
if (!SetStringProperty(cx, objPath, "libxul", libxul)) {
|
||||
return false;
|
||||
@@ -897,7 +901,7 @@ bool DefineOSFileConstants(JSContext *cx
|
||||
}
|
||||
#endif // defined(XP_WIN)
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
if (!SetStringProperty(cx, objPath, "macUserLibDir", gPaths->macUserLibDir)) {
|
||||
return false;
|
||||
}
|
||||
@@ -905,7 +909,7 @@ bool DefineOSFileConstants(JSContext *cx
|
||||
if (!SetStringProperty(cx, objPath, "macLocalApplicationsDir", gPaths->macLocalApplicationsDir)) {
|
||||
return false;
|
||||
}
|
||||
-#endif // defined(XP_MACOSX)
|
||||
+#endif // defined(MOZ_WIDGET_COCOA)
|
||||
|
||||
// sqlite3 is linked from different places depending on the platform
|
||||
nsAutoString libsqlite3;
|
||||
|
|
87
www/firefox/patches/patch-image_src_imgFrame.cpp
Normal file
87
www/firefox/patches/patch-image_src_imgFrame.cpp
Normal file
|
@ -0,0 +1,87 @@
|
|||
$NetBSD: patch-image_src_imgFrame.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- image/src/imgFrame.cpp.orig 2014-05-06 22:55:36.000000000 +0000
|
||||
+++ image/src/imgFrame.cpp
|
||||
@@ -54,7 +54,7 @@ static bool AllowedImageSize(int32_t aWi
|
||||
NS_WARNING("width or height too large");
|
||||
return false;
|
||||
}
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// CoreGraphics is limited to images < 32K in *height*, so clamp all surfaces on the Mac to that height
|
||||
if (MOZ_UNLIKELY(aHeight > SHRT_MAX)) {
|
||||
NS_WARNING("image too big");
|
||||
@@ -190,7 +190,7 @@ nsresult imgFrame::Init(int32_t aX, int3
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!ShouldUseImageSurfaces()) {
|
||||
mQuartzSurface = new gfxQuartzImageSurface(mImageSurface);
|
||||
}
|
||||
@@ -254,7 +254,7 @@ nsresult imgFrame::Optimize()
|
||||
#ifdef USE_WIN_SURFACE
|
||||
mWinSurface = nullptr;
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mQuartzSurface = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -288,7 +288,7 @@ nsresult imgFrame::Optimize()
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (mQuartzSurface) {
|
||||
mQuartzSurface->Flush();
|
||||
}
|
||||
@@ -302,7 +302,7 @@ nsresult imgFrame::Optimize()
|
||||
#ifdef USE_WIN_SURFACE
|
||||
mWinSurface = nullptr;
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mQuartzSurface = nullptr;
|
||||
#endif
|
||||
}
|
||||
@@ -586,7 +586,7 @@ nsresult imgFrame::LockImageData()
|
||||
#ifdef USE_WIN_SURFACE
|
||||
mWinSurface = nullptr;
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
mQuartzSurface = nullptr;
|
||||
#endif
|
||||
}
|
||||
@@ -649,7 +649,7 @@ nsresult imgFrame::UnlockImageData()
|
||||
mWinSurface->MarkDirty();
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// The quartz image surface (ab)uses the flush method to get the
|
||||
// cairo_image_surface data into a CGImage, so we have to call Flush() here.
|
||||
if (mQuartzSurface)
|
||||
@@ -684,7 +684,7 @@ void imgFrame::ApplyDirtToSurfaces()
|
||||
mWinSurface->MarkDirty();
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// The quartz image surface (ab)uses the flush method to get the
|
||||
// cairo_image_surface data into a CGImage, so we have to call Flush() here.
|
||||
if (mQuartzSurface)
|
||||
@@ -791,7 +791,7 @@ imgFrame::SizeOfExcludingThisWithCompute
|
||||
n += mWinSurface->KnownMemoryUsed();
|
||||
} else
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (mQuartzSurface && aLocation == gfxMemoryLocation::IN_PROCESS_HEAP) {
|
||||
n += mSize.width * mSize.height * 4;
|
||||
} else
|
33
www/firefox/patches/patch-image_src_imgFrame.h
Normal file
33
www/firefox/patches/patch-image_src_imgFrame.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
$NetBSD: patch-image_src_imgFrame.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- image/src/imgFrame.h.orig 2014-05-06 22:55:36.000000000 +0000
|
||||
+++ image/src/imgFrame.h
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "gfxImageSurface.h"
|
||||
#if defined(XP_WIN)
|
||||
#include "gfxWindowsSurface.h"
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
#include "gfxQuartzImageSurface.h"
|
||||
#endif
|
||||
#include "nsAutoPtr.h"
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
#if defined(XP_WIN)
|
||||
if (mWinSurface)
|
||||
return mWinSurface;
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
if (mQuartzSurface)
|
||||
return mQuartzSurface;
|
||||
#endif
|
||||
@@ -141,7 +141,7 @@ private: // data
|
||||
nsRefPtr<gfxASurface> mOptSurface;
|
||||
#if defined(XP_WIN)
|
||||
nsRefPtr<gfxWindowsSurface> mWinSurface;
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
nsRefPtr<gfxQuartzImageSurface> mQuartzSurface;
|
||||
#endif
|
||||
|
204
www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp
Normal file
204
www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp
Normal file
|
@ -0,0 +1,204 @@
|
|||
$NetBSD: patch-layout_generic_nsObjectFrame.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- layout/generic/nsObjectFrame.cpp.orig 2014-05-06 22:55:54.000000000 +0000
|
||||
+++ layout/generic/nsObjectFrame.cpp
|
||||
@@ -65,7 +65,7 @@
|
||||
#endif /* MOZ_LOGGING */
|
||||
#include "prlog.h"
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "gfxQuartzNativeDrawing.h"
|
||||
#include "nsPluginUtilsOSX.h"
|
||||
#include "mozilla/gfx/QuartzSupport.h"
|
||||
@@ -108,7 +108,7 @@ GetObjectFrameLog()
|
||||
}
|
||||
#endif /* PR_LOGGING */
|
||||
|
||||
-#if defined(XP_MACOSX) && !defined(__LP64__)
|
||||
+#if defined(MOZ_WIDGET_COCOA) && !defined(__LP64__)
|
||||
|
||||
// The header files QuickdrawAPI.h and QDOffscreen.h are missing on OS X 10.7
|
||||
// and up (though the QuickDraw APIs defined in them are still present) -- so
|
||||
@@ -143,7 +143,7 @@ extern "C" {
|
||||
#endif /* __QDOFFSCREEN__ */
|
||||
}
|
||||
|
||||
-#endif /* #if defined(XP_MACOSX) && !defined(__LP64__) */
|
||||
+#endif /* #if defined(MOZ_WIDGET_COCOA) && !defined(__LP64__) */
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::gfx;
|
||||
@@ -367,7 +367,7 @@ nsObjectFrame::PrepForDrawing(nsIWidget
|
||||
nsRefPtr<nsDeviceContext> dx = viewMan->GetDeviceContext();
|
||||
mInnerView->AttachWidgetEventHandler(mWidget);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// On Mac, we need to invalidate ourselves since even windowed
|
||||
// plugins are painted through Thebes and we need to ensure
|
||||
// the Thebes layer containing the plugin is updated.
|
||||
@@ -394,7 +394,7 @@ nsObjectFrame::PrepForDrawing(nsIWidget
|
||||
// Changing to windowless mode changes the NPWindow geometry.
|
||||
FixupWindow(GetContentRectRelativeToSelf().Size());
|
||||
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
RegisterPluginForGeometryUpdates();
|
||||
#endif
|
||||
}
|
||||
@@ -582,7 +582,7 @@ nsObjectFrame::FixupWindow(const nsSize&
|
||||
|
||||
NS_ENSURE_TRUE_VOID(window);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
nsWeakFrame weakFrame(this);
|
||||
mInstanceOwner->FixUpPluginWindow(nsPluginInstanceOwner::ePluginPaintDisable);
|
||||
if (!weakFrame.IsAlive()) {
|
||||
@@ -608,7 +608,7 @@ nsObjectFrame::FixupWindow(const nsSize&
|
||||
// on the Mac we need to set the clipRect to { 0, 0, 0, 0 } for now. This will keep
|
||||
// us from drawing on screen until the widget is properly positioned, which will not
|
||||
// happen until we have finished the reflow process.
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
window->clipRect.top = 0;
|
||||
window->clipRect.left = 0;
|
||||
window->clipRect.bottom = 0;
|
||||
@@ -635,7 +635,7 @@ nsObjectFrame::CallSetWindow(bool aCheck
|
||||
return rv;
|
||||
|
||||
nsPluginNativeWindow *window = (nsPluginNativeWindow *)win;
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
nsWeakFrame weakFrame(this);
|
||||
mInstanceOwner->FixUpPluginWindow(nsPluginInstanceOwner::ePluginPaintDisable);
|
||||
if (!weakFrame.IsAlive()) {
|
||||
@@ -1090,7 +1090,7 @@ nsObjectFrame::NotifyPluginReflowObserve
|
||||
void
|
||||
nsObjectFrame::DidSetWidgetGeometry()
|
||||
{
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
if (mInstanceOwner) {
|
||||
mInstanceOwner->FixUpPluginWindow(nsPluginInstanceOwner::ePluginPaintEnable);
|
||||
}
|
||||
@@ -1111,7 +1111,7 @@ nsObjectFrame::DidSetWidgetGeometry()
|
||||
bool
|
||||
nsObjectFrame::IsOpaque() const
|
||||
{
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// ???
|
||||
return false;
|
||||
#elif defined(MOZ_WIDGET_ANDROID)
|
||||
@@ -1125,7 +1125,7 @@ nsObjectFrame::IsOpaque() const
|
||||
bool
|
||||
nsObjectFrame::IsTransparentMode() const
|
||||
{
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// ???
|
||||
return false;
|
||||
#else
|
||||
@@ -1172,7 +1172,7 @@ nsObjectFrame::BuildDisplayList(nsDispla
|
||||
|
||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsObjectFrame");
|
||||
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
if (mWidget && aBuilder->IsInTransform()) {
|
||||
// Windowed plugins should not be rendered inside a transform.
|
||||
return;
|
||||
@@ -1184,7 +1184,7 @@ nsObjectFrame::BuildDisplayList(nsDispla
|
||||
mInstanceOwner->GetWindow(window);
|
||||
bool isVisible = window && window->width > 0 && window->height > 0;
|
||||
if (isVisible && aBuilder->ShouldSyncDecodeImages()) {
|
||||
- #ifndef XP_MACOSX
|
||||
+ #ifndef MOZ_WIDGET_COCOA
|
||||
mInstanceOwner->UpdateWindowVisibility(true);
|
||||
#endif
|
||||
}
|
||||
@@ -1292,7 +1292,7 @@ nsObjectFrame::PrintPlugin(nsRenderingCo
|
||||
window.clipRect.left = 0; window.clipRect.right = 0;
|
||||
|
||||
// platform specific printing code
|
||||
-#if defined(XP_MACOSX) && !defined(__LP64__)
|
||||
+#if defined(MOZ_WIDGET_COCOA) && !defined(__LP64__)
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
// Don't use this code if any of the QuickDraw APIs it currently requires
|
||||
// are missing (as they probably will be on OS X 10.8 and up).
|
||||
@@ -1556,7 +1556,7 @@ nsObjectFrame::BuildLayer(nsDisplayListB
|
||||
|
||||
NS_ASSERTION(layer->GetType() == Layer::TYPE_IMAGE, "Bad layer type");
|
||||
ImageLayer* imglayer = static_cast<ImageLayer*>(layer.get());
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (!mInstanceOwner->UseAsyncRendering()) {
|
||||
mInstanceOwner->DoCocoaEventDrawRect(r, nullptr);
|
||||
}
|
||||
@@ -1666,7 +1666,7 @@ nsObjectFrame::PaintPlugin(nsDisplayList
|
||||
#endif
|
||||
|
||||
// Screen painting code
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
// delegate all painting to the plugin instance.
|
||||
if (mInstanceOwner) {
|
||||
if (mInstanceOwner->GetDrawingModel() == NPDrawingModelCoreGraphics ||
|
||||
@@ -1987,7 +1987,7 @@ nsObjectFrame::HandleEvent(nsPresContext
|
||||
return fm->FocusPlugin(GetContent());
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (anEvent->message == NS_PLUGIN_RESOLUTION_CHANGED) {
|
||||
double scaleFactor = 1.0;
|
||||
mInstanceOwner->GetContentsScaleFactor(&scaleFactor);
|
||||
@@ -2009,7 +2009,7 @@ nsObjectFrame::HandleEvent(nsPresContext
|
||||
return rv;
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// we want to process some native mouse events in the cocoa event model
|
||||
if ((anEvent->message == NS_MOUSE_ENTER ||
|
||||
anEvent->message == NS_WHEEL_WHEEL) &&
|
||||
@@ -2034,7 +2034,7 @@ nsObjectFrame::HandleEvent(nsPresContext
|
||||
// We need to be careful from this point because the call to
|
||||
// nsObjectFrameSuper::HandleEvent() might have killed us.
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (anEvent->message == NS_MOUSE_BUTTON_UP) {
|
||||
nsIPresShell::SetCapturingContent(nullptr, 0);
|
||||
}
|
||||
@@ -2079,7 +2079,7 @@ nsObjectFrame::GetCursor(const nsPoint&
|
||||
void
|
||||
nsObjectFrame::SetIsDocumentActive(bool aIsActive)
|
||||
{
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
if (mInstanceOwner) {
|
||||
mInstanceOwner->UpdateDocumentActiveState(aIsActive);
|
||||
}
|
||||
@@ -2154,7 +2154,7 @@ nsObjectFrame::EndSwapDocShells(nsIConte
|
||||
}
|
||||
}
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (objectFrame->mWidget) {
|
||||
objectFrame->RegisterPluginForGeometryUpdates();
|
||||
}
|
||||
@@ -2172,7 +2172,7 @@ NS_NewObjectFrame(nsIPresShell* aPresShe
|
||||
bool
|
||||
nsObjectFrame::IsPaintedByGecko() const
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
return true;
|
||||
#else
|
||||
return !mWidget;
|
|
@ -0,0 +1,60 @@
|
|||
$NetBSD: patch-toolkit_components_downloads_nsDownloadManager.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- toolkit/components/downloads/nsDownloadManager.cpp.orig 2014-05-06 22:56:29.000000000 +0000
|
||||
+++ toolkit/components/downloads/nsDownloadManager.cpp
|
||||
@@ -46,7 +46,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#endif
|
||||
|
||||
@@ -1373,7 +1373,7 @@ nsDownloadManager::GetDefaultDownloadsDi
|
||||
mBundle->GetStringFromName(MOZ_UTF16("downloadsFolder"),
|
||||
getter_Copies(folderName));
|
||||
|
||||
-#if defined (XP_MACOSX)
|
||||
+#if defined (MOZ_WIDGET_COCOA)
|
||||
rv = dirService->Get(NS_OSX_DEFAULT_DOWNLOAD_DIR,
|
||||
NS_GET_IID(nsIFile),
|
||||
getter_AddRefs(downloadDir));
|
||||
@@ -2436,7 +2436,7 @@ nsDownloadManager::Observe(nsISupports *
|
||||
nsCOMPtr<nsISupportsPRBool> cancelDownloads =
|
||||
do_QueryInterface(aSubject, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
ConfirmCancelDownloads(currDownloadCount, cancelDownloads,
|
||||
MOZ_UTF16("quitCancelDownloadsAlertTitle"),
|
||||
MOZ_UTF16("quitCancelDownloadsAlertMsgMultiple"),
|
||||
@@ -2731,7 +2731,7 @@ nsDownload::SetState(DownloadState aStat
|
||||
}
|
||||
}
|
||||
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GTK)
|
||||
nsCOMPtr<nsIFileURL> fileURL = do_QueryInterface(mTarget);
|
||||
nsCOMPtr<nsIFile> file;
|
||||
nsAutoString path;
|
||||
@@ -2780,7 +2780,7 @@ nsDownload::SetState(DownloadState aStat
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// On OS X, make the downloads stack bounce.
|
||||
CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault,
|
||||
NS_ConvertUTF16toUTF8(path).get(),
|
||||
@@ -3363,7 +3363,7 @@ nsDownload::OpenWithApplication()
|
||||
if (!prefs || NS_FAILED(prefs->GetBoolPref(PREF_BH_DELETETEMPFILEONEXIT,
|
||||
&deleteTempFileOnExit))) {
|
||||
// No prefservice or no pref set; use default value
|
||||
-#if !defined(XP_MACOSX)
|
||||
+#if !defined(MOZ_WIDGET_COCOA)
|
||||
// Mac users have been very verbal about temp files being deleted on
|
||||
// app exit - they don't like it - but we'll continue to do this on
|
||||
// other platforms for now.
|
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-toolkit_profile_nsToolkitProfileService.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
--- toolkit/profile/nsToolkitProfileService.cpp.orig 2014-05-06 22:56:35.000000000 +0000
|
||||
+++ toolkit/profile/nsToolkitProfileService.cpp
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "nsIFile.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "nsILocalFileMac.h"
|
||||
#endif
|
||||
@@ -1013,7 +1013,7 @@ NS_NewToolkitProfileService(nsIToolkitPr
|
||||
nsresult
|
||||
XRE_GetFileFromPath(const char *aPath, nsIFile* *aResult)
|
||||
{
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
int32_t pathLen = strlen(aPath);
|
||||
if (pathLen > MAXPATHLEN)
|
||||
return NS_ERROR_INVALID_ARG;
|
105
www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp
Normal file
105
www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp
Normal file
|
@ -0,0 +1,105 @@
|
|||
$NetBSD: patch-toolkit_xre_nsAppRunner.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- toolkit/xre/nsAppRunner.cpp.orig 2014-05-06 22:56:36.000000000 +0000
|
||||
+++ toolkit/xre/nsAppRunner.cpp
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "EventTracer.h"
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsVersionComparator.h"
|
||||
#include "MacLaunchHelper.h"
|
||||
#include "MacApplicationDelegate.h"
|
||||
@@ -158,7 +158,7 @@
|
||||
#include <wbemidl.h>
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsILocalFileMac.h"
|
||||
#include "nsCommandLineServiceMac.h"
|
||||
#endif
|
||||
@@ -177,7 +177,7 @@
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
-#if defined (XP_MACOSX)
|
||||
+#if defined (MOZ_WIDGET_COCOA)
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
@@ -1072,7 +1072,7 @@ nsXULAppInfo::WriteMinidumpForException(
|
||||
NS_IMETHODIMP
|
||||
nsXULAppInfo::AppendObjCExceptionInfoToAppNotes(void* aException)
|
||||
{
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
return CrashReporter::AppendObjCExceptionInfoToAppNotes(aException);
|
||||
#else
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
@@ -1145,7 +1145,7 @@ ScopedXPCOMStartup::~ScopedXPCOMStartup(
|
||||
NS_IF_RELEASE(gNativeAppSupport);
|
||||
|
||||
if (mServiceManager) {
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// On OS X, we need a pool to catch cocoa objects that are autoreleased
|
||||
// during teardown.
|
||||
mozilla::MacAutoreleasePool pool;
|
||||
@@ -1682,7 +1682,7 @@ static nsresult LaunchChild(nsINativeApp
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
mozilla::widget::android::GeckoAppShell::ScheduleRestart();
|
||||
#else
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
|
||||
uint32_t restartMode = 0;
|
||||
restartMode = gRestartMode;
|
||||
@@ -1767,7 +1767,7 @@ ProfileLockedDialog(nsIFile* aProfileDir
|
||||
const char16_t* params[] = {appName.get(), appName.get()};
|
||||
|
||||
nsXPIDLString killMessage;
|
||||
-#ifndef XP_MACOSX
|
||||
+#ifndef MOZ_WIDGET_COCOA
|
||||
static const char16_t kRestartNoUnlocker[] = {'r','e','s','t','a','r','t','M','e','s','s','a','g','e','N','o','U','n','l','o','c','k','e','r','\0'}; // "restartMessageNoUnlocker"
|
||||
static const char16_t kRestartUnlocker[] = {'r','e','s','t','a','r','t','M','e','s','s','a','g','e','U','n','l','o','c','k','e','r','\0'}; // "restartMessageUnlocker"
|
||||
#else
|
||||
@@ -1927,7 +1927,7 @@ ShowProfileManager(nsIToolkitProfileServ
|
||||
rv = xpcom.SetWindowCreator(aNative);
|
||||
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
CommandLineServiceMac::SetupMacCommandLine(gRestartArgc, gRestartArgv, true);
|
||||
#endif
|
||||
|
||||
@@ -3142,7 +3142,7 @@ XREMain::XRE_mainInit(bool* aExitFlag)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (EnvHasValue("MOZ_LAUNCHED_CHILD")) {
|
||||
// This is needed, on relaunch, to force the OS to use the "Cocoa Dock
|
||||
// API". Otherwise the call to ReceiveNextEvent() below will make it
|
||||
@@ -3226,7 +3226,7 @@ XREMain::XRE_mainInit(bool* aExitFlag)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (GetCurrentEventKeyModifiers() & optionKey)
|
||||
gSafeMode = true;
|
||||
#endif
|
||||
@@ -4033,7 +4033,7 @@ XREMain::XRE_mainRun()
|
||||
g_unsetenv ("DESKTOP_STARTUP_ID");
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// Set up ability to respond to system (Apple) events. This must be
|
||||
// done before setting up the command line service.
|
||||
SetupMacApplicationDelegate();
|
|
@ -1,17 +1,49 @@
|
|||
$NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.3 2014/02/20 13:19:03 ryoon Exp $
|
||||
$NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.4 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
--- toolkit/xre/nsEmbedFunctions.cpp.orig 2013-05-11 19:19:55.000000000 +0000
|
||||
* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- toolkit/xre/nsEmbedFunctions.cpp.orig 2014-05-06 22:56:36.000000000 +0000
|
||||
+++ toolkit/xre/nsEmbedFunctions.cpp
|
||||
@@ -239,7 +239,7 @@ XRE_SetRemoteExceptionHandler(const char
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "nsXREDirProvider.h"
|
||||
|
||||
#include "mozilla/Omnijar.h"
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
#include "nsVersionComparator.h"
|
||||
#include "chrome/common/mach_ipc_mac.h"
|
||||
#endif
|
||||
@@ -228,9 +228,9 @@ XRE_TakeMinidumpForChild(uint32_t aChild
|
||||
bool
|
||||
XRE_SetRemoteExceptionHandler(const char* aPipe/*= 0*/)
|
||||
{
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
-#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA)
|
||||
return CrashReporter::SetRemoteExceptionHandler(nsDependentCString(aPipe));
|
||||
-#elif defined(OS_LINUX)
|
||||
+#elif defined(OS_LINUX) || defined(OS_SOLARIS)
|
||||
return CrashReporter::SetRemoteExceptionHandler();
|
||||
#else
|
||||
# error "OOP crash reporter unsupported on this platform"
|
||||
@@ -351,7 +351,7 @@ XRE_InitChildProcess(int aArgc,
|
||||
@@ -306,7 +306,7 @@ XRE_InitChildProcess(int aArgc,
|
||||
|
||||
// Complete 'task_t' exchange for Mac OS X. This structure has the same size
|
||||
// regardless of architecture so we don't have any cross-arch issues here.
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
if (aArgc < 1)
|
||||
return NS_ERROR_FAILURE;
|
||||
const char* const mach_port_name = aArgv[--aArgc];
|
||||
@@ -359,7 +359,7 @@ XRE_InitChildProcess(int aArgc,
|
||||
return NS_ERROR_FAILURE;
|
||||
const char* const crashReporterArg = aArgv[--aArgc];
|
||||
|
||||
-# if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
+# if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA)
|
||||
// on windows and mac, |crashReporterArg| is the named pipe on which the
|
||||
// server is listening for requests, or "-" if crash reporting is
|
||||
// disabled.
|
||||
@@ -368,7 +368,7 @@ XRE_InitChildProcess(int aArgc,
|
||||
// Bug 684322 will add better visibility into this condition
|
||||
NS_WARNING("Could not setup crash reporting\n");
|
||||
}
|
||||
|
@ -20,3 +52,39 @@ $NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.3 2014/02/20 13:19:03 ryoon
|
|||
// on POSIX, |crashReporterArg| is "true" if crash reporting is
|
||||
// enabled, false otherwise
|
||||
if (0 != strcmp("false", crashReporterArg) &&
|
||||
@@ -636,7 +636,7 @@ XRE_RunAppShell()
|
||||
{
|
||||
nsCOMPtr<nsIAppShell> appShell(do_GetService(kAppShellCID));
|
||||
NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE);
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
{
|
||||
// In content processes that want XPCOM (and hence want
|
||||
// AppShell), we usually run our hybrid event loop through
|
||||
@@ -675,7 +675,7 @@ XRE_RunAppShell()
|
||||
|
||||
loop->SetNestableTasksAllowed(couldNest);
|
||||
}
|
||||
-#endif // XP_MACOSX
|
||||
+#endif // MOZ_WIDGET_COCOA
|
||||
return appShell->Run();
|
||||
}
|
||||
|
||||
@@ -701,7 +701,7 @@ XRE_ShutdownChildProcess()
|
||||
// (4) ProcessChild joins the IO thread
|
||||
// (5) exit()
|
||||
MessageLoop::current()->Quit();
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
nsCOMPtr<nsIAppShell> appShell(do_GetService(kAppShellCID));
|
||||
if (appShell) {
|
||||
// On Mac, we might be only above nsAppShell::Run(), not
|
||||
@@ -710,7 +710,7 @@ XRE_ShutdownChildProcess()
|
||||
// above MessagePump::Run(), this Exit() is just superfluous.
|
||||
appShell->Exit();
|
||||
}
|
||||
-#endif // XP_MACOSX
|
||||
+#endif // MOZ_WIDGET_COCOA
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
112
www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp
Normal file
112
www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp
Normal file
|
@ -0,0 +1,112 @@
|
|||
$NetBSD: patch-toolkit_xre_nsXREDirProvider.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- toolkit/xre/nsXREDirProvider.cpp.orig 2014-05-06 22:56:36.000000000 +0000
|
||||
+++ toolkit/xre/nsXREDirProvider.cpp
|
||||
@@ -41,7 +41,7 @@
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsILocalFileMac.h"
|
||||
// for chflags()
|
||||
#include <sys/stat.h>
|
||||
@@ -55,7 +55,7 @@
|
||||
#include <os2.h>
|
||||
#endif
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
#define APP_REGISTRY_NAME "Application Registry"
|
||||
#elif defined(XP_WIN) || defined(XP_OS2)
|
||||
#define APP_REGISTRY_NAME "registry.dat"
|
||||
@@ -134,7 +134,7 @@ nsXREDirProvider::SetProfile(nsIFile* aD
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
bool same;
|
||||
if (NS_SUCCEEDED(aDir->Equals(aLocalDir, &same)) && !same) {
|
||||
// Ensure that the cache directory is not indexed by Spotlight
|
||||
@@ -192,7 +192,7 @@ nsXREDirProvider::GetUserProfilesRootDir
|
||||
aProfileName, aAppName, aVendorName);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
-#if !defined(XP_UNIX) || defined(XP_MACOSX)
|
||||
+#if !defined(XP_UNIX) || defined(MOZ_WIDGET_COCOA)
|
||||
rv = file->AppendNative(NS_LITERAL_CSTRING("Profiles"));
|
||||
#endif
|
||||
// We must create the profile directory here if it does not exist.
|
||||
@@ -217,7 +217,7 @@ nsXREDirProvider::GetUserProfilesLocalDi
|
||||
aProfileName, aAppName, aVendorName);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
-#if !defined(XP_UNIX) || defined(XP_MACOSX)
|
||||
+#if !defined(XP_UNIX) || defined(MOZ_WIDGET_COCOA)
|
||||
rv = file->AppendNative(NS_LITERAL_CSTRING("Profiles"));
|
||||
#endif
|
||||
// We must create the profile directory here if it does not exist.
|
||||
@@ -341,7 +341,7 @@ nsXREDirProvider::GetFile(const char* aP
|
||||
return mAppProvider->GetFile(NS_APP_PROFILE_DIR_STARTUP, aPersistent,
|
||||
aFile);
|
||||
}
|
||||
-#if defined(XP_UNIX) || defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) || defined(MOZ_WIDGET_COCOA)
|
||||
else if (!strcmp(aProperty, XRE_SYS_LOCAL_EXTENSION_PARENT_DIR)) {
|
||||
#ifdef ENABLE_SYSTEM_EXTENSION_DIRS
|
||||
return GetSystemExtensionsDirectory(aFile);
|
||||
@@ -350,7 +350,7 @@ nsXREDirProvider::GetFile(const char* aP
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
-#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
|
||||
else if (!strcmp(aProperty, XRE_SYS_SHARE_EXTENSION_PARENT_DIR)) {
|
||||
#ifdef ENABLE_SYSTEM_EXTENSION_DIRS
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
@@ -1145,7 +1145,7 @@ nsXREDirProvider::GetUserDataDirectoryHo
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIFile> localDir;
|
||||
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
FSRef fsRef;
|
||||
OSType folderType;
|
||||
if (aLocal) {
|
||||
@@ -1264,13 +1264,13 @@ nsXREDirProvider::GetSysUserExtensionsDi
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
-#if defined(XP_UNIX) || defined(XP_MACOSX)
|
||||
+#if defined(XP_UNIX) || defined(MOZ_WIDGET_COCOA)
|
||||
nsresult
|
||||
nsXREDirProvider::GetSystemExtensionsDirectory(nsIFile** aFile)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIFile> localDir;
|
||||
-#if defined(XP_MACOSX)
|
||||
+#if defined(MOZ_WIDGET_COCOA)
|
||||
FSRef fsRef;
|
||||
OSErr err = ::FSFindFolder(kOnSystemDisk, kApplicationSupportFolderType, kCreateFolder, &fsRef);
|
||||
NS_ENSURE_FALSE(err, NS_ERROR_FAILURE);
|
||||
@@ -1413,7 +1413,7 @@ nsXREDirProvider::AppendSysUserExtension
|
||||
|
||||
nsresult rv;
|
||||
|
||||
-#if defined (XP_MACOSX) || defined(XP_WIN) || defined(XP_OS2)
|
||||
+#if defined (MOZ_WIDGET_COCOA) || defined(XP_WIN) || defined(XP_OS2)
|
||||
|
||||
static const char* const sXR = "Mozilla";
|
||||
rv = aFile->AppendNative(nsDependentCString(sXR));
|
||||
@@ -1472,7 +1472,7 @@ nsXREDirProvider::AppendProfilePath(nsIF
|
||||
|
||||
nsresult rv;
|
||||
|
||||
-#if defined (XP_MACOSX)
|
||||
+#if defined (MOZ_WIDGET_COCOA)
|
||||
if (!profile.IsEmpty()) {
|
||||
rv = AppendProfileString(aFile, profile.get());
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-widget_shared_NativeKeyToDOMKeyName.h,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- widget/shared/NativeKeyToDOMKeyName.h.orig 2014-05-06 22:56:37.000000000 +0000
|
||||
+++ widget/shared/NativeKeyToDOMKeyName.h
|
||||
@@ -54,7 +54,7 @@
|
||||
#define KEY_MAP_WIN_OTH(aCPPKeyName, aNativeKey) \
|
||||
NS_OTHER_NATIVE_KEY_TO_DOM_KEY_NAME_INDEX(aNativeKey, \
|
||||
KEY_NAME_INDEX_##aCPPKeyName)
|
||||
-#elif defined(XP_MACOSX)
|
||||
+#elif defined(MOZ_WIDGET_COCOA)
|
||||
#undef KEY_MAP_COCOA
|
||||
#define KEY_MAP_COCOA(aCPPKeyName, aNativeKey) \
|
||||
NS_NATIVE_KEY_TO_DOM_KEY_NAME_INDEX(aNativeKey, KEY_NAME_INDEX_##aCPPKeyName)
|
40
www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp
Normal file
40
www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp
Normal file
|
@ -0,0 +1,40 @@
|
|||
$NetBSD: patch-widget_xpwidgets_nsBaseWidget.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- widget/xpwidgets/nsBaseWidget.cpp.orig 2014-05-06 22:56:38.000000000 +0000
|
||||
+++ widget/xpwidgets/nsBaseWidget.cpp
|
||||
@@ -58,7 +58,7 @@ static void debug_RegisterPrefCallbacks(
|
||||
static int32_t gNumWidgets;
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsCocoaFeatures.h"
|
||||
#endif
|
||||
|
||||
@@ -491,7 +491,7 @@ void nsBaseWidget::AddChild(nsIWidget* a
|
||||
void nsBaseWidget::RemoveChild(nsIWidget* aChild)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// nsCocoaWindow doesn't implement GetParent, so in that case parent will be
|
||||
// null and we'll just have to do without this assertion.
|
||||
nsIWidget* parent = aChild->GetParent();
|
||||
@@ -837,13 +837,13 @@ bool
|
||||
nsBaseWidget::ComputeShouldAccelerate(bool aDefault)
|
||||
{
|
||||
#if defined(XP_WIN) || defined(ANDROID) || \
|
||||
- defined(MOZ_GL_PROVIDER) || defined(XP_MACOSX)
|
||||
+ defined(MOZ_GL_PROVIDER) || defined(MOZ_WIDGET_COCOA)
|
||||
bool accelerateByDefault = true;
|
||||
#else
|
||||
bool accelerateByDefault = false;
|
||||
#endif
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
// 10.6.2 and lower have a bug involving textures and pixel buffer objects
|
||||
// that caused bug 629016, so we don't allow OpenGL-accelerated layers on
|
||||
// those versions of the OS.
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-xpfe_appshell_src_nsWebShellWindow.cpp,v 1.1 2014/05/29 15:38:19 pho Exp $
|
||||
|
||||
Don't assume cocoa toolkit just because OS_ARCH is Darwin.
|
||||
|
||||
--- xpfe/appshell/src/nsWebShellWindow.cpp.orig 2014-05-06 22:56:40.000000000 +0000
|
||||
+++ xpfe/appshell/src/nsWebShellWindow.cpp
|
||||
@@ -71,7 +71,7 @@
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
|
||||
-#ifdef XP_MACOSX
|
||||
+#ifdef MOZ_WIDGET_COCOA
|
||||
#include "nsINativeMenuService.h"
|
||||
#define USE_NATIVE_MENUS
|
||||
#endif
|
Loading…
Reference in a new issue