summaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2014-05-30 10:22:05 +0000
committerpho <pho@pkgsrc.org>2014-05-30 10:22:05 +0000
commit1ac6a85bde9fa0877c22f18bbab5551809f72f38 (patch)
treea8835d0a7672e78751b3fe2bcc8bb5523d7597db /www/firefox
parentf080710214dc84ae1047a81e261cba6407ad8937 (diff)
downloadpkgsrc-1ac6a85bde9fa0877c22f18bbab5551809f72f38.tar.gz
PR pkg/48840: Remove most patches that I have recently added
The preprocessor macro XP_MACOSX is misused everywhere. They tend to say "#if defined(XP_MACOSX)" to actually mean "#if defined(MOZ_WIDGET_COCOA)". It's okay to equate XP_MACOSX with XP_DARWIN but equating it with MOZ_WIDGET_COCOA is just wrong. As a result, cairo-gtk2 build on Darwin is completely broken and needs heavy patching. Ideally they should be fixed individually but that will be an extremely hard work, so don't define XP_MACOSX for now.
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/distinfo81
-rw-r--r--www/firefox/patches/patch-aa69
-rw-r--r--www/firefox/patches/patch-browser_app_nsBrowserApp.cpp44
-rw-r--r--www/firefox/patches/patch-browser_components_build_nsModule.cpp51
-rw-r--r--www/firefox/patches/patch-content_base_src_nsObjectLoadingContent.cpp15
-rw-r--r--www/firefox/patches/patch-content_canvas_src_WebGLContext.h24
-rw-r--r--www/firefox/patches/patch-content_svg_content_src_SVGComponentTransferFunctionElement.h13
-rw-r--r--www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.cpp22
-rw-r--r--www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.h13
-rw-r--r--www/firefox/patches/patch-dom_events_nsEventStateManager.cpp51
-rw-r--r--www/firefox/patches/patch-dom_indexedDB_IDBEvents.cpp13
-rw-r--r--www/firefox/patches/patch-dom_indexedDB_IDBEvents.h13
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.cpp42
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h90
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_npapi.h132
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_npfunctions.h24
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp87
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.cpp42
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.h24
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp33
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.cpp247
-rw-r--r--www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.h83
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.cpp209
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.h51
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceParent.cpp179
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h33
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.cpp23
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.h138
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginModuleChild.cpp39
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp123
-rw-r--r--www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.h33
-rw-r--r--www/firefox/patches/patch-dom_system_OSFileConstants.cpp90
-rw-r--r--www/firefox/patches/patch-gfx_2d_Factory.cpp56
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLContext.cpp38
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLContextFeatures.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLContextProvider.h15
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp33
-rw-r--r--www/firefox/patches/patch-gfx_layers_ImageContainer.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_layers_basic_BasicImages.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp15
-rw-r--r--www/firefox/patches/patch-gfx_layers_client_ClientCanvasLayer.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp24
-rw-r--r--www/firefox/patches/patch-gfx_layers_opengl_TextureHostOGL.cpp42
-rw-r--r--www/firefox/patches/patch-gfx_src_nsDeviceContext.cpp66
-rw-r--r--www/firefox/patches/patch-gfx_thebes_gfxFont.cpp42
-rw-r--r--www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp51
-rw-r--r--www/firefox/patches/patch-image_src_imgFrame.cpp87
-rw-r--r--www/firefox/patches/patch-image_src_imgFrame.h33
-rw-r--r--www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h20
-rw-r--r--www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp60
-rw-r--r--www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp33
-rw-r--r--www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp204
-rw-r--r--www/firefox/patches/patch-netwerk_build_nsNetModule.cpp24
-rw-r--r--www/firefox/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp33
-rw-r--r--www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp33
-rw-r--r--www/firefox/patches/patch-toolkit_components_downloads_nsDownloadManager.cpp60
-rw-r--r--www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp33
-rw-r--r--www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp24
-rw-r--r--www/firefox/patches/patch-toolkit_profile_nsToolkitProfileService.cpp22
-rw-r--r--www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp105
-rw-r--r--www/firefox/patches/patch-toolkit_xre_nsEmbedFunctions.cpp78
-rw-r--r--www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp112
-rw-r--r--www/firefox/patches/patch-uriloader_exthandler_nsExternalHelperAppService.cpp42
-rw-r--r--www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h15
-rw-r--r--www/firefox/patches/patch-widget_shared_NativeKeyToDOMKeyName.h15
-rw-r--r--www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp40
-rw-r--r--www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp54
-rw-r--r--www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp42
-rw-r--r--www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h15
-rw-r--r--www/firefox/patches/patch-xpcom_build_BinaryPath.h24
-rw-r--r--www/firefox/patches/patch-xpcom_build_PoisonIOInterposer.h58
-rw-r--r--www/firefox/patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp34
-rw-r--r--www/firefox/patches/patch-xpfe_appshell_src_nsWebShellWindow.cpp15
74 files changed, 241 insertions, 3707 deletions
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index d8043d66e5d..aef70dab9ed 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.151 2014/05/30 03:03:36 pho Exp $
+$NetBSD: distinfo,v 1.152 2014/05/30 10:22:05 pho Exp $
SHA1 (firefox-29.0.1.source.tar.bz2) = 2819ef63403de2bcfff5496bd21a3b8cb5dfce82
RMD160 (firefox-29.0.1.source.tar.bz2) = f728179a12a46824971ca01cf79eb0318e4775c5
Size (firefox-29.0.1.source.tar.bz2) = 142735471 bytes
-SHA1 (patch-aa) = 2965a91cb4a3911ccd9d21bad8568cf809dfc08e
+SHA1 (patch-aa) = f40e910e402015c6720eb227bdb2226067aa037d
SHA1 (patch-ak) = 971ddb1f12b14bcee604c9d7e72da5e7bf47d9be
SHA1 (patch-al) = cca5df21d018bb9f428ad26d00718f33afe88ec5
SHA1 (patch-ao) = ca7e6723a10b9f6e3306cd12557e1856727edee9
@@ -11,9 +11,8 @@ SHA1 (patch-as) = fd8d7ad61f5557693af96bb5fe9439f8cdb347db
SHA1 (patch-bf) = 75c971043e9f693203d6bd670b2c20c4952a7756
SHA1 (patch-bg) = d6c02294765265d9e85cf49c22320d88573c2e25
SHA1 (patch-bi) = 3dd927d93431afe000cd4a45b4d9920e63158a85
-SHA1 (patch-browser_app_nsBrowserApp.cpp) = 2820b1f2ec97788d49fddc15e4742fa0068c666c
+SHA1 (patch-browser_app_nsBrowserApp.cpp) = 00914f7656fff6785d737ce6e569a97fe39aafe8
SHA1 (patch-browser_app_profile_firefox.js) = 108efbe1ae65669912d2f76caec546753e1ac8f3
-SHA1 (patch-browser_components_build_nsModule.cpp) = df72e03d68ff7edb5e0316600c9812f6677773ad
SHA1 (patch-browser_installer_package-manifest.in) = d5792a3c5dd7498d24ac0426aacf7d0b9a842c67
SHA1 (patch-browser_locales_en-US_chrome_browser-region_region.properties) = 284d62596718d7f372c4e5214fd05adec043c93a
SHA1 (patch-browser_locales_en-US_searchplugins_duckduckgo.xml) = 69eca52185ac868e95041b5d87611ee32c2b6330
@@ -30,8 +29,6 @@ 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_canvas_src_WebGLContext.h) = 4705978ef5cc463bbf85e437bba698c2edd5a886
SHA1 (patch-content_media_AudioStream.cpp) = 70021dfd1cc86e8999f144b49a23bfb27dd24157
SHA1 (patch-content_media_AudioStream.h) = 905a0ff67c131fbf50670b5836bff84f1284d0c4
SHA1 (patch-content_media_Makefile.in) = 7aaac3bac94c9463ca324e05ebab4b9858f46fc5
@@ -46,63 +43,20 @@ SHA1 (patch-content_media_gstreamer_GStreamerReader.cpp) = 99fd1f24ed5f3f350fdbc
SHA1 (patch-content_media_gstreamer_GStreamerReader.h) = 118f83ebdec7bcda4f0ced8064a9b3c6cad78172
SHA1 (patch-content_media_gstreamer_moz.build) = c38bd0d432577b55429ae5466b1b02c7b6fd1901
SHA1 (patch-content_media_test_manifest.js) = 5b98d9eb16f898211fc0e30d821303bf72e8aaeb
-SHA1 (patch-content_svg_content_src_SVGComponentTransferFunctionElement.h) = 64aff36cbd72b5d61eb6d7dde6e57b7d77b56a50
-SHA1 (patch-content_svg_content_src_nsSVGFilters.cpp) = ed8810687e5f5b60b64c51286daeaf7787c09dda
-SHA1 (patch-content_svg_content_src_nsSVGFilters.h) = 37ead5c8f14551d843be8bc09be254175b38b4d7
-SHA1 (patch-dom_events_nsEventStateManager.cpp) = 2c8209d0a6555042afe745cb8939c367f22e847a
-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) = 2f3bac291304f885889cbd5e6aaa0aae50d849a1
+SHA1 (patch-dom_plugins_ipc_PluginModuleChild.cpp) = 69b0a51d733cd52e7d200052362e0faf4ec918f1
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 0a7f3167e939822013ae6195406657453578453e
-SHA1 (patch-dom_plugins_ipc_PluginModuleParent.cpp) = cb9e0690ccd1e746b4a40bb17c0d43bfb762f21c
-SHA1 (patch-dom_plugins_ipc_PluginModuleParent.h) = f0e11d0f781222202d1fd86835907e2e428d8c7e
SHA1 (patch-dom_plugins_ipc_PluginProcessChild.cpp) = 5ab28cc0398b72cb5e1b0586406845495b9f87e4
-SHA1 (patch-dom_system_OSFileConstants.cpp) = 3defa673b428415d6b72103b8f1892d5c976d0ef
+SHA1 (patch-dom_system_OSFileConstants.cpp) = e7f984ae16794f88816b99b1c58bac112689460c
SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = a2a0652d0eac018fda06e729bf5ba786dd8a3866
-SHA1 (patch-gfx_2d_Factory.cpp) = 341e772be3de1f896b92621211363b6c0215523d
SHA1 (patch-gfx__skia__include__core__SkPreConfig.h) = 6f99cf0eb5d4617d529c378707f537bc1e5cb28f
-SHA1 (patch-gfx_gl_GLContext.cpp) = 80625c5745722fdf05f9b03d00a43043da59d5e6
-SHA1 (patch-gfx_gl_GLContextFeatures.cpp) = 6e70ea9110ffe9e24baf728c03c4e2ac1219dd97
-SHA1 (patch-gfx_gl_GLContextProvider.h) = 5e43dda114f49c03f12a9bfaacb24d8ba408646e
-SHA1 (patch-gfx_gl_GLScreenBuffer.cpp) = d4954ab87c256572839369dc11fa338033fb0a53
-SHA1 (patch-gfx_gl_GLTextureImage.cpp) = 6854261f8e051504ac4e8ee3dc99290e57920cb0
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
-SHA1 (patch-gfx_layers_ImageContainer.cpp) = 272cbcc0256b44a4f2c1ffe97c1d8c122fd93250
-SHA1 (patch-gfx_layers_basic_BasicImages.cpp) = 2b6fed10689ae4ea19cafa3b5fc8ac710faef529
-SHA1 (patch-gfx_layers_basic_TextureHostBasic.cpp) = 61344026335f793d858b5276da0271a4a4042b00
-SHA1 (patch-gfx_layers_client_ClientCanvasLayer.cpp) = 5ea3410eed5e3a81527e138459ee87d058844c6d
-SHA1 (patch-gfx_layers_composite_LayerManagerComposite.cpp) = 0ff02f5c4e354e301d0acefcbc8d7623a44cc78b
-SHA1 (patch-gfx_layers_opengl_TextureHostOGL.cpp) = 32ad7dcf580cb7030511ce0dabb770da53d4d259
SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9
SHA1 (patch-gfx_skia_Makefile.in) = df1592fcab275a13e7015c9d73283f4326898186
SHA1 (patch-gfx_skia_moz.build) = 1eb1b2c8948f7faaab267cace79f179fb258523c
SHA1 (patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp) = 19342e66383e224b34f98c9d58ad05d4041dd9f4
-SHA1 (patch-gfx_src_nsDeviceContext.cpp) = 9f6102ef7b66508f5ca8b2754331e59c7ccf79ef
SHA1 (patch-gfx_thebes_Makefile.in) = 16b63bc42870aa8c042416c6e04b3513981ca6f0
-SHA1 (patch-gfx_thebes_gfxFont.cpp) = 7888a16944c4b6371a8bdeb3fc70ed395de8e1ea
-SHA1 (patch-gfx_thebes_gfxPlatform.cpp) = b3baf73460dcede6497e08cc3082bf646f17ba01
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_locale_src_nsLocaleConstructors.h) = 46db67dbfc07872279dab5ddb1bc3b524f50ef26
-SHA1 (patch-intl_locale_src_nsLocaleService.cpp) = 0d8866591382a98cb6c1ea84e1b0b27448ab0aae
SHA1 (patch-intl_unicharutil_util_Makefile.in) = c8f37cc420ba26b63c66fbbf69b13a8b4fea43fc
SHA1 (patch-ipc_chromium_Makefile.in) = 3a1f5b218217fc8e5e9a07195054618071c38059
SHA1 (patch-ipc_chromium_moz.build) = de12255865e45cfdf0f7dc57ce101be75ac8ad54
@@ -131,8 +85,6 @@ 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-js_xpconnect_shell_xpcshell.cpp) = 3ff9a9b622338171a0addff5f19d09fae076743d
-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
@@ -156,9 +108,7 @@ SHA1 (patch-memory_jemalloc_Makefile.in) = 772e996c8da254f952d0f3a0c9325a177c838
SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = 9d9036ddd28c7b8ce37860e0120df2997a3a0c59
SHA1 (patch-mfbt_Poison.cpp) = b582943c02f57835451c9eecd004c9912d42ce84
SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 6aff0f8ed42575d8ca36a524e12e9a1f7351004a
-SHA1 (patch-netwerk_build_nsNetModule.cpp) = ea680300cea2eee2cdbb516a371afafdbf4935d5
SHA1 (patch-netwerk_dns_Makefile.in) = b6bd9814d909dd6f7cff10dbeac3bedd79c2508e
-SHA1 (patch-netwerk_protocol_http_nsHttpHandler.cpp) = 517cf1ac41a06ce1d02c7e1a6c5e74a983307dd6
SHA1 (patch-netwerk_sctp_src_netinet6_sctp6__usrreq.c) = 31d49db31b1e130f1b455f883e5b7c606d438771
SHA1 (patch-netwerk_sctp_src_netinet_sctp__os__userspace.h) = b3f94ac0f2bd652371fef22c642b14bf30162998
SHA1 (patch-netwerk_sctp_src_netinet_sctp__usrreq.c) = 421b6e071a9934567ccba337033a42208e6e4bd5
@@ -169,25 +119,14 @@ SHA1 (patch-netwerk_wifi_moz.build) = 8c88e5bab2a5e164e97ce568686bd280d4b90bec
SHA1 (patch-netwerk_wifi_nsWifiScannerFreeBSD.cpp) = c5711adc111dc8413a7234e7d5814a0af9ceeecc
SHA1 (patch-pb) = 97c9b2e4cefd524dc6ba825f71c3da2a761aa1f4
SHA1 (patch-pc) = 8b2baa88f0983a2fef4f801cf6b1ae425f6c813a
-SHA1 (patch-profile_dirserviceprovider_src_nsProfileLock.cpp) = d5d9f5f840a144dadbd2cb95e6e4c18b469290b0
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_jsdownloads_src_DownloadPlatform.cpp) = 2c1d15a5ddbe0815e49ce39bd4e91fde35ed0a5d
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) = fbbd166267a23d840babb0896c24a57e62708c7f
-SHA1 (patch-toolkit_library_nsStaticXULComponents.cpp) = 135d4f2013d998d1f03d2c6af21a86a53c59ede7
-SHA1 (patch-toolkit_profile_nsToolkitProfileService.cpp) = 142cff366da213d1283ce32ae371915f3cf76f88
SHA1 (patch-toolkit_toolkit.mozbuild) = 0993d50cc02c2b421e6de087dfb0a9cb30562c6b
-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-uriloader_exthandler_nsLocalHandlerApp.h) = d1c179732cca18c56fe469ef6ed8ef364d0a174d
+SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 6ee6fba04a3ecc6596f8aed67f752a1075901fa8
SHA1 (patch-webapprt_moz.build) = cb3d92bc8ada1e2b49877cf7bbe6fbc32278230a
-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
@@ -195,17 +134,15 @@ SHA1 (patch-xf) = 1720ae5cf3cf0df6f2e9519c83a332585bdd67bf
SHA1 (patch-xg) = b80e660e85b06e4f71146bd41bd4bc0d2e3b6488
SHA1 (patch-xl) = 9555b86c72b2e144e341d6af1dbfbc07cc8c94db
SHA1 (patch-xm) = 81e02e410c00175cbb98c646dda90c7adf199657
-SHA1 (patch-xpcom_base_nsStackWalk.cpp) = b4a21504a6884ba08005c34ee7d7cc9dfeeaf9b4
-SHA1 (patch-xpcom_base_nsUUIDGenerator.cpp) = e562fc0fc654ebbcc5e72fd60e87a1a9b03db81c
-SHA1 (patch-xpcom_base_nsUUIDGenerator.h) = bcc5362df162b9dcba972408df195d96c94d473a
+SHA1 (patch-xpcom_base_nsStackWalk.cpp) = 087c1bcdeb9a418a5a7ce10ed5790df3bb3d0fb1
SHA1 (patch-xpcom_base_nscore.h) = b1a190d8ef4478b882daeceda51584f947555a28
-SHA1 (patch-xpcom_build_BinaryPath.h) = 04b2992074af279aa47f188ff467100bf968224d
+SHA1 (patch-xpcom_build_PoisonIOInterposer.h) = a3bed2bdabab83a4514bc52908a727442c4a7eaf
SHA1 (patch-xpcom_ds_TimeStamp.h) = a1fb060f91720eb330f102b28d9373bbdbe96e30
+SHA1 (patch-xpcom_glue_standalone_nsXPCOMGlue.cpp) = 033ca3f1e35658ca81161e18e6ddc2048ce20b1f
SHA1 (patch-xpcom_io_nsLocalFileUnix.cpp) = 3de3345eb98ffe78628d5bac672ce4ab5806270e
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_moz.build) = 954b60998c5621b896fae372fe067df693574ea4
SHA1 (patch-xpcom_reflect_xptcall_src_md_unix_xptcinvoke__asm__mips.S) = b2b81fcdf6591089fcc5de4c8f820e96c0a50256
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
diff --git a/www/firefox/patches/patch-aa b/www/firefox/patches/patch-aa
index 97706d2eebc..b2640300794 100644
--- a/www/firefox/patches/patch-aa
+++ b/www/firefox/patches/patch-aa
@@ -1,9 +1,18 @@
-$NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
+$NetBSD: patch-aa,v 1.27 2014/05/30 10:22:05 pho Exp $
-* On Darwin the profiler only supports x86 and x86_64.
+* The profiler does not support Darwin/PPC so don't try to enable it
+ on that platform.
* Cocoa gamepad backend can only be used if the toolkit is cocoa too.
+* The preprocessor macro XP_MACOSX is misused everywhere. They tend to
+ say "#if defined(XP_MACOSX)" to actually mean
+ "#if defined(MOZ_WIDGET_COCOA)". It's okay to equate XP_MACOSX with
+ XP_DARWIN but equating it with MOZ_WIDGET_COCOA is just wrong. As a
+ result, cairo-gtk2 build on Darwin is completely broken and needs
+ heavy patching. Ideally they should be fixed individually but that
+ will be an extremely hard work, so don't define XP_MACOSX for now.
+
--- configure.in.orig 2014-05-06 22:55:16.000000000 +0000
+++ configure.in
@@ -1613,7 +1613,13 @@ Linux)
@@ -21,7 +30,24 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
*)
MOZ_ENABLE_PROFILER_SPS=
;;
-@@ -2534,118 +2540,15 @@ MOZ_CXX11
+@@ -1717,7 +1723,7 @@ case "$host" in
+ ;;
+
+ *-darwin*)
+- HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11"
++ HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
+ HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"'
+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
+ ;;
+@@ -1857,7 +1863,6 @@ case "$target" in
+ AC_DEFINE(XP_DARWIN)
+ _PLATFORM_DEFAULT_TOOLKIT='cairo-uikit'
+ else
+- AC_DEFINE(XP_MACOSX)
+ AC_DEFINE(XP_DARWIN)
+ _PLATFORM_DEFAULT_TOOLKIT='cairo-cocoa'
+ # The ExceptionHandling framework is needed for Objective-C exception
+@@ -2534,118 +2539,15 @@ MOZ_CXX11
AC_LANG_C
@@ -147,7 +173,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
fi # GNU_CC
# visibility hidden flag for Sun Studio on Solaris
-@@ -3711,6 +3614,14 @@ if test -n "$YASM"; then
+@@ -3711,6 +3613,14 @@ if test -n "$YASM"; then
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
fi
@@ -162,7 +188,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
-@@ -3738,11 +3649,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
+@@ -3738,11 +3648,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
#include <jpeglib.h> ],
[ #if JPEG_LIB_VERSION < $MOZJPEG
#error "Insufficient JPEG library version ($MOZJPEG required)."
@@ -175,7 +201,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
MOZ_NATIVE_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
-@@ -3940,6 +3847,22 @@ fi
+@@ -3940,6 +3846,22 @@ fi
AC_SUBST(MOZ_NATIVE_ICU)
dnl ========================================================
@@ -198,7 +224,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl Java SDK support
dnl ========================================================
-@@ -3974,6 +3897,7 @@ MOZ_SAMPLE_TYPE_FLOAT32=
+@@ -3974,6 +3896,7 @@ MOZ_SAMPLE_TYPE_FLOAT32=
MOZ_SAMPLE_TYPE_S16=
MOZ_OPUS=1
MOZ_WEBM=1
@@ -206,7 +232,18 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
MOZ_DIRECTSHOW=
MOZ_WMF=
MOZ_FMP4=
-@@ -5135,6 +5059,9 @@ if test -n "$MOZ_WEBRTC"; then
+@@ -4433,6 +4356,10 @@ cairo-gonk)
+
+ esac
+
++if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
++ AC_DEFINE(XP_MACOSX)
++fi
++
+ AC_SUBST(MOZ_PDF_PRINTING)
+ if test "$MOZ_PDF_PRINTING"; then
+ PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
+@@ -5135,6 +5062,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VPX=1
MOZ_VPX_ERROR_CONCEALMENT=1
@@ -216,7 +253,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl enable once Signaling lands
MOZ_WEBRTC_SIGNALING=1
AC_DEFINE(MOZ_WEBRTC_SIGNALING)
-@@ -5157,15 +5084,18 @@ AC_SUBST(MOZ_SRTP)
+@@ -5157,15 +5087,18 @@ AC_SUBST(MOZ_SRTP)
dnl Use integers over floats for audio on B2G and Android, because audio
dnl backends for those platforms don't support floats.
@@ -238,7 +275,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl ========================================================
dnl = Disable Speech API code
-@@ -5229,6 +5159,57 @@ if test -n "$MOZ_OGG"; then
+@@ -5229,6 +5162,57 @@ if test -n "$MOZ_OGG"; then
fi
dnl ========================================================
@@ -296,7 +333,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl = Disable Opus audio codec support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(opus,
-@@ -5237,6 +5218,76 @@ MOZ_ARG_DISABLE_BOOL(opus,
+@@ -5237,6 +5221,76 @@ MOZ_ARG_DISABLE_BOOL(opus,
MOZ_OPUS=1)
dnl ========================================================
@@ -373,7 +410,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl = Disable VP8 decoder support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webm,
-@@ -5615,44 +5666,61 @@ WINNT|Darwin|Android)
+@@ -5615,44 +5669,61 @@ WINNT|Darwin|Android)
;;
*)
MOZ_GSTREAMER=1
@@ -459,7 +496,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
fi
-@@ -5866,7 +5934,9 @@ MOZ_ARG_DISABLE_BOOL(gamepad,
+@@ -5866,7 +5937,9 @@ MOZ_ARG_DISABLE_BOOL(gamepad,
if test "$MOZ_GAMEPAD"; then
case "$OS_TARGET" in
Darwin)
@@ -470,7 +507,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
;;
WINNT)
if test -n "$MOZ_DIRECTX_SDK_PATH" ; then
-@@ -7939,6 +8009,52 @@ if test "$USE_FC_FREETYPE"; then
+@@ -7939,6 +8012,52 @@ if test "$USE_FC_FREETYPE"; then
fi
dnl ========================================================
@@ -523,7 +560,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
dnl Check for pixman and cairo
dnl ========================================================
-@@ -8189,7 +8305,7 @@ case "$OS_TARGET" in
+@@ -8189,7 +8308,7 @@ case "$OS_TARGET" in
NECKO_WIFI=1
fi
;;
@@ -532,7 +569,7 @@ $NetBSD: patch-aa,v 1.26 2014/05/28 04:55:30 pho Exp $
NECKO_WIFI=1
;;
Linux)
-@@ -8736,6 +8852,20 @@ AC_SUBST(MOZ_ENABLE_SZIP)
+@@ -8736,6 +8855,20 @@ AC_SUBST(MOZ_ENABLE_SZIP)
AC_SUBST(MOZ_SZIP_FLAGS)
if test -n "$COMPILE_ENVIRONMENT"; then
diff --git a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
index 20e19f6bd84..1ebb8e7b9f7 100644
--- a/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
+++ b/www/firefox/patches/patch-browser_app_nsBrowserApp.cpp
@@ -1,33 +1,32 @@
-$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.4 2014/05/30 03:03:36 pho Exp $
+$NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.5 2014/05/30 10:22:05 pho Exp $
-* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
+ the toolkit is not cocoa.
--- browser/app/nsBrowserApp.cpp.orig 2014-05-06 22:55:09.000000000 +0000
+++ browser/app/nsBrowserApp.cpp
-@@ -20,6 +20,8 @@
+@@ -18,8 +18,10 @@
+ #include <unistd.h>
+ #endif
- #ifdef XP_MACOSX
+-#ifdef XP_MACOSX
++#ifdef XP_DARWIN
#include <mach/mach_time.h>
+#endif
+#ifdef MOZ_WIDGET_COCOA
#include "MacQuirks.h"
#endif
-@@ -499,7 +501,7 @@ InitXPCOMGlue(const char *argv0, nsIFile
- lastSlash += sizeof(XPCOM_PATH) - sizeof(XPCOM_DLL);
+@@ -447,7 +449,7 @@ TimeStamp_Now()
+ }
- if (!FileExists(exePath)) {
--#if defined(LIBXUL_SDK) && defined(XP_MACOSX)
-+#if defined(LIBXUL_SDK) && defined(MOZ_WIDGET_COCOA)
- // Check for <bundle>/Contents/Frameworks/XUL.framework/libxpcom.dylib
- bool greFound = false;
- CFBundleRef appBundle = CFBundleGetMainBundle();
-@@ -582,10 +584,11 @@ int main(int argc, char* argv[])
- #endif
- uint64_t start = TimeStamp_Now();
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
+ return sGetTickCount64() * freq.QuadPart;
+-#elif defined(XP_MACOSX)
++#elif defined(XP_DARWIN)
+ return mach_absolute_time();
+ #elif defined(HAVE_CLOCK_MONOTONIC)
+ struct timespec ts;
+@@ -586,6 +588,7 @@ int main(int argc, char* argv[])
TriggerQuirks();
#endif
@@ -35,12 +34,3 @@ $NetBSD: patch-browser_app_nsBrowserApp.cpp,v 1.4 2014/05/30 03:03:36 pho Exp $
int gotCounters;
#if defined(XP_UNIX)
struct rusage initialRUsage;
-@@ -644,7 +647,7 @@ int main(int argc, char* argv[])
-
- NS_LogTerm();
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // Allow writes again. While we would like to catch writes from static
- // destructors to allow early exits to use _exit, we know that there is
- // at least one such write that we don't control (see bug 826029). For
diff --git a/www/firefox/patches/patch-browser_components_build_nsModule.cpp b/www/firefox/patches/patch-browser_components_build_nsModule.cpp
deleted file mode 100644
index 8ae454de044..00000000000
--- a/www/firefox/patches/patch-browser_components_build_nsModule.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-browser_components_build_nsModule.cpp,v 1.1 2014/05/29 17:03:58 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- browser/components/build/nsModule.cpp.orig 2014-05-06 22:55:10.000000000 +0000
-+++ browser/components/build/nsModule.cpp
-@@ -10,7 +10,7 @@
-
- #if defined(XP_WIN)
- #include "nsWindowsShellService.h"
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- #include "nsMacShellService.h"
- #elif defined(MOZ_WIDGET_GTK)
- #include "nsGNOMEShellService.h"
-@@ -34,7 +34,7 @@ using namespace mozilla::browser;
- NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
- #if defined(XP_WIN)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
- #elif defined(MOZ_WIDGET_GTK)
- NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
-@@ -56,7 +56,7 @@ NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
- NS_DEFINE_NAMED_CID(NS_BROWSER_ABOUT_REDIRECTOR_CID);
- #if defined(XP_WIN)
- NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUMERATOR_CID);
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
- #endif
-
-@@ -71,7 +71,7 @@ static const mozilla::Module::CIDEntry k
- { &kNS_BROWSER_ABOUT_REDIRECTOR_CID, false, nullptr, AboutRedirector::Create },
- #if defined(XP_WIN)
- { &kNS_WINIEHISTORYENUMERATOR_CID, false, nullptr, nsIEHistoryEnumeratorConstructor },
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- { &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
- #endif
- { nullptr }
-@@ -114,7 +114,7 @@ static const mozilla::Module::ContractID
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "customizing", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- #if defined(XP_WIN)
- { NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- { NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
- #endif
- { nullptr }
diff --git a/www/firefox/patches/patch-content_base_src_nsObjectLoadingContent.cpp b/www/firefox/patches/patch-content_base_src_nsObjectLoadingContent.cpp
deleted file mode 100644
index 095f1fbb43b..00000000000
--- a/www/firefox/patches/patch-content_base_src_nsObjectLoadingContent.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$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
-
diff --git a/www/firefox/patches/patch-content_canvas_src_WebGLContext.h b/www/firefox/patches/patch-content_canvas_src_WebGLContext.h
deleted file mode 100644
index bc4aceceb8f..00000000000
--- a/www/firefox/patches/patch-content_canvas_src_WebGLContext.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-content_canvas_src_WebGLContext.h,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- content/canvas/src/WebGLContext.h.orig 2014-05-06 22:55:17.000000000 +0000
-+++ content/canvas/src/WebGLContext.h
-@@ -30,7 +30,7 @@
- #include "mozilla/Scoped.h"
- #include "mozilla/gfx/2D.h"
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "ForceDiscreteGPUHelperCGL.h"
- #endif
-
-@@ -1173,7 +1173,7 @@ protected:
-
- void ReattachTextureToAnyFramebufferToWorkAroundBugs(WebGLTexture *tex, GLint level);
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // see bug 713305. This RAII helper guarantees that we're on the discrete GPU, during its lifetime
- // Debouncing note: we don't want to switch GPUs too frequently, so try to not create and destroy
- // these objects at high frequency. Having WebGLContext's hold one such object seems fine,
diff --git a/www/firefox/patches/patch-content_svg_content_src_SVGComponentTransferFunctionElement.h b/www/firefox/patches/patch-content_svg_content_src_SVGComponentTransferFunctionElement.h
deleted file mode 100644
index 658c1953c4d..00000000000
--- a/www/firefox/patches/patch-content_svg_content_src_SVGComponentTransferFunctionElement.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-content_svg_content_src_SVGComponentTransferFunctionElement.h,v 1.1 2014/05/27 09:58:51 joerg Exp $
-
---- content/svg/content/src/SVGComponentTransferFunctionElement.h.orig 2014-05-06 22:55:20.000000000 +0000
-+++ content/svg/content/src/SVGComponentTransferFunctionElement.h
-@@ -77,6 +77,8 @@ protected:
- static EnumInfo sEnumInfo[1];
- };
-
-+NS_DEFINE_STATIC_IID_ACCESSOR(SVGComponentTransferFunctionElement, NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
-+
- } // namespace dom
- } // namespace mozilla
-
diff --git a/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.cpp b/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.cpp
deleted file mode 100644
index 02a2134b27f..00000000000
--- a/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-content_svg_content_src_nsSVGFilters.cpp,v 1.1 2014/05/27 09:58:51 joerg Exp $
-
---- content/svg/content/src/nsSVGFilters.cpp.orig 2014-05-06 22:55:20.000000000 +0000
-+++ content/svg/content/src/nsSVGFilters.cpp
-@@ -67,7 +67,7 @@ nsSVGElement::LengthInfo nsSVGFE::sLengt
- NS_IMPL_ADDREF_INHERITED(nsSVGFE,nsSVGFEBase)
- NS_IMPL_RELEASE_INHERITED(nsSVGFE,nsSVGFEBase)
-
--NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
-+//NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
-
- NS_INTERFACE_MAP_BEGIN(nsSVGFE)
- // nsISupports is an ambiguous base of nsSVGFE so we have to work
-@@ -248,8 +248,6 @@ nsSVGElement::EnumInfo SVGComponentTrans
- NS_IMPL_ADDREF_INHERITED(SVGComponentTransferFunctionElement,SVGComponentTransferFunctionElementBase)
- NS_IMPL_RELEASE_INHERITED(SVGComponentTransferFunctionElement,SVGComponentTransferFunctionElementBase)
-
--NS_DEFINE_STATIC_IID_ACCESSOR(SVGComponentTransferFunctionElement, NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
--
- NS_INTERFACE_MAP_BEGIN(SVGComponentTransferFunctionElement)
- // nsISupports is an ambiguous base of nsSVGFE so we have to work
- // around that
diff --git a/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.h b/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.h
deleted file mode 100644
index 33f6095bd73..00000000000
--- a/www/firefox/patches/patch-content_svg_content_src_nsSVGFilters.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-content_svg_content_src_nsSVGFilters.h,v 1.1 2014/05/27 09:58:51 joerg Exp $
-
---- content/svg/content/src/nsSVGFilters.h.orig 2014-05-06 22:55:20.000000000 +0000
-+++ content/svg/content/src/nsSVGFilters.h
-@@ -147,6 +147,8 @@ protected:
- static LengthInfo sLengthInfo[4];
- };
-
-+NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
-+
- typedef nsSVGElement SVGFEUnstyledElementBase;
-
- class SVGFEUnstyledElement : public SVGFEUnstyledElementBase
diff --git a/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp b/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp
deleted file mode 100644
index c6092ebcbd1..00000000000
--- a/www/firefox/patches/patch-dom_events_nsEventStateManager.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-dom_events_nsEventStateManager.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- dom/events/nsEventStateManager.cpp.orig 2014-05-06 22:55:23.000000000 +0000
-+++ dom/events/nsEventStateManager.cpp
-@@ -85,7 +85,7 @@
- #include "GeckoProfiler.h"
- #include "Units.h"
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #import <ApplicationServices/ApplicationServices.h>
- #endif
-
-@@ -1865,7 +1865,7 @@ nsEventStateManager::FireContextClick()
- return;
- }
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // Hack to ensure that we don't show a context menu when the user
- // let go of the mouse after a long cpu-hogging operation prevented
- // us from handling any OS events. See bug 117589.
-@@ -3137,7 +3137,7 @@ nsEventStateManager::DecideGestureEvent(
- aEvent->panDirection = panDirection;
- }
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- static bool
- NodeAllowsClickThrough(nsINode* aNode)
- {
-@@ -3314,7 +3314,7 @@ nsEventStateManager::PostHandleEvent(nsP
- // focused frame
- EnsureDocument(mPresContext);
- if (mDocument) {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- if (!activeContent || !activeContent->IsXUL())
- #endif
- fm->ClearFocus(mDocument->GetWindow());
-@@ -3689,7 +3689,7 @@ nsEventStateManager::PostHandleEvent(nsP
- }
- break;
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case NS_MOUSE_ACTIVATE:
- if (mCurrentTarget) {
- nsCOMPtr<nsIContent> targetContent;
diff --git a/www/firefox/patches/patch-dom_indexedDB_IDBEvents.cpp b/www/firefox/patches/patch-dom_indexedDB_IDBEvents.cpp
deleted file mode 100644
index 64b4eb5672f..00000000000
--- a/www/firefox/patches/patch-dom_indexedDB_IDBEvents.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-dom_indexedDB_IDBEvents.cpp,v 1.1 2014/05/27 09:58:51 joerg Exp $
-
---- dom/indexedDB/IDBEvents.cpp.orig 2014-05-23 13:27:09.000000000 +0000
-+++ dom/indexedDB/IDBEvents.cpp
-@@ -15,8 +15,6 @@
- USING_INDEXEDDB_NAMESPACE
- using namespace mozilla::dom;
-
--NS_DEFINE_STATIC_IID_ACCESSOR(IDBVersionChangeEvent, IDBVERSIONCHANGEEVENT_IID)
--
- namespace {
-
- class EventFiringRunnable : public nsRunnable
diff --git a/www/firefox/patches/patch-dom_indexedDB_IDBEvents.h b/www/firefox/patches/patch-dom_indexedDB_IDBEvents.h
deleted file mode 100644
index 1a8d8e75683..00000000000
--- a/www/firefox/patches/patch-dom_indexedDB_IDBEvents.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-dom_indexedDB_IDBEvents.h,v 1.1 2014/05/27 09:58:51 joerg Exp $
-
---- dom/indexedDB/IDBEvents.h.orig 2014-05-23 13:27:11.000000000 +0000
-+++ dom/indexedDB/IDBEvents.h
-@@ -158,6 +158,8 @@ protected:
- uint64_t mNewVersion;
- };
-
-+NS_DEFINE_STATIC_IID_ACCESSOR(IDBVersionChangeEvent, IDBVERSIONCHANGEEVENT_IID)
-+
- END_INDEXEDDB_NAMESPACE
-
- #endif // mozilla_dom_indexeddb_idbevents_h__
diff --git a/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.cpp b/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.cpp
deleted file mode 100644
index 96acbc52171..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$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)
- {
diff --git a/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h b/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h
deleted file mode 100644
index 2fb30f8de61..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_PluginPRLibrary.h
+++ /dev/null
@@ -1,90 +0,0 @@
-$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;
diff --git a/www/firefox/patches/patch-dom_plugins_base_npapi.h b/www/firefox/patches/patch-dom_plugins_base_npapi.h
deleted file mode 100644
index a083a4f4082..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_npapi.h
+++ /dev/null
@@ -1,132 +0,0 @@
-$NetBSD: patch-dom_plugins_base_npapi.h,v 1.1 2014/05/28 10:08:18 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- dom/plugins/base/npapi.h.orig 2014-05-06 22:55:25.000000000 +0000
-+++ dom/plugins/base/npapi.h
-@@ -43,7 +43,7 @@
- #define NP_NO_CARBON
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #include <ApplicationServices/ApplicationServices.h>
- #include <OpenGL/OpenGL.h>
- #ifndef NP_NO_CARBON
-@@ -128,7 +128,7 @@ typedef char* NPMIMEType;
- /*----------------------------------------------------------------------*/
-
- #if !defined(__LP64__)
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #pragma options align=mac68k
- #endif
- #endif /* __LP64__ */
-@@ -269,7 +269,7 @@ typedef struct
- #endif /* XP_UNIX */
-
- typedef enum {
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #ifndef NP_NO_QUICKDRAW
- NPDrawingModelQuickDraw = 0,
- #endif
-@@ -290,7 +290,7 @@ typedef enum {
- #endif
- } NPDrawingModel;
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- typedef enum {
- #ifndef NP_NO_CARBON
- NPEventModelCarbon = 0,
-@@ -379,7 +379,7 @@ typedef enum {
-
- /* Used for negotiating drawing models */
- NPPVpluginDrawingModel = 1000
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- /* Used for negotiating event models */
- , NPPVpluginEventModel = 1001
- /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */
-@@ -420,7 +420,7 @@ typedef enum {
- NPNVdocumentOrigin = 22,
-
- NPNVpluginDrawingModel = 1000 /* Get the current drawing model (NPDrawingModel) */
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- , NPNVcontentsScaleFactor = 1001
- #ifndef NP_NO_QUICKDRAW
- , NPNVsupportsQuickDrawBool = 2000
-@@ -434,7 +434,7 @@ typedef enum {
- #if defined(XP_WIN)
- , NPNVsupportsAsyncWindowsDXGISurfaceBool = 2008
- #endif
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #ifndef NP_NO_CARBON
- , NPNVsupportsCarbonBool = 3000 /* TRUE if the browser supports the Carbon event model */
- #endif
-@@ -478,7 +478,7 @@ typedef struct _NPWindow
- uint32_t width; /* Maximum window size */
- uint32_t height;
- NPRect clipRect; /* Clipping rectangle in port coordinates */
--#if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(XP_MACOSX)
-+#if (defined(XP_UNIX) || defined(XP_SYMBIAN)) && !defined(MOZ_WIDGET_COCOA)
- void * ws_info; /* Platform-dependent additional data */
- #endif /* XP_UNIX */
- NPWindowType type; /* Is this a window or a drawable? */
-@@ -524,7 +524,7 @@ typedef struct _NPPrint
- } print;
- } NPPrint;
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #ifndef NP_NO_CARBON
- typedef EventRecord NPEvent;
- #endif
-@@ -550,7 +550,7 @@ typedef XEvent NPEvent;
- typedef void* NPEvent;
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- typedef void* NPRegion;
- #ifndef NP_NO_QUICKDRAW
- typedef RgnHandle NPQDRegion;
-@@ -570,7 +570,7 @@ typedef struct _NPNSString NPNSString;
- typedef struct _NPNSWindow NPNSWindow;
- typedef struct _NPNSMenu NPNSMenu;
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- typedef NPNSMenu NPMenu;
- #else
- typedef void *NPMenu;
-@@ -584,7 +584,7 @@ typedef enum {
- NPCoordinateSpaceFlippedScreen
- } NPCoordinateSpace;
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
-
- #ifndef NP_NO_QUICKDRAW
- typedef struct NP_Port
-@@ -688,7 +688,7 @@ enum NPEventType {
- };
- #endif /* NP_NO_CARBON */
-
--#endif /* XP_MACOSX */
-+#endif /* MOZ_WIDGET_COCOA */
-
- /*
- * Values for mode passed to NPP_New:
-@@ -713,7 +713,7 @@ enum NPEventType {
- #define NP_CLEAR_CACHE (1 << 0)
-
- #if !defined(__LP64__)
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #pragma options align=reset
- #endif
- #endif /* __LP64__ */
diff --git a/www/firefox/patches/patch-dom_plugins_base_npfunctions.h b/www/firefox/patches/patch-dom_plugins_base_npfunctions.h
deleted file mode 100644
index 568fc25c53c..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_npfunctions.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-dom_plugins_base_npfunctions.h,v 1.1 2014/05/28 10:08:18 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- dom/plugins/base/npfunctions.h.orig 2014-05-06 22:55:25.000000000 +0000
-+++ dom/plugins/base/npfunctions.h
-@@ -191,7 +191,7 @@ typedef struct _NPNetscapeFuncs {
- NPN_SetCurrentAsyncSurfacePtr setcurrentasyncsurface;
- } NPNetscapeFuncs;
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- /*
- * Mac OS X version(s) of NP_GetMIMEDescription(const char *)
- * These can be called to retreive MIME information from the plugin dynamically
-@@ -281,7 +281,7 @@ typedef char* (*NP_GetPluginVer
- NP_EXPORT(char*) NP_GetPluginVersion(void);
- typedef const char* (*NP_GetMIMEDescriptionFunc)(void);
- NP_EXPORT(const char*) NP_GetMIMEDescription(void);
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- typedef NPError (*NP_InitializeFunc)(NPNetscapeFuncs*);
- NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs);
- typedef NPError (*NP_GetEntryPointsFunc)(NPPluginFuncs*);
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp b/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp
deleted file mode 100644
index 7bcc68e08e1..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPlugin.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-$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));
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.cpp b/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.cpp
deleted file mode 100644
index dd001d8de7d..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$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;
-
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.h b/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.h
deleted file mode 100644
index 01e2d81b892..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsNPAPIPluginInstance.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$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
-
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp b/www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp
deleted file mode 100644
index 1203c9bbf5e..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsPluginHost.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$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");
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.cpp b/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.cpp
deleted file mode 100644
index 1efd6c54aab..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-$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(&currentLevel);
--#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())/
diff --git a/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.h b/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.h
deleted file mode 100644
index 9e9e6dcea85..00000000000
--- a/www/firefox/patches/patch-dom_plugins_base_nsPluginInstanceOwner.h
+++ /dev/null
@@ -1,83 +0,0 @@
-$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).
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.cpp
deleted file mode 100644
index 57d655a2aab..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-$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
-
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.h b/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.h
deleted file mode 100644
index f6c734fb245..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceChild.h
+++ /dev/null
@@ -1,51 +0,0 @@
-$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;
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceParent.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceParent.cpp
deleted file mode 100644
index a94b6e3e17e..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginInstanceParent.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-$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) {
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h b/www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h
deleted file mode 100644
index 784ae0ce6ce..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginLibrary.h
+++ /dev/null
@@ -1,33 +0,0 @@
-$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
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.cpp
deleted file mode 100644
index a823cc08e87..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-$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
- {
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.h b/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.h
deleted file mode 100644
index 775c607f0de..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginMessageUtils.h
+++ /dev/null
@@ -1,138 +0,0 @@
-$NetBSD: patch-dom_plugins_ipc_PluginMessageUtils.h,v 1.1 2014/05/28 10:08:18 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- dom/plugins/ipc/PluginMessageUtils.h.orig 2014-05-06 22:55:25.000000000 +0000
-+++ dom/plugins/ipc/PluginMessageUtils.h
-@@ -25,7 +25,7 @@
- #ifdef MOZ_CRASHREPORTER
- # include "nsExceptionHandler.h"
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "PluginInterposeOSX.h"
- #else
- namespace mac_plugin_interposing { class NSCursorInfo { }; }
-@@ -99,14 +99,14 @@ struct NPRemoteWindow
- uint32_t height;
- NPRect clipRect;
- NPWindowType type;
--#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(MOZ_X11) && defined(XP_UNIX)
- VisualID visualID;
- Colormap colormap;
- #endif /* XP_UNIX */
- #if defined(XP_WIN)
- base::SharedMemoryHandle surfaceHandle;
- #endif
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- double contentsScaleFactor;
- #endif
- };
-@@ -115,7 +115,7 @@ struct NPRemoteWindow
- typedef HWND NativeWindowHandle;
- #elif defined(MOZ_X11)
- typedef XID NativeWindowHandle;
--#elif defined(XP_MACOSX) || defined(ANDROID) || defined(MOZ_WIDGET_QT)
-+#elif defined(MOZ_WIDGET_COCOA) || defined(ANDROID) || defined(MOZ_WIDGET_QT)
- typedef intptr_t NativeWindowHandle; // never actually used, will always be 0
- #else
- #error Need NativeWindowHandle for this platform
-@@ -160,7 +160,7 @@ NPPVariableToString(NPPVariable aVar)
-
- VARSTR(NPPVpluginWantsAllNetworkStreams);
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- VARSTR(NPPVpluginDrawingModel);
- VARSTR(NPPVpluginEventModel);
- #endif
-@@ -377,14 +377,14 @@ struct ParamTraits<mozilla::plugins::NPR
- WriteParam(aMsg, aParam.height);
- WriteParam(aMsg, aParam.clipRect);
- WriteParam(aMsg, aParam.type);
--#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(MOZ_X11) && defined(XP_UNIX)
- aMsg->WriteULong(aParam.visualID);
- aMsg->WriteULong(aParam.colormap);
- #endif
- #if defined(XP_WIN)
- WriteParam(aMsg, aParam.surfaceHandle);
- #endif
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- aMsg->WriteDouble(aParam.contentsScaleFactor);
- #endif
- }
-@@ -405,7 +405,7 @@ struct ParamTraits<mozilla::plugins::NPR
- ReadParam(aMsg, aIter, &type)))
- return false;
-
--#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(MOZ_X11) && defined(XP_UNIX)
- unsigned long visualID;
- unsigned long colormap;
- if (!(aMsg->ReadULong(aIter, &visualID) &&
-@@ -419,7 +419,7 @@ struct ParamTraits<mozilla::plugins::NPR
- return false;
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- double contentsScaleFactor;
- if (!aMsg->ReadDouble(aIter, &contentsScaleFactor))
- return false;
-@@ -432,14 +432,14 @@ struct ParamTraits<mozilla::plugins::NPR
- aResult->height = height;
- aResult->clipRect = clipRect;
- aResult->type = type;
--#if defined(MOZ_X11) && defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(MOZ_X11) && defined(XP_UNIX)
- aResult->visualID = visualID;
- aResult->colormap = colormap;
- #endif
- #if defined(XP_WIN)
- aResult->surfaceHandle = surfaceHandle;
- #endif
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- aResult->contentsScaleFactor = contentsScaleFactor;
- #endif
- return true;
-@@ -492,7 +492,7 @@ struct ParamTraits<NPString>
- }
- };
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- template <>
- struct ParamTraits<NPNSString*>
- {
-@@ -563,7 +563,7 @@ struct ParamTraits<NPNSString*>
- };
- #endif
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- template <>
- struct ParamTraits<NSCursorInfo>
- {
-@@ -655,7 +655,7 @@ struct ParamTraits<NSCursorInfo>
- return false;
- }
- };
--#endif // #ifdef XP_MACOSX
-+#endif // #ifdef MOZ_WIDGET_COCOA
-
- template <>
- struct ParamTraits<NPVariant>
-@@ -900,7 +900,7 @@ struct ParamTraits<NPCoordinateSpace>
- //
- // NB: these guards are based on those where struct NPEvent is defined
- // in npapi.h. They should be kept in sync.
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- # include "mozilla/plugins/NPEventOSX.h"
- #elif defined(XP_WIN)
- # include "mozilla/plugins/NPEventWindows.h"
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleChild.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleChild.cpp
index 0c32402117a..5dc657357f1 100644
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleChild.cpp
+++ b/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleChild.cpp
@@ -1,19 +1,8 @@
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2014/05/29 15:38:19 pho Exp $
+$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.5 2014/05/30 10:22:05 pho Exp $
-* 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.orig 2013-05-11 19:19:27.000000000 +0000
+++ dom/plugins/ipc/PluginModuleChild.cpp
-@@ -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
+@@ -201,7 +201,7 @@ PluginModuleChild::Init(const std::strin
// TODO: use PluginPRLibrary here
@@ -22,7 +11,7 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2014/05/29 15:38:19 p
mShutdownFunc =
(NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
-@@ -1825,7 +1825,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
+@@ -1836,7 +1836,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
PLUGIN_LOG_DEBUG_METHOD;
AssertPluginThread();
@@ -31,7 +20,7 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2014/05/29 15:38:19 p
return true;
#elif defined(OS_WIN) || defined(OS_MACOSX)
*_retval = mGetEntryPointsFunc(&mFunctions);
-@@ -1854,7 +1854,7 @@ PluginModuleChild::AnswerNP_Initialize(c
+@@ -1865,7 +1865,7 @@ PluginModuleChild::AnswerNP_Initialize(c
SendBackUpXResources(FileDescriptor(xSocketFd));
#endif
@@ -40,21 +29,3 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2014/05/29 15:38:19 p
*_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
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp b/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp
deleted file mode 100644
index 9317d60fbfa..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-$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;
diff --git a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.h b/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.h
deleted file mode 100644
index dd1b591ff7a..00000000000
--- a/www/firefox/patches/patch-dom_plugins_ipc_PluginModuleParent.h
+++ /dev/null
@@ -1,33 +0,0 @@
-$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
diff --git a/www/firefox/patches/patch-dom_system_OSFileConstants.cpp b/www/firefox/patches/patch-dom_system_OSFileConstants.cpp
index 8023a354309..40794f90923 100644
--- a/www/firefox/patches/patch-dom_system_OSFileConstants.cpp
+++ b/www/firefox/patches/patch-dom_system_OSFileConstants.cpp
@@ -1,12 +1,13 @@
-$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.3 2014/05/29 15:38:19 pho Exp $
+$NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.4 2014/05/30 10:22:05 pho Exp $
* NetBSD 5 does not support posix_spawn(3)
-* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
+ the toolkit is not cocoa.
--- dom/system/OSFileConstants.cpp.orig 2014-05-06 22:55:26.000000000 +0000
+++ dom/system/OSFileConstants.cpp
-@@ -9,13 +9,17 @@
+@@ -9,22 +9,26 @@
#include "prsystem.h"
@@ -26,50 +27,17 @@ $NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.3 2014/05/29 15:38:19 pho Exp
#endif // defined(XP_UNIX)
#if defined(XP_LINUX)
-@@ -120,7 +124,7 @@ struct Paths {
- nsString winStartMenuProgsDir;
- #endif // defined(XP_WIN)
+ #include <linux/fadvise.h>
+ #endif // defined(XP_LINUX)
-#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- /**
- * The user's Library directory.
- */
-@@ -130,7 +134,7 @@ struct Paths {
- * system.
- */
- nsString macLocalApplicationsDir;
++#if defined(XP_DARWIN)
+ #include "copyfile.h"
-#endif // defined(XP_MACOSX)
-+#endif // defined(MOZ_WIDGET_COCOA)
++#endif // defined(XP_DARWIN)
- 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;
+ #if defined(XP_WIN)
+ #include <windows.h>
@@ -526,10 +530,10 @@ static const dom::ConstantSpec gLibcProp
// The size of |time_t|.
{ "OSFILE_SIZEOF_TIME_T", INT_TO_JSVAL(sizeof (time_t)) },
@@ -83,39 +51,3 @@ $NetBSD: patch-dom_system_OSFileConstants.cpp,v 1.3 2014/05/29 15:38:19 pho Exp
// 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;
diff --git a/www/firefox/patches/patch-gfx_2d_Factory.cpp b/www/firefox/patches/patch-gfx_2d_Factory.cpp
deleted file mode 100644
index 40eda7b89e8..00000000000
--- a/www/firefox/patches/patch-gfx_2d_Factory.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: patch-gfx_2d_Factory.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/2d/Factory.cpp.orig 2014-05-06 22:55:32.000000000 +0000
-+++ gfx/2d/Factory.cpp
-@@ -23,12 +23,8 @@
- #include "ScaledFontWin.h"
- #endif
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "ScaledFontMac.h"
--#endif
--
--
--#ifdef XP_MACOSX
- #include "DrawTargetCG.h"
- #endif
-
-@@ -258,7 +254,7 @@ Factory::CreateDrawTarget(BackendType aB
- break;
- }
- #endif
--#elif defined XP_MACOSX
-+#elif defined MOZ_WIDGET_COCOA
- case BackendType::COREGRAPHICS:
- case BackendType::COREGRAPHICS_ACCELERATED:
- {
-@@ -340,7 +336,7 @@ Factory::CreateDrawTargetForData(Backend
- retVal = newTarget;
- }
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case BackendType::COREGRAPHICS:
- {
- RefPtr<DrawTargetCG> newTarget = new DrawTargetCG();
-@@ -393,7 +389,7 @@ Factory::CreateScaledFontForNativeFont(c
- }
- #endif
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case NativeFontType::MAC_FONT_FACE:
- {
- return new ScaledFontMac(static_cast<CGFontRef>(aNativeFont.mFont), aSize);
-@@ -656,7 +652,7 @@ Factory::CreateSourceSurfaceForCairoSurf
- return retVal;
- }
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- TemporaryRef<DrawTarget>
- Factory::CreateDrawTargetForCairoCGContext(CGContextRef cg, const IntSize& aSize)
- {
diff --git a/www/firefox/patches/patch-gfx_gl_GLContext.cpp b/www/firefox/patches/patch-gfx_gl_GLContext.cpp
deleted file mode 100644
index 547bf87c0f0..00000000000
--- a/www/firefox/patches/patch-gfx_gl_GLContext.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD: patch-gfx_gl_GLContext.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/gl/GLContext.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/gl/GLContext.cpp
-@@ -34,12 +34,9 @@
- #include "mozilla/DebugOnly.h"
- #include "mozilla/Preferences.h"
-
--#ifdef XP_MACOSX
-+#if defined(MOZ_WIDGET_COCOA)
- #include <CoreServices/CoreServices.h>
- #include "gfxColor.h"
--#endif
--
--#if defined(MOZ_WIDGET_COCOA)
- #include "nsCocoaFeatures.h"
- #endif
-
-@@ -610,7 +607,7 @@ GLContext::InitWithPrefix(const char *pr
- MarkUnsupported(GLFeature::standard_derivatives);
- }
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // The Mac Nvidia driver, for versions up to and including 10.8, don't seem
- // to properly support this. See 814839
- // this has been fixed in Mac OS X 10.9. See 907946
-@@ -1050,7 +1047,7 @@ GLContext::InitWithPrefix(const char *pr
- raw_fGetIntegerv(LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE, &mMaxCubeMapTextureSize);
- raw_fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize);
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- if (mWorkAroundDriverBugs) {
- if (mVendor == GLVendor::Intel) {
- // see bug 737182 for 2D textures, bug 684882 for cube map textures.
diff --git a/www/firefox/patches/patch-gfx_gl_GLContextFeatures.cpp b/www/firefox/patches/patch-gfx_gl_GLContextFeatures.cpp
deleted file mode 100644
index 9de762955b0..00000000000
--- a/www/firefox/patches/patch-gfx_gl_GLContextFeatures.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_gl_GLContextFeatures.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/gl/GLContextFeatures.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/gl/GLContextFeatures.cpp
-@@ -7,7 +7,7 @@
- #include "GLContext.h"
- #include "nsPrintfCString.h"
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "nsCocoaFeatures.h"
- #endif
-
-@@ -394,7 +394,7 @@ CanReadSRGBFromFBOTexture(GLContext* gl)
- if (!gl->WorkAroundDriverBugs())
- return true;
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // Bug 843668:
- // MacOSX 10.6 reports to support EXT_framebuffer_sRGB and
- // EXT_texture_sRGB but fails to convert from sRGB to linear
diff --git a/www/firefox/patches/patch-gfx_gl_GLContextProvider.h b/www/firefox/patches/patch-gfx_gl_GLContextProvider.h
deleted file mode 100644
index 7f51add4189..00000000000
--- a/www/firefox/patches/patch-gfx_gl_GLContextProvider.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-gfx_gl_GLContextProvider.h,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/gl/GLContextProvider.h.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/gl/GLContextProvider.h
-@@ -33,7 +33,7 @@ namespace gl {
- #define DEFAULT_IMPL WGL
- #endif
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #define GL_CONTEXT_PROVIDER_NAME GLContextProviderCGL
- #include "GLContextProviderImpl.h"
- #undef GL_CONTEXT_PROVIDER_NAME
diff --git a/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp b/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp
deleted file mode 100644
index 0eebe65e98a..00000000000
--- a/www/firefox/patches/patch-gfx_gl_GLScreenBuffer.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_gl_GLScreenBuffer.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/gl/GLScreenBuffer.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/gl/GLScreenBuffer.cpp
-@@ -16,7 +16,7 @@
- #include "SharedSurfaceGralloc.h"
- #include "nsXULAppAPI.h"
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "SharedSurfaceIO.h"
- #endif
- #include "ScopedGLHelpers.h"
-@@ -47,7 +47,7 @@ GLScreenBuffer::Create(GLContext* gl,
- factory = new SurfaceFactory_Gralloc(gl, caps);
- }
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- /* On OSX, we want an IOSurface factory, and we want one right at the start */
- if (!factory)
- {
diff --git a/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp b/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp
deleted file mode 100644
index b8e5fe93672..00000000000
--- a/www/firefox/patches/patch-gfx_gl_GLTextureImage.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-gfx_gl_GLTextureImage.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/gl/GLTextureImage.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/gl/GLTextureImage.cpp
-@@ -13,7 +13,7 @@
- #include "GLUploadHelpers.h"
-
- #include "TextureImageEGL.h"
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "TextureImageCGL.h"
- #endif
-
-@@ -29,7 +29,7 @@ CreateTextureImage(GLContext* gl,
- TextureImage::ImageFormat aImageFormat)
- {
- switch (gl->GetContextType()) {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case GLContextType::CGL:
- return CreateTextureImageCGL(gl, aSize, aContentType, aWrapMode, aFlags, aImageFormat);
- #endif
-@@ -49,7 +49,7 @@ TileGenFunc(GLContext* gl,
- TextureImage::ImageFormat aImageFormat)
- {
- switch (gl->GetContextType()) {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case GLContextType::CGL:
- return TileGenFuncCGL(gl, aSize, aContentType, aFlags, aImageFormat);
- #endif
diff --git a/www/firefox/patches/patch-gfx_layers_ImageContainer.cpp b/www/firefox/patches/patch-gfx_layers_ImageContainer.cpp
deleted file mode 100644
index d3340c3bba6..00000000000
--- a/www/firefox/patches/patch-gfx_layers_ImageContainer.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_layers_ImageContainer.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/ImageContainer.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/layers/ImageContainer.cpp
-@@ -23,7 +23,7 @@
- #endif
- #include "gfx2DGlue.h"
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "mozilla/gfx/QuartzSupport.h"
- #include "MacIOSurfaceImage.h"
- #endif
-@@ -81,7 +81,7 @@ ImageFactory::CreateImage(ImageFormat aF
- img = new SharedTextureImage();
- return img.forget();
- }
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- if (aFormat == ImageFormat::MAC_IOSURFACE) {
- img = new MacIOSurfaceImage();
- return img.forget();
diff --git a/www/firefox/patches/patch-gfx_layers_basic_BasicImages.cpp b/www/firefox/patches/patch-gfx_layers_basic_BasicImages.cpp
deleted file mode 100644
index 9ad3c054745..00000000000
--- a/www/firefox/patches/patch-gfx_layers_basic_BasicImages.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_layers_basic_BasicImages.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/basic/BasicImages.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/layers/basic/BasicImages.cpp
-@@ -22,7 +22,7 @@
- #include "mozilla/gfx/Point.h" // for IntSize
- #include "gfx2DGlue.h"
- #include "YCbCrUtils.h" // for YCbCr conversions
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "gfxQuartzImageSurface.h"
- #endif
-
-@@ -154,7 +154,7 @@ BasicPlanarYCbCrImage::DeprecatedGetAsSu
- imgSurface->SetData(&imageSurfaceDataKey, mDecodedBuffer.forget(), DestroyBuffer);
-
- nsRefPtr<gfxASurface> result = imgSurface.get();
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- nsRefPtr<gfxQuartzImageSurface> quartzSurface =
- new gfxQuartzImageSurface(imgSurface);
- if (quartzSurface) {
diff --git a/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp b/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp
deleted file mode 100644
index 9ca103ed6b2..00000000000
--- a/www/firefox/patches/patch-gfx_layers_basic_TextureHostBasic.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-gfx_layers_basic_TextureHostBasic.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/basic/TextureHostBasic.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/layers/basic/TextureHostBasic.cpp
-@@ -17,7 +17,7 @@ CreateTextureHostBasic(const SurfaceDesc
- ISurfaceAllocator* aDeallocator,
- TextureFlags aFlags)
- {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- if (aDesc.type() == SurfaceDescriptor::TSurfaceDescriptorMacIOSurface) {
- const SurfaceDescriptorMacIOSurface& desc =
- aDesc.get_SurfaceDescriptorMacIOSurface();
diff --git a/www/firefox/patches/patch-gfx_layers_client_ClientCanvasLayer.cpp b/www/firefox/patches/patch-gfx_layers_client_ClientCanvasLayer.cpp
deleted file mode 100644
index 0f2a3081cdb..00000000000
--- a/www/firefox/patches/patch-gfx_layers_client_ClientCanvasLayer.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_layers_client_ClientCanvasLayer.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/client/ClientCanvasLayer.cpp.orig 2014-05-06 22:55:33.000000000 +0000
-+++ gfx/layers/client/ClientCanvasLayer.cpp
-@@ -22,7 +22,7 @@
- #ifdef MOZ_WIDGET_GONK
- #include "SharedSurfaceGralloc.h"
- #endif
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "SharedSurfaceIO.h"
- #endif
-
-@@ -65,7 +65,7 @@ ClientCanvasLayer::Initialize(const Data
- } else {
- // [Basic Layers, OMTC] WebGL layer init.
- // Well, this *should* work...
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- factory = new SurfaceFactory_IOSurface(mGLContext, screen->Caps());
- #else
- factory = new SurfaceFactory_GLTexture(mGLContext, nullptr, screen->Caps());
diff --git a/www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp b/www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp
deleted file mode 100644
index f825d156f12..00000000000
--- a/www/firefox/patches/patch-gfx_layers_composite_LayerManagerComposite.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-gfx_layers_composite_LayerManagerComposite.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/composite/LayerManagerComposite.cpp.orig 2014-05-06 22:55:34.000000000 +0000
-+++ gfx/layers/composite/LayerManagerComposite.cpp
-@@ -21,7 +21,7 @@
- #include "gfx2DGlue.h" // for ToMatrix4x4
- #include "gfx3DMatrix.h" // for gfx3DMatrix
- #include "gfxPlatform.h" // for gfxPlatform
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "gfxPlatformMac.h"
- #endif
- #include "gfxRect.h" // for gfxRect
-@@ -740,7 +740,7 @@ TemporaryRef<DrawTarget>
- LayerManagerComposite::CreateDrawTarget(const IntSize &aSize,
- SurfaceFormat aFormat)
- {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // We don't want to accelerate if the surface is too small which indicates
- // that it's likely used for an icon/static image. We also don't want to
- // accelerate anything that is above the maximum texture size of weakest gpu.
diff --git a/www/firefox/patches/patch-gfx_layers_opengl_TextureHostOGL.cpp b/www/firefox/patches/patch-gfx_layers_opengl_TextureHostOGL.cpp
deleted file mode 100644
index 644584e64c6..00000000000
--- a/www/firefox/patches/patch-gfx_layers_opengl_TextureHostOGL.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-gfx_layers_opengl_TextureHostOGL.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/layers/opengl/TextureHostOGL.cpp.orig 2014-05-06 22:55:34.000000000 +0000
-+++ gfx/layers/opengl/TextureHostOGL.cpp
-@@ -32,7 +32,7 @@
- #include "nsRegion.h" // for nsIntRegion
- #include "GfxTexturesReporter.h" // for GfxTexturesReporter
- #include "GLBlitTextureImageHelper.h"
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "SharedSurfaceIO.h"
- #include "mozilla/layers/MacIOSurfaceTextureHostOGL.h"
- #endif
-@@ -113,7 +113,7 @@ CreateTextureHostOGL(const SurfaceDescri
- result = new StreamTextureHostOGL(aFlags, desc);
- break;
- }
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case SurfaceDescriptor::TSurfaceDescriptorMacIOSurface: {
- const SurfaceDescriptorMacIOSurface& desc =
- aDesc.get_SurfaceDescriptorMacIOSurface();
-@@ -519,7 +519,7 @@ StreamTextureSourceOGL::RetrieveTextureF
- }
- break;
- }
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case SharedSurfaceType::IOSurface: {
- SharedSurface_IOSurface* glTexSurf = SharedSurface_IOSurface::Cast(sharedSurf);
- mTextureHandle = glTexSurf->Texture();
-@@ -991,7 +991,7 @@ SurfaceStreamHostOGL::Lock()
- }
- break;
- }
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case SharedSurfaceType::IOSurface: {
- SharedSurface_IOSurface* glTexSurf = SharedSurface_IOSurface::Cast(sharedSurf);
- mTextureHandle = glTexSurf->Texture();
diff --git a/www/firefox/patches/patch-gfx_src_nsDeviceContext.cpp b/www/firefox/patches/patch-gfx_src_nsDeviceContext.cpp
deleted file mode 100644
index 16e00ab477d..00000000000
--- a/www/firefox/patches/patch-gfx_src_nsDeviceContext.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-$NetBSD: patch-gfx_src_nsDeviceContext.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-* gfxPDFSurface.h must be included whenever MOZ_PDF_PRINTING is
- defined. In fact !defined(MOZ_WIDGET_COCOA) nearly equals to
- defined(MOZ_PDF_PRINTING) but it isn't the same as
- !defined(XP_MACOSX). In short cocoa toolkit is wrongly assumed here
- too.
-
-* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/src/nsDeviceContext.cpp.orig 2014-05-06 22:55:35.000000000 +0000
-+++ gfx/src/nsDeviceContext.cpp
-@@ -35,7 +35,7 @@
- #include "nsThreadUtils.h" // for NS_IsMainThread
- #include "nsTraceRefcnt.h" // for MOZ_COUNT_CTOR, etc
-
--#if !XP_MACOSX
-+#if defined(MOZ_PDF_PRINTING)
- #include "gfxPDFSurface.h"
- #endif
-
-@@ -45,7 +45,7 @@
- #include "gfxWindowsSurface.h"
- #elif defined(XP_OS2)
- #include "gfxOS2Surface.h"
--#elif XP_MACOSX
-+#elif defined(MOZ_WIDGET_COCOA)
- #include "gfxQuartzSurface.h"
- #endif
-
-@@ -392,7 +392,7 @@ nsresult
- nsDeviceContext::CreateRenderingContext(nsRenderingContext *&aContext)
- {
- nsRefPtr<gfxASurface> printingSurface = mPrintingSurface;
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // CreateRenderingContext() can be called (on reflow) after EndPage()
- // but before BeginPage(). On OS X (and only there) mPrintingSurface
- // will in this case be null, because OS X printing surfaces are
-@@ -551,7 +551,7 @@ nsDeviceContext::BeginPage(void)
-
- if (NS_FAILED(rv)) return rv;
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // We need to get a new surface for each page on the Mac, as the
- // CGContextRefs are only good for one page.
- mDeviceContextSpec->GetSurfaceForPrinter(getter_AddRefs(mPrintingSurface));
-@@ -567,7 +567,7 @@ nsDeviceContext::EndPage(void)
- {
- nsresult rv = mPrintingSurface->EndPage();
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // We need to release the CGContextRef in the surface here, plus it's
- // not something you would want anyway, as these CGContextRefs are only
- // good for one page. But we need to keep a cached reference to it, since
-@@ -674,7 +674,7 @@ nsDeviceContext::CalcPrintingSize()
- break;
- #endif
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- case gfxSurfaceType::Quartz:
- inPoints = true; // this is really only true when we're printing
- size = reinterpret_cast<gfxQuartzSurface*>(mPrintingSurface.get())->GetSize();
diff --git a/www/firefox/patches/patch-gfx_thebes_gfxFont.cpp b/www/firefox/patches/patch-gfx_thebes_gfxFont.cpp
deleted file mode 100644
index 8779279b9bd..00000000000
--- a/www/firefox/patches/patch-gfx_thebes_gfxFont.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-gfx_thebes_gfxFont.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/thebes/gfxFont.cpp.orig 2014-05-06 22:55:35.000000000 +0000
-+++ gfx/thebes/gfxFont.cpp
-@@ -40,7 +40,7 @@
- #include "gfxSVGGlyphs.h"
- #include "gfx2DGlue.h"
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #include "nsCocoaFeatures.h"
- #endif
-
-@@ -1297,7 +1297,7 @@ gfxFontFamily::ReadFaceNames(gfxPlatform
-
- bool asyncFontLoaderDisabled = false;
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- // bug 975460 - async font loader crashes sometimes under 10.6, disable
- if (!nsCocoaFeatures::OnLionOrLater()) {
- asyncFontLoaderDisabled = true;
-@@ -4177,7 +4177,7 @@ gfxFontGroup::BuildFontList()
- {
- // "#if" to be removed once all platforms are moved to gfxPlatformFontList interface
- // and subclasses of gfxFontGroup eliminated
--#if defined(XP_MACOSX) || defined(XP_WIN) || defined(ANDROID)
-+#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) || defined(ANDROID)
- ForEachFont(FindPlatformFont, this);
-
- if (mFonts.Length() == 0) {
-@@ -5236,7 +5236,7 @@ gfxFontGroup::UpdateFontList()
- mSkipDrawing = false;
-
- // bug 548184 - need to clean up FT2, OS/2 platform code to use BuildFontList
--#if defined(XP_MACOSX) || defined(XP_WIN) || defined(ANDROID)
-+#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) || defined(ANDROID)
- BuildFontList();
- #else
- ForEachFont(FindPlatformFont, this);
diff --git a/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp b/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp
deleted file mode 100644
index cef9774b9f8..00000000000
--- a/www/firefox/patches/patch-gfx_thebes_gfxPlatform.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-gfx_thebes_gfxPlatform.cpp,v 1.3 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- gfx/thebes/gfxPlatform.cpp.orig 2014-05-06 22:55:35.000000000 +0000
-+++ gfx/thebes/gfxPlatform.cpp
-@@ -30,7 +30,7 @@
- #if defined(XP_WIN)
- #include "gfxWindowsPlatform.h"
- #include "gfxD2DSurface.h"
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- #include "gfxPlatformMac.h"
- #include "gfxQuartzSurface.h"
- #elif defined(MOZ_WIDGET_GTK)
-@@ -398,7 +398,7 @@ gfxPlatform::Init()
-
- #if defined(XP_WIN)
- gPlatform = new gfxWindowsPlatform;
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- gPlatform = new gfxPlatformMac;
- #elif defined(MOZ_WIDGET_GTK)
- gPlatform = new gfxPlatformGtk;
-@@ -432,7 +432,7 @@ gfxPlatform::Init()
-
- nsresult rv;
-
--#if defined(XP_MACOSX) || defined(XP_WIN) || defined(ANDROID) // temporary, until this is implemented on others
-+#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) || defined(ANDROID) // temporary, until this is implemented on others
- rv = gfxPlatformFontList::Init();
- if (NS_FAILED(rv)) {
- NS_RUNTIMEABORT("Could not initialize gfxPlatformFontList");
-@@ -518,7 +518,7 @@ gfxPlatform::Shutdown()
- gfxFontGroup::Shutdown();
- gfxGradientCache::Shutdown();
- gfxGraphiteShaper::Shutdown();
--#if defined(XP_MACOSX) || defined(XP_WIN) // temporary, until this is implemented on others
-+#if defined(MOZ_WIDGET_COCOA) || defined(XP_WIN) // temporary, until this is implemented on others
- gfxPlatformFontList::Shutdown();
- #endif
-
-@@ -664,7 +664,7 @@ gfxPlatform::CreateDrawTargetForSurface(
- RefPtr<DrawTarget>
- gfxPlatform::CreateDrawTargetForUpdateSurface(gfxASurface *aSurface, const IntSize& aSize)
- {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // this is a bit of a hack that assumes that the buffer associated with the CGContext
- // will live around long enough that nothing bad will happen.
- if (aSurface->GetType() == gfxSurfaceType::Quartz) {
diff --git a/www/firefox/patches/patch-image_src_imgFrame.cpp b/www/firefox/patches/patch-image_src_imgFrame.cpp
deleted file mode 100644
index 32a4d092ca0..00000000000
--- a/www/firefox/patches/patch-image_src_imgFrame.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-$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
diff --git a/www/firefox/patches/patch-image_src_imgFrame.h b/www/firefox/patches/patch-image_src_imgFrame.h
deleted file mode 100644
index 03dc89882ef..00000000000
--- a/www/firefox/patches/patch-image_src_imgFrame.h
+++ /dev/null
@@ -1,33 +0,0 @@
-$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
-
diff --git a/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h b/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h
deleted file mode 100644
index e72e1cb1cbb..00000000000
--- a/www/firefox/patches/patch-intl_locale_src_nsLocaleConstructors.h
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-intl_locale_src_nsLocaleConstructors.h,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- intl/locale/src/nsLocaleConstructors.h.orig 2014-05-06 22:55:40.000000000 +0000
-+++ intl/locale/src/nsLocaleConstructors.h
-@@ -16,11 +16,11 @@
- #include "nsPlatformCharset.h"
- #include "nsLocaleCID.h"
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #define USE_MAC_LOCALE
- #endif
-
--#if defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
- #define USE_UNIX_LOCALE
- #endif
-
diff --git a/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp b/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp
deleted file mode 100644
index ddd06b86c71..00000000000
--- a/www/firefox/patches/patch-intl_locale_src_nsLocaleService.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-intl_locale_src_nsLocaleService.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- intl/locale/src/nsLocaleService.cpp.orig 2014-05-06 22:55:40.000000000 +0000
-+++ intl/locale/src/nsLocaleService.cpp
-@@ -26,7 +26,7 @@
- # include "nsServiceManagerUtils.h"
- # include "unidef.h"
- # include "nsIOS2Locale.h"
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- # include <Carbon/Carbon.h>
- #elif defined(XP_UNIX)
- # include <locale.h>
-@@ -50,7 +50,7 @@ const char* LocaleList[LocaleListLength]
- #define NSILOCALE_MAX_ACCEPT_LANGUAGE 16
- #define NSILOCALE_MAX_ACCEPT_LENGTH 18
-
--#if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_OS2)
-+#if (defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)) || defined(XP_OS2)
- static int posix_locale_category[LocaleListLength] =
- {
- LC_COLLATE,
-@@ -122,7 +122,7 @@ nsLocaleService::nsLocaleService(void)
- rv = NewLocale(xpLocale, getter_AddRefs(mApplicationLocale));
- NS_ENSURE_SUCCESS_VOID(rv);
- #endif
--#if defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
- nsRefPtr<nsLocale> resultLocale(new nsLocale());
- NS_ENSURE_TRUE_VOID(resultLocale);
-
-@@ -215,7 +215,7 @@ nsLocaleService::nsLocaleService(void)
- } // if ( NS_SUCCEEDED )...
- #endif // XP_OS2
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // Get string representation of user's current locale
- CFLocaleRef userLocaleRef = ::CFLocaleCopyCurrent();
- CFStringRef userLocaleStr = ::CFLocaleGetIdentifier(userLocaleRef);
-@@ -243,7 +243,7 @@ nsLocaleService::nsLocaleService(void)
- ::CFRelease(userLocaleRef);
-
- NS_ASSERTION(mApplicationLocale, "Failed to create locale objects");
--#endif // XP_MACOSX
-+#endif // MOZ_WIDGET_COCOA
- }
-
- nsLocaleService::~nsLocaleService(void)
-@@ -266,7 +266,7 @@ nsLocaleService::NewLocale(const nsAStri
- NS_ConvertASCIItoUTF16 category(LocaleList[i]);
- result = resultLocale->AddCategory(category, aLocale);
- if (NS_FAILED(result)) return result;
--#if defined(XP_UNIX) && !defined(XP_MACOSX)
-+#if defined(XP_UNIX) && !defined(MOZ_WIDGET_COCOA)
- category.AppendLiteral("##PLATFORM");
- result = resultLocale->AddCategory(category, aLocale);
- if (NS_FAILED(result)) return result;
diff --git a/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp b/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp
deleted file mode 100644
index 8ba4c375f3f..00000000000
--- a/www/firefox/patches/patch-js_xpconnect_shell_xpcshell.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-js_xpconnect_shell_xpcshell.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- js/xpconnect/shell/xpcshell.cpp.orig 2014-05-06 22:55:51.000000000 +0000
-+++ js/xpconnect/shell/xpcshell.cpp
-@@ -12,7 +12,7 @@
- #include "mozilla/WindowsDllBlocklist.h"
-
- #include "nsXULAppAPI.h"
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "xpcshellMacUtils.h"
- #endif
- #ifdef XP_WIN
-@@ -28,7 +28,7 @@
- int
- main(int argc, char** argv, char** envp)
- {
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- InitAutoreleasePool();
- #endif
-
-@@ -42,7 +42,7 @@ main(int argc, char** argv, char** envp)
-
- int result = XRE_XPCShellMain(argc, argv, envp);
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- FinishAutoreleasePool();
- #endif
-
diff --git a/www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp b/www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp
deleted file mode 100644
index 3237a876c5d..00000000000
--- a/www/firefox/patches/patch-layout_generic_nsObjectFrame.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-$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;
diff --git a/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp b/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp
deleted file mode 100644
index fd691bfad1f..00000000000
--- a/www/firefox/patches/patch-netwerk_build_nsNetModule.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-netwerk_build_nsNetModule.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- netwerk/build/nsNetModule.cpp.orig 2014-05-06 22:56:19.000000000 +0000
-+++ netwerk/build/nsNetModule.cpp
-@@ -44,7 +44,7 @@
-
- #include "nsNetCID.h"
-
--#ifndef XP_MACOSX
-+#ifndef MOZ_WIDGET_COCOA
- #define BUILD_BINHEX_DECODER 1
- #endif
-
-@@ -664,7 +664,7 @@ static void nsNetShutdown()
-
- // Release global state used by the URL helper module.
- net_ShutdownURLHelper();
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- net_ShutdownURLHelperOSX();
- #endif
-
diff --git a/www/firefox/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp b/www/firefox/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp
deleted file mode 100644
index 9c38e8926af..00000000000
--- a/www/firefox/patches/patch-netwerk_protocol_http_nsHttpHandler.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-netwerk_protocol_http_nsHttpHandler.cpp,v 1.1 2014/05/28 10:08:18 pho Exp $
-
-nsCocoaFeatures is only available when the toolkit is cocoa.
-
---- netwerk/protocol/http/nsHttpHandler.cpp.orig 2014-05-06 22:56:20.000000000 +0000
-+++ netwerk/protocol/http/nsHttpHandler.cpp
-@@ -57,7 +57,7 @@
- #include <windows.h>
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #include <CoreServices/CoreServices.h>
- #include "nsCocoaFeatures.h"
- #endif
-@@ -671,7 +671,7 @@ nsHttpHandler::InitUserAgentComponents()
- "OS/2"
- #elif defined(XP_WIN)
- "Windows"
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- "Macintosh"
- #elif defined(MOZ_X11)
- "X11"
-@@ -734,7 +734,7 @@ nsHttpHandler::InitUserAgentComponents()
- PR_smprintf_free(buf);
- }
- }
--#elif defined (XP_MACOSX)
-+#elif defined (MOZ_WIDGET_COCOA)
- #if defined(__ppc__)
- mOscpu.AssignLiteral("PPC Mac OS X");
- #elif defined(__i386__) || defined(__x86_64__)
diff --git a/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp b/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp
deleted file mode 100644
index 33c4a26c040..00000000000
--- a/www/firefox/patches/patch-profile_dirserviceprovider_src_nsProfileLock.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-profile_dirserviceprovider_src_nsProfileLock.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2014-05-06 22:56:22.000000000 +0000
-+++ profile/dirserviceprovider/src/nsProfileLock.cpp
-@@ -7,7 +7,7 @@
- #include "nsProfileLock.h"
- #include "nsCOMPtr.h"
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #include <Carbon/Carbon.h>
- #include <CoreFoundation/CoreFoundation.h>
- #endif
-@@ -432,7 +432,7 @@ nsresult nsProfileLock::GetReplacedLockT
- nsresult nsProfileLock::Lock(nsIFile* aProfileDir,
- nsIProfileUnlocker* *aUnlocker)
- {
--#if defined (XP_MACOSX)
-+#if defined (MOZ_WIDGET_COCOA)
- NS_NAMED_LITERAL_STRING(LOCKFILE_NAME, ".parentlock");
- NS_NAMED_LITERAL_STRING(OLD_LOCKFILE_NAME, "parent.lock");
- #elif defined (XP_UNIX)
-@@ -464,7 +464,7 @@ nsresult nsProfileLock::Lock(nsIFile* aP
- if (NS_FAILED(rv))
- return rv;
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- // First, try locking using fcntl. It is more reliable on
- // a local machine, but may not be supported by an NFS server.
-
diff --git a/www/firefox/patches/patch-toolkit_components_downloads_nsDownloadManager.cpp b/www/firefox/patches/patch-toolkit_components_downloads_nsDownloadManager.cpp
deleted file mode 100644
index 241d1ec63d3..00000000000
--- a/www/firefox/patches/patch-toolkit_components_downloads_nsDownloadManager.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-$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.
diff --git a/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp b/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp
deleted file mode 100644
index b99c75499f0..00000000000
--- a/www/firefox/patches/patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-toolkit_components_jsdownloads_src_DownloadPlatform.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- toolkit/components/jsdownloads/src/DownloadPlatform.cpp.orig 2014-05-06 22:56:29.000000000 +0000
-+++ toolkit/components/jsdownloads/src/DownloadPlatform.cpp
-@@ -17,7 +17,7 @@
- #include "nsILocalFileWin.h"
- #endif
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include <CoreFoundation/CoreFoundation.h>
- #endif
-
-@@ -67,7 +67,7 @@ static void gio_set_metadata_done(GObjec
- nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIFile* aTarget,
- const nsACString& aContentType, bool aIsPrivate)
- {
--#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)
- nsAutoString path;
- if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
- #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
-@@ -106,7 +106,7 @@ nsresult DownloadPlatform::DownloadDone(
- #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(),
diff --git a/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp b/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp
deleted file mode 100644
index 95960c4e4ac..00000000000
--- a/www/firefox/patches/patch-toolkit_library_nsStaticXULComponents.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-toolkit_library_nsStaticXULComponents.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- toolkit/library/nsStaticXULComponents.cpp.orig 2014-05-06 22:56:34.000000000 +0000
-+++ toolkit/library/nsStaticXULComponents.cpp
-@@ -29,7 +29,7 @@
-
- #ifdef XP_WIN
- # define WIDGET_MODULES MODULE(nsWidgetModule)
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- # define WIDGET_MODULES MODULE(nsWidgetMacModule)
- #elif defined(XP_OS2)
- # define WIDGET_MODULES MODULE(nsWidgetOS2Module)
-@@ -122,7 +122,7 @@
- #define UNIXPROXY_MODULE
- #endif
-
--#if defined(XP_MACOSX)
-+#if defined(MOZ_WIDGET_COCOA)
- #define OSXPROXY_MODULE MODULE(nsOSXProxyModule)
- #else
- #define OSXPROXY_MODULE
diff --git a/www/firefox/patches/patch-toolkit_profile_nsToolkitProfileService.cpp b/www/firefox/patches/patch-toolkit_profile_nsToolkitProfileService.cpp
deleted file mode 100644
index c187ed2b9c6..00000000000
--- a/www/firefox/patches/patch-toolkit_profile_nsToolkitProfileService.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$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;
diff --git a/www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp b/www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp
deleted file mode 100644
index 5366a3d751a..00000000000
--- a/www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-$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();
diff --git a/www/firefox/patches/patch-toolkit_xre_nsEmbedFunctions.cpp b/www/firefox/patches/patch-toolkit_xre_nsEmbedFunctions.cpp
index 958bea4b382..73bc00e8928 100644
--- a/www/firefox/patches/patch-toolkit_xre_nsEmbedFunctions.cpp
+++ b/www/firefox/patches/patch-toolkit_xre_nsEmbedFunctions.cpp
@@ -1,49 +1,17 @@
-$NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.4 2014/05/29 15:38:19 pho Exp $
+$NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.5 2014/05/30 10:22:06 pho Exp $
-* 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.orig 2013-05-11 19:19:55.000000000 +0000
+++ toolkit/xre/nsEmbedFunctions.cpp
-@@ -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*/)
+@@ -239,7 +239,7 @@ XRE_SetRemoteExceptionHandler(const char
{
--#if defined(XP_WIN) || defined(XP_MACOSX)
-+#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA)
+ #if defined(XP_WIN) || defined(XP_MACOSX)
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"
-@@ -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,
+@@ -351,7 +351,7 @@ XRE_InitChildProcess(int aArgc,
// Bug 684322 will add better visibility into this condition
NS_WARNING("Could not setup crash reporting\n");
}
@@ -52,39 +20,3 @@ $NetBSD: patch-toolkit_xre_nsEmbedFunctions.cpp,v 1.4 2014/05/29 15:38:19 pho Ex
// 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 {
diff --git a/www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp b/www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp
deleted file mode 100644
index eb4e470b4a4..00000000000
--- a/www/firefox/patches/patch-toolkit_xre_nsXREDirProvider.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-$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());
- }
diff --git a/www/firefox/patches/patch-uriloader_exthandler_nsExternalHelperAppService.cpp b/www/firefox/patches/patch-uriloader_exthandler_nsExternalHelperAppService.cpp
deleted file mode 100644
index 30f3d6ceda8..00000000000
--- a/www/firefox/patches/patch-uriloader_exthandler_nsExternalHelperAppService.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-uriloader_exthandler_nsExternalHelperAppService.cpp,v 1.1 2014/05/28 15:11:29 pho Exp $
-
-nsILocalFileMac.h is only available when the toolkit is cocoa.
-
---- uriloader/exthandler/nsExternalHelperAppService.cpp.orig 2014-05-06 22:56:37.000000000 +0000
-+++ uriloader/exthandler/nsExternalHelperAppService.cpp
-@@ -68,7 +68,7 @@
- #include "nsIObserverService.h" // so we can be a profile change observer
- #include "nsIPropertyBag2.h" // for the 64-bit content length
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #include "nsILocalFileMac.h"
- #elif defined(XP_OS2)
- #include "nsILocalFileOS2.h"
-@@ -301,7 +301,7 @@ static bool GetFilenameAndExtensionFromC
- static nsresult GetDownloadDirectory(nsIFile **_directory)
- {
- nsCOMPtr<nsIFile> dir;
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- // On OS X, we first try to get the users download location, if it's set.
- switch (Preferences::GetInt(NS_PREF_DOWNLOAD_FOLDERLIST, -1)) {
- case NS_FOLDER_VALUE_DESKTOP:
-@@ -467,7 +467,7 @@ struct nsExtraMimeTypeEntry {
- const char* mDescription;
- };
-
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- #define MAC_TYPE(x) x
- #else
- #define MAC_TYPE(x) 0
-@@ -484,7 +484,7 @@ static nsExtraMimeTypeEntry extraMimeEnt
- {
- #if defined(VMS)
- { APPLICATION_OCTET_STREAM, "exe,com,bin,sav,bck,pcsi,dcx_axpexe,dcx_vaxexe,sfx_axpexe,sfx_vaxexe", "Binary File" },
--#elif defined(XP_MACOSX) // don't define .bin on the mac...use internet config to look that up...
-+#elif defined(MOZ_WIDGET_COCOA) // don't define .bin on the mac...use internet config to look that up...
- { APPLICATION_OCTET_STREAM, "exe,com", "Binary File" },
- #else
- { APPLICATION_OCTET_STREAM, "exe,com,bin", "Binary File" },
diff --git a/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h b/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h
deleted file mode 100644
index 8ebe0f1ae23..00000000000
--- a/www/firefox/patches/patch-uriloader_exthandler_nsLocalHandlerApp.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-uriloader_exthandler_nsLocalHandlerApp.h,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- uriloader/exthandler/nsLocalHandlerApp.h.orig 2014-05-06 22:56:37.000000000 +0000
-+++ uriloader/exthandler/nsLocalHandlerApp.h
-@@ -47,7 +47,7 @@ protected:
-
- // any platforms that need a platform-specific class instead of just
- // using nsLocalHandlerApp need to add an include and a typedef here.
--#ifdef XP_MACOSX
-+#ifdef MOZ_WIDGET_COCOA
- # ifndef NSLOCALHANDLERAPPMAC_H_
- # include "mac/nsLocalHandlerAppMac.h"
- typedef nsLocalHandlerAppMac PlatformLocalHandlerApp_t;
diff --git a/www/firefox/patches/patch-widget_shared_NativeKeyToDOMKeyName.h b/www/firefox/patches/patch-widget_shared_NativeKeyToDOMKeyName.h
deleted file mode 100644
index 80737ccce08..00000000000
--- a/www/firefox/patches/patch-widget_shared_NativeKeyToDOMKeyName.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$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)
diff --git a/www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp b/www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp
deleted file mode 100644
index d089582bc2c..00000000000
--- a/www/firefox/patches/patch-widget_xpwidgets_nsBaseWidget.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-$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.
diff --git a/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp b/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp
index 68e410f4662..286aad06ab2 100644
--- a/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp
+++ b/www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp
@@ -1,21 +1,33 @@
-$NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.5 2014/04/30 15:07:18 ryoon Exp $
+$NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.6 2014/05/30 10:22:06 pho Exp $
---- xpcom/base/nsStackWalk.cpp.orig 2014-04-18 02:04:36.000000000 +0000
+* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
+ the toolkit is not cocoa.
+
+--- xpcom/base/nsStackWalk.cpp.orig 2014-05-06 22:56:38.000000000 +0000
+++ xpcom/base/nsStackWalk.cpp
-@@ -23,6 +23,12 @@ struct CriticalAddress {
+@@ -23,12 +23,18 @@ struct CriticalAddress {
};
static CriticalAddress gCriticalAddress;
+-#if defined(HAVE_DLOPEN) || defined(XP_MACOSX)
+// for _Unwind_Backtrace from libcxxrt or libunwind
+// cxxabi.h from libcxxrt implicitly includes unwind.h first
+#if defined(HAVE__UNWIND_BACKTRACE) && !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+
- #if defined(HAVE_DLOPEN) || defined(XP_MACOSX)
++#if defined(HAVE_DLOPEN) || defined(XP_DARWIN)
#include <dlfcn.h>
#endif
-@@ -36,7 +42,7 @@ static CriticalAddress gCriticalAddress;
+
+-#define NSSTACKWALK_SUPPORTS_MACOSX \
+- (defined(XP_MACOSX) && \
++#define NSSTACKWALK_SUPPORTS_DARWIN \
++ (defined(XP_DARWIN) && \
+ (defined(__i386) || defined(__ppc__) || defined(HAVE__UNWIND_BACKTRACE)))
+
+ #define NSSTACKWALK_SUPPORTS_LINUX \
+@@ -36,11 +42,11 @@ static CriticalAddress gCriticalAddress;
((defined(__GNUC__) && (defined(__i386) || defined(PPC))) || \
defined(HAVE__UNWIND_BACKTRACE)))
@@ -24,6 +36,38 @@ $NetBSD: patch-xpcom_base_nsStackWalk.cpp,v 1.5 2014/04/30 15:07:18 ryoon Exp $
(defined(__sun) && \
(defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386)))
+-#if NSSTACKWALK_SUPPORTS_MACOSX
++#if NSSTACKWALK_SUPPORTS_DARWIN
+ #include <pthread.h>
+ #include <CoreServices/CoreServices.h>
+
+@@ -832,7 +838,7 @@ NS_FormatCodeAddressDetails(void *aPC, c
+
+ // WIN32 x86 stack walking code
+ // i386 or PPC Linux stackwalking code or Solaris
+-#elif HAVE_DLADDR && (HAVE__UNWIND_BACKTRACE || NSSTACKWALK_SUPPORTS_LINUX || NSSTACKWALK_SUPPORTS_SOLARIS || NSSTACKWALK_SUPPORTS_MACOSX)
++#elif HAVE_DLADDR && (HAVE__UNWIND_BACKTRACE || NSSTACKWALK_SUPPORTS_LINUX || NSSTACKWALK_SUPPORTS_SOLARIS || NSSTACKWALK_SUPPORTS_DARWIN)
+
+ #include <stdlib.h>
+ #include <string.h>
+@@ -1156,7 +1162,7 @@ FramePointerStackWalk(NS_WalkStackCallba
+ (long(next) & 3)) {
+ break;
+ }
+-#if (defined(__ppc__) && defined(XP_MACOSX)) || defined(__powerpc64__)
++#if (defined(__ppc__) && defined(XP_DARWIN)) || defined(__powerpc64__)
+ // ppc mac or powerpc64 linux
+ void *pc = *(bp+2);
+ bp += 3;
+@@ -1186,7 +1192,7 @@ FramePointerStackWalk(NS_WalkStackCallba
+ }
+
+ #define X86_OR_PPC (defined(__i386) || defined(PPC) || defined(__ppc__))
+-#if X86_OR_PPC && (NSSTACKWALK_SUPPORTS_MACOSX || NSSTACKWALK_SUPPORTS_LINUX) // i386 or PPC Linux or Mac stackwalking code
++#if X86_OR_PPC && (NSSTACKWALK_SUPPORTS_DARWIN || NSSTACKWALK_SUPPORTS_LINUX) // i386 or PPC Linux or Mac stackwalking code
+
+ EXPORT_XPCOM_API(nsresult)
+ NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames,
@@ -1222,9 +1228,6 @@ NS_StackWalk(NS_WalkStackCallback aCallb
#elif defined(HAVE__UNWIND_BACKTRACE)
diff --git a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp
deleted file mode 100644
index 857ec6e5610..00000000000
--- a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-xpcom_base_nsUUIDGenerator.cpp,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- xpcom/base/nsUUIDGenerator.cpp.orig 2014-05-06 22:56:38.000000000 +0000
-+++ xpcom/base/nsUUIDGenerator.cpp
-@@ -6,7 +6,7 @@
- #if defined(XP_WIN)
- #include <windows.h>
- #include <objbase.h>
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- #include <CoreFoundation/CoreFoundation.h>
- #else
- #include <stdlib.h>
-@@ -34,7 +34,7 @@ nsUUIDGenerator::Init()
- // We're a service, so we're guaranteed that Init() is not going
- // to be reentered while we're inside Init().
-
--#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
-+#if !defined(XP_WIN) && !defined(MOZ_WIDGET_COCOA) && !defined(ANDROID)
- /* initialize random number generator using NSPR random noise */
- unsigned int seed;
-
-@@ -67,7 +67,7 @@ nsUUIDGenerator::Init()
- return NS_ERROR_FAILURE;
- #endif
-
--#endif /* non XP_WIN and non XP_MACOSX */
-+#endif /* non XP_WIN and non MOZ_WIDGET_COCOA */
-
- return NS_OK;
- }
-@@ -100,7 +100,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsI
- HRESULT hr = CoCreateGuid((GUID*)id);
- if (FAILED(hr))
- return NS_ERROR_FAILURE;
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
- if (!uuid)
- return NS_ERROR_FAILURE;
diff --git a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h b/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h
deleted file mode 100644
index 8c636237c08..00000000000
--- a/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-xpcom_base_nsUUIDGenerator.h,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- xpcom/base/nsUUIDGenerator.h.orig 2014-05-06 22:56:38.000000000 +0000
-+++ xpcom/base/nsUUIDGenerator.h
-@@ -27,7 +27,7 @@ private:
- protected:
-
- mozilla::Mutex mLock;
--#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
-+#if !defined(XP_WIN) && !defined(MOZ_WIDGET_COCOA) && !defined(ANDROID)
- char mState[128];
- char *mSavedState;
- uint8_t mRBytes;
diff --git a/www/firefox/patches/patch-xpcom_build_BinaryPath.h b/www/firefox/patches/patch-xpcom_build_BinaryPath.h
deleted file mode 100644
index c23a3ca91b9..00000000000
--- a/www/firefox/patches/patch-xpcom_build_BinaryPath.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-xpcom_build_BinaryPath.h,v 1.1 2014/05/30 03:03:36 pho Exp $
-
-Don't assume cocoa toolkit just because OS_ARCH is Darwin.
-
---- xpcom/build/BinaryPath.h.orig 2014-05-06 22:56:38.000000000 +0000
-+++ xpcom/build/BinaryPath.h
-@@ -8,7 +8,7 @@
- #include "nsXPCOMPrivate.h" // for MAXPATHLEN
- #ifdef XP_WIN
- #include <windows.h>
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- #include <CoreFoundation/CoreFoundation.h>
- #elif defined(XP_UNIX)
- #include <sys/stat.h>
-@@ -39,7 +39,7 @@ private:
- return NS_ERROR_FAILURE;
- }
-
--#elif defined(XP_MACOSX)
-+#elif defined(MOZ_WIDGET_COCOA)
- static nsresult Get(const char *argv0, char aResult[MAXPATHLEN])
- {
- // Works even if we're not bundled.
diff --git a/www/firefox/patches/patch-xpcom_build_PoisonIOInterposer.h b/www/firefox/patches/patch-xpcom_build_PoisonIOInterposer.h
new file mode 100644
index 00000000000..0de18a31cd9
--- /dev/null
+++ b/www/firefox/patches/patch-xpcom_build_PoisonIOInterposer.h
@@ -0,0 +1,58 @@
+$NetBSD: patch-xpcom_build_PoisonIOInterposer.h,v 1.1 2014/05/30 10:22:06 pho Exp $
+
+Replace XP_MACOSX with XP_DARWIN as the former is not defined when
+the toolkit is not cocoa.
+
+--- xpcom/build/PoisonIOInterposer.h.orig 2014-05-06 22:56:38.000000000 +0000
++++ xpcom/build/PoisonIOInterposer.h
+@@ -26,7 +26,7 @@ void MozillaUnRegisterDebugFILE(FILE *f)
+
+ MOZ_END_EXTERN_C
+
+-#if defined(MOZ_ENABLE_PROFILER_SPS) && (defined(XP_WIN) || defined(XP_MACOSX))
++#if defined(MOZ_ENABLE_PROFILER_SPS) && (defined(XP_WIN) || defined(XP_DARWIN))
+
+ #ifdef __cplusplus
+ namespace mozilla {
+@@ -44,7 +44,7 @@ bool IsDebugFile(intptr_t aFileID);
+ */
+ void InitPoisonIOInterposer();
+
+-#ifdef XP_MACOSX
++#ifdef XP_DARWIN
+ /**
+ * Check that writes are dirty before reporting I/O (Mac OS X only)
+ * This is necessary for late-write checks on Mac OS X, but reading the buffer
+@@ -52,7 +52,7 @@ void InitPoisonIOInterposer();
+ * to do this for everything else that uses
+ */
+ void OnlyReportDirtyWrites();
+-#endif /* XP_MACOSX */
++#endif /* XP_DARWIN */
+
+ /**
+ * Clear IO poisoning, this is only safe to do on the main-thread when no other
+@@ -63,19 +63,19 @@ void ClearPoisonIOInterposer();
+ } // namespace mozilla
+ #endif /* __cplusplus */
+
+-#else /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_MACOSX) */
++#else /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_DARWIN) */
+
+ #ifdef __cplusplus
+ namespace mozilla {
+ inline bool IsDebugFile(intptr_t aFileID){ return true; }
+ inline void InitPoisonIOInterposer(){}
+ inline void ClearPoisonIOInterposer(){}
+-#ifdef XP_MACOSX
++#ifdef XP_DARWIN
+ inline void OnlyReportDirtyWrites(){}
+-#endif /* XP_MACOSX */
++#endif /* XP_DARWIN */
+ } // namespace mozilla
+ #endif /* __cplusplus */
+
+-#endif /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_MACOSX) */
++#endif /* MOZ_ENABLE_PROFILER_SPS && (XP_WIN || XP_DARWIN) */
+
+ #endif // mozilla_PoisonIOInterposer_h
diff --git a/www/firefox/patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp b/www/firefox/patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp
new file mode 100644
index 00000000000..f833bc03524
--- /dev/null
+++ b/www/firefox/patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp
@@ -0,0 +1,34 @@
+$NetBSD: patch-xpcom_glue_standalone_nsXPCOMGlue.cpp,v 1.1 2014/05/30 10:22:06 pho Exp $
+
+Replace XP_MACOSX with XP_DARWIN as the former is not defined when the
+toolkit is not cocoa.
+
+--- xpcom/glue/standalone/nsXPCOMGlue.cpp.orig 2014-05-26 07:53:46.000000000 +0000
++++ xpcom/glue/standalone/nsXPCOMGlue.cpp
+@@ -119,7 +119,7 @@ CloseLibHandle(LibHandleType aLibHandle)
+ DosFreeModule(aLibHandle);
+ }
+
+-#elif defined(XP_MACOSX)
++#elif defined(XP_DARWIN)
+ #include <mach-o/dyld.h>
+
+ typedef const mach_header *LibHandleType;
+@@ -348,7 +348,7 @@ typedef Scoped<ScopedCloseFileTraits> Sc
+ static void
+ XPCOMGlueUnload()
+ {
+-#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(XP_MACOSX) \
++#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(XP_DARWIN) \
+ && defined(NS_TRACE_MALLOC)
+ if (sTop) {
+ _malloc = __libc_malloc;
+@@ -461,7 +461,7 @@ XPCOMGlueLoad(const char *xpcomFile)
+ return nullptr;
+ }
+
+-#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(XP_MACOSX) \
++#if !defined(XP_WIN) && !defined(XP_OS2) && !defined(XP_DARWIN) \
+ && defined(NS_TRACE_MALLOC)
+ _malloc = (__ptr_t(*)(size_t)) GetSymbol(sTop->libHandle, "malloc");
+ _calloc = (__ptr_t(*)(size_t, size_t)) GetSymbol(sTop->libHandle, "calloc");
diff --git a/www/firefox/patches/patch-xpfe_appshell_src_nsWebShellWindow.cpp b/www/firefox/patches/patch-xpfe_appshell_src_nsWebShellWindow.cpp
deleted file mode 100644
index ab3069e847f..00000000000
--- a/www/firefox/patches/patch-xpfe_appshell_src_nsWebShellWindow.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$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