diff --git a/application/basilisk/components/search/service/nsSearchService.js b/application/basilisk/components/search/service/nsSearchService.js index 100905150c..3cd2531006 100644 --- a/application/basilisk/components/search/service/nsSearchService.js +++ b/application/basilisk/components/search/service/nsSearchService.js @@ -1371,8 +1371,12 @@ Engine.prototype = { } let type = chan.contentType; - if (!type.startsWith("image/")) - type = "image/x-icon"; + if (!type.startsWith("image/")) { + console.warn( + "Search service: Unable to set icon, content type is not an image", + contentType); + return; + } let dataURL = "data:" + type + ";base64," + btoa(String.fromCharCode.apply(null, aByteArray)); diff --git a/application/palemoon/app/nsBrowserApp.cpp b/application/palemoon/app/nsBrowserApp.cpp index faf82f710a..bfe9a6f352 100644 --- a/application/palemoon/app/nsBrowserApp.cpp +++ b/application/palemoon/app/nsBrowserApp.cpp @@ -40,16 +40,11 @@ #include "mozilla/Telemetry.h" #include "mozilla/WindowsDllBlocklist.h" -#if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID) #define MOZ_BROWSER_CAN_BE_CONTENTPROC #include "../../ipc/contentproc/plugin-container.cpp" -#endif using namespace mozilla; -#ifdef XP_MACOSX -#define kOSXResourcesFolder "Resources" -#endif #define kDesktopFolder "browser" static void Output(const char *fmt, ... ) @@ -236,9 +231,6 @@ static int do_main(int argc, char* argv[], char* envp[], nsIFile *xreDirectory) nsCOMPtr greDir; exeFile->GetParent(getter_AddRefs(greDir)); -#ifdef XP_MACOSX - greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder)); -#endif nsCOMPtr appSubdir; greDir->Clone(getter_AddRefs(appSubdir)); appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder)); @@ -317,10 +309,6 @@ InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory) if (xreDirectory) { // chop XPCOM_DLL off exePath *lastSlash = '\0'; -#ifdef XP_MACOSX - lastSlash = strrchr(exePath, XPCOM_FILE_PATH_SEPARATOR[0]); - strcpy(lastSlash + 1, kOSXResourcesFolder); -#endif #ifdef XP_WIN rv = NS_NewLocalFile(NS_ConvertUTF8toUTF16(exePath), false, xreDirectory); @@ -385,14 +373,5 @@ int main(int argc, char* argv[], char* envp[]) NS_LogTerm(); -#ifdef XP_MACOSX - // 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 - // now we enable writes again and early exits will have to use exit instead - // of _exit. - XRE_StopLateWriteChecks(); -#endif - return result; } diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js index ce1b297117..687d79e626 100644 --- a/application/palemoon/app/profile/palemoon.js +++ b/application/palemoon/app/profile/palemoon.js @@ -16,10 +16,8 @@ # #ifdef XP_UNIX -#ifndef XP_MACOSX #define UNIX_BUT_NOT_MAC #endif -#endif #ifdef XP_WIN lock_pref("browser.tabs.remote", false); @@ -433,13 +431,7 @@ pref("browser.link.open_newwindow.restriction", 2); // If true, this pref causes windows opened by window.open to be forced into new // tabs (rather than potentially opening separate windows, depending on // window.open arguments) when the browser is in fullscreen mode. -// We set this differently on Mac because the fullscreen implementation there is -// different. -#ifdef XP_MACOSX -pref("browser.link.open_newwindow.disabled_in_fullscreen", true); -#else pref("browser.link.open_newwindow.disabled_in_fullscreen", false); -#endif // Tabbed browser pref("browser.tabs.autoHide", false); @@ -594,13 +586,8 @@ pref("browser.gesture.swipe.left", "Browser:BackOrBackDuplicate"); pref("browser.gesture.swipe.right", "Browser:ForwardOrForwardDuplicate"); pref("browser.gesture.swipe.up", "cmd_scrollTop"); pref("browser.gesture.swipe.down", "cmd_scrollBottom"); -#ifdef XP_MACOSX -pref("browser.gesture.pinch.latched", true); -pref("browser.gesture.pinch.threshold", 150); -#else pref("browser.gesture.pinch.latched", false); pref("browser.gesture.pinch.threshold", 25); -#endif #ifdef XP_WIN // Enabled for touch input display zoom. pref("browser.gesture.pinch.out", "cmd_fullZoomEnlarge"); @@ -628,27 +615,9 @@ pref("browser.snapshots.limit", 0); // 2: Go back or go forward, in your history // 3: Zoom in or out // 4: Scroll contents with X and Y swapped -#ifdef XP_MACOSX -// On OS X, if the wheel has one axis only, shift+wheel comes through as a -// horizontal scroll event. Thus, we can't assign anything other than normal -// scrolling to shift+wheel. -pref("mousewheel.with_alt.action", 2); -pref("mousewheel.with_shift.action", 1); -// On MacOS X, control+wheel is typically handled by system and we don't -// receive the event. So, command key which is the main modifier key for -// acceleration is the best modifier for zoom-in/out. However, we should keep -// the control key setting for backward compatibility. -pref("mousewheel.with_meta.action", 3); // command key on Mac -// Disable control-/meta-modified horizontal mousewheel events, since -// those are used on Mac as part of modified swipe gestures (e.g. -// Left swipe+Cmd = go back in a new tab). -pref("mousewheel.with_control.action.override_x", 0); -pref("mousewheel.with_meta.action.override_x", 0); -#else pref("mousewheel.with_alt.action", 1); pref("mousewheel.with_shift.action", 2); pref("mousewheel.with_meta.action", 1); // win key on Win, Super/Hyper on Linux -#endif pref("mousewheel.with_control.action",3); pref("mousewheel.with_win.action", 1); @@ -715,11 +684,7 @@ pref("browser.preferences.instantApply", false); #else pref("browser.preferences.instantApply", true); #endif -#ifdef XP_MACOSX -pref("browser.preferences.animateFadeIn", true); -#else pref("browser.preferences.animateFadeIn", false); -#endif pref("browser.download.show_plugins_in_list", true); pref("browser.download.hide_plugins_without_extensions", true); @@ -971,19 +936,9 @@ pref("browser.bookmarks.editDialog.firstEditField", "namePicker"); pref("signon.startup.prompt", false); // Whether to use a panel that looks like an OS X sheet for customization -#ifdef XP_MACOSX -pref("toolbar.customization.usesheet", true); -#else pref("toolbar.customization.usesheet", false); -#endif -#ifdef XP_MACOSX -// On mac, the default pref is per-architecture -pref("dom.ipc.plugins.enabled.i386", true); -pref("dom.ipc.plugins.enabled.x86_64", true); -#else pref("dom.ipc.plugins.enabled", true); -#endif pref("browser.tabs.remote", false); diff --git a/application/palemoon/base/content/aboutDialog.js b/application/palemoon/base/content/aboutDialog.js index 4fdeab9a82..cce96f96d4 100644 --- a/application/palemoon/base/content/aboutDialog.js +++ b/application/palemoon/base/content/aboutDialog.js @@ -44,12 +44,6 @@ function init(aEvent) document.getElementById("aboutVersion").textContent += " (" + buildDate + ")"; } -#ifdef XP_MACOSX - // it may not be sized at this point, and we need its width to calculate its position - window.sizeToContent(); - window.moveTo((screen.availWidth / 2) - (window.outerWidth / 2), screen.availHeight / 5); -#endif - // get release notes URL from prefs var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Components.interfaces.nsIURLFormatter); diff --git a/application/palemoon/base/content/aboutDialog.xul b/application/palemoon/base/content/aboutDialog.xul index 6edfc21555..ceeef5dae4 100644 --- a/application/palemoon/base/content/aboutDialog.xul +++ b/application/palemoon/base/content/aboutDialog.xul @@ -15,20 +15,12 @@ %aboutDialogDTD; ]> -#ifdef XP_MACOSX - -#endif - @@ -83,8 +75,4 @@ - -#ifdef XP_MACOSX -#include browserMountPoints.inc -#endif diff --git a/application/palemoon/base/content/autocomplete.xml b/application/palemoon/base/content/autocomplete.xml index a9a4d9a831..b3250199dd 100644 --- a/application/palemoon/base/content/autocomplete.xml +++ b/application/palemoon/base/content/autocomplete.xml @@ -450,13 +450,8 @@ var cancel = false; // Catch any keys that could potentially move the caret. Ctrl can be - // used in combination with these keys on Windows and Linux; and Alt - // can be used on OS X, so make sure the unused one isn't used. -#ifdef XP_MACOSX - let metaKey = aEvent.ctrlKey; -#else + // used in combination with these keys on Windows and Linux. let metaKey = aEvent.altKey; -#endif if (!this.disableKeyNavigation && !metaKey) { switch (aEvent.keyCode) { case KeyEvent.DOM_VK_LEFT: @@ -494,11 +489,6 @@ cancel = this.mController.handleEscape(); break; case KeyEvent.DOM_VK_RETURN: -#ifdef XP_MACOSX - // Prevent the default action, since it will beep on Mac - if (aEvent.metaKey) - aEvent.preventDefault(); -#endif this.mEnterEvent = aEvent; if (this.mController.selection) { this._selectionDetails = { @@ -509,19 +499,9 @@ cancel = this.handleEnter(); break; case KeyEvent.DOM_VK_DELETE: -#ifdef XP_MACOSX - if (!aEvent.shiftKey) { - break; - } -#endif cancel = this.handleDelete(); break; case KeyEvent.DOM_VK_BACK_SPACE: -#ifdef XP_MACOSX - if (aEvent.shiftKey) { - cancel = this.handleDelete(); - } -#endif break; case KeyEvent.DOM_VK_DOWN: case KeyEvent.DOM_VK_UP: @@ -529,9 +509,7 @@ this.toggleHistoryPopup(); break; case KeyEvent.DOM_VK_F4: -#ifndef XP_MACOSX this.toggleHistoryPopup(); -#endif break; } diff --git a/application/palemoon/base/content/baseMenuOverlay.xul b/application/palemoon/base/content/baseMenuOverlay.xul index bccdec2650..d07c647fac 100644 --- a/application/palemoon/base/content/baseMenuOverlay.xul +++ b/application/palemoon/base/content/baseMenuOverlay.xul @@ -16,22 +16,6 @@