mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
f9ded55f98
89 changed files with 168 additions and 3086 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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<nsIFile> greDir;
|
||||
exeFile->GetParent(getter_AddRefs(greDir));
|
||||
#ifdef XP_MACOSX
|
||||
greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder));
|
||||
#endif
|
||||
nsCOMPtr<nsIFile> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -15,20 +15,12 @@
|
|||
%aboutDialogDTD;
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
id="PMaboutDialog"
|
||||
windowtype="Browser:About"
|
||||
onload="init(event);"
|
||||
#ifdef XP_MACOSX
|
||||
inwindowmenu="false"
|
||||
#else
|
||||
title="&aboutDialog.title;"
|
||||
#endif
|
||||
role="dialog"
|
||||
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
|
||||
>
|
||||
|
|
@ -83,8 +75,4 @@
|
|||
<keyset>
|
||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
||||
</keyset>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include browserMountPoints.inc
|
||||
#endif
|
||||
</window>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,22 +16,6 @@
|
|||
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<!-- nsMenuBarX hides these and uses them to build the Application menu.
|
||||
When using Carbon widgets for Mac OS X widgets, some of these are not
|
||||
used as they only apply to Cocoa widget builds. All version of Firefox
|
||||
through Firefox 2 will use Carbon widgets. -->
|
||||
<menupopup id="menu_ToolsPopup">
|
||||
<menuitem id="menu_preferences" label="&preferencesCmdMac.label;" key="key_preferencesCmdMac" oncommand="openPreferences();"/>
|
||||
<menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
|
||||
<menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac.label;" key="key_hideThisAppCmdMac"/>
|
||||
<menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
|
||||
<menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
|
||||
</menupopup>
|
||||
<!-- Mac window menu -->
|
||||
#include ../../../../toolkit/content/macWindowMenu.inc
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
<menu id="helpMenu"
|
||||
label="&helpMenuWin.label;"
|
||||
|
|
@ -47,11 +31,7 @@
|
|||
onclick="checkForMiddleClick(this, event);"
|
||||
label="&productHelp.label;"
|
||||
accesskey="&productHelp.accesskey;"
|
||||
#ifdef XP_MACOSX
|
||||
key="key_openHelpMac"/>
|
||||
#else
|
||||
/>
|
||||
#endif
|
||||
<menuitem id="troubleShooting"
|
||||
accesskey="&helpTroubleshootingInfo.accesskey;"
|
||||
label="&helpTroubleshootingInfo.label;"
|
||||
|
|
@ -89,22 +69,6 @@
|
|||
</menu>
|
||||
|
||||
<keyset id="baseMenuKeyset">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_openHelpMac"
|
||||
oncommand="openHelpLink('firefox-osxkey');"
|
||||
key="&helpMac.commandkey;"
|
||||
modifiers="accel"/>
|
||||
<!-- These are used to build the Application menu under Cocoa widgets -->
|
||||
<key id="key_preferencesCmdMac"
|
||||
key="&preferencesCmdMac.commandkey;"
|
||||
modifiers="accel"/>
|
||||
<key id="key_hideThisAppCmdMac"
|
||||
key="&hideThisAppCmdMac.commandkey;"
|
||||
modifiers="accel"/>
|
||||
<key id="key_hideOtherAppsCmdMac"
|
||||
key="&hideOtherAppsCmdMac.commandkey;"
|
||||
modifiers="accel,alt"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
|
|
|
|||
|
|
@ -18,12 +18,6 @@ var FullScreen = {
|
|||
fullscreenCommand.removeAttribute("checked");
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Make sure the menu items are adjusted.
|
||||
document.getElementById("enterFullScreenItem").hidden = enterFS;
|
||||
document.getElementById("exitFullScreenItem").hidden = !enterFS;
|
||||
#endif
|
||||
|
||||
if (!this._fullScrToggler) {
|
||||
this._fullScrToggler = document.getElementById("fullscr-toggler");
|
||||
this._fullScrToggler.addEventListener("mouseover", this._expandCallback, false);
|
||||
|
|
@ -456,10 +450,5 @@ XPCOMUtils.defineLazyGetter(FullScreen, "useLionFullScreen", function() {
|
|||
// * on OS X
|
||||
// * on Lion or higher (Darwin 11+)
|
||||
// * have fullscreenbutton="true"
|
||||
#ifdef XP_MACOSX
|
||||
return parseFloat(Services.sysinfo.getProperty("version")) >= 11 &&
|
||||
document.documentElement.getAttribute("fullscreenbutton") == "true";
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
});
|
||||
|
|
|
|||
|
|
@ -70,12 +70,10 @@
|
|||
label="&printSetupCmd.label;"
|
||||
accesskey="&printSetupCmd.accesskey;"
|
||||
command="cmd_pageSetup"/>
|
||||
#ifndef XP_MACOSX
|
||||
<menuitem id="menu_printPreview"
|
||||
label="&printPreviewCmd.label;"
|
||||
accesskey="&printPreviewCmd.accesskey;"
|
||||
command="cmd_printPreview"/>
|
||||
#endif
|
||||
<menuitem id="menu_print"
|
||||
label="&printCmd.label;"
|
||||
accesskey="&printCmd.accesskey;"
|
||||
|
|
@ -96,13 +94,9 @@
|
|||
#ifdef XP_WIN
|
||||
label="&quitApplicationCmdWin.label;"
|
||||
accesskey="&quitApplicationCmdWin.accesskey;"
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
label="&quitApplicationCmdMac.label;"
|
||||
#else
|
||||
label="&quitApplicationCmd.label;"
|
||||
accesskey="&quitApplicationCmd.accesskey;"
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
key="key_quitApplication"
|
||||
#endif
|
||||
|
|
@ -215,11 +209,7 @@
|
|||
label="&stopCmd.label;"
|
||||
accesskey="&stopCmd.accesskey;"
|
||||
command="Browser:Stop"
|
||||
#ifdef XP_MACOSX
|
||||
key="key_stop_mac"/>
|
||||
#else
|
||||
key="key_stop"/>
|
||||
#endif
|
||||
<menuitem id="menu_reload"
|
||||
class="show-only-for-keyboard"
|
||||
label="&reloadCmd.label;"
|
||||
|
|
@ -276,30 +266,12 @@
|
|||
</menu>
|
||||
#include browser-charsetmenu.inc
|
||||
<menuseparator/>
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="enterFullScreenItem"
|
||||
accesskey="&enterFullScreenCmd.accesskey;"
|
||||
label="&enterFullScreenCmd.label;"
|
||||
key="key_fullScreen">
|
||||
<observes element="View:FullScreen" attribute="oncommand"/>
|
||||
<observes element="View:FullScreen" attribute="disabled"/>
|
||||
</menuitem>
|
||||
<menuitem id="exitFullScreenItem"
|
||||
accesskey="&exitFullScreenCmd.accesskey;"
|
||||
label="&exitFullScreenCmd.label;"
|
||||
key="key_fullScreen"
|
||||
hidden="true">
|
||||
<observes element="View:FullScreen" attribute="oncommand"/>
|
||||
<observes element="View:FullScreen" attribute="disabled"/>
|
||||
</menuitem>
|
||||
#else
|
||||
<menuitem id="fullScreenItem"
|
||||
accesskey="&fullScreenCmd.accesskey;"
|
||||
label="&fullScreenCmd.label;"
|
||||
key="key_fullScreen"
|
||||
type="checkbox"
|
||||
observes="View:FullScreen"/>
|
||||
#endif
|
||||
<menuitem id="menu_showAllTabs"
|
||||
hidden="true"
|
||||
accesskey="&showAllTabsCmd.accesskey;"
|
||||
|
|
@ -319,9 +291,7 @@
|
|||
label="&historyMenu.label;"
|
||||
accesskey="&historyMenu.accesskey;">
|
||||
<menupopup id="goPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
context="placesContext"
|
||||
oncommand="this.parentNode._placesView._onCommand(event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
|
|
@ -332,21 +302,13 @@
|
|||
<menuitem id="historyMenuBack"
|
||||
class="show-only-for-keyboard"
|
||||
label="&backCmd.label;"
|
||||
#ifdef XP_MACOSX
|
||||
key="goBackKb2"
|
||||
#else
|
||||
key="goBackKb"
|
||||
#endif
|
||||
command="Browser:BackOrBackDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="historyMenuForward"
|
||||
class="show-only-for-keyboard"
|
||||
label="&forwardCmd.label;"
|
||||
#ifdef XP_MACOSX
|
||||
key="goForwardKb2"
|
||||
#else
|
||||
key="goForwardKb"
|
||||
#endif
|
||||
command="Browser:ForwardOrForwardDuplicate"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="historyMenuHome"
|
||||
|
|
@ -359,15 +321,11 @@
|
|||
class="show-only-for-keyboard"/>
|
||||
<menuitem id="menu_showAllHistory"
|
||||
label="&showAllHistoryCmd2.label;"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
key="showAllHistoryKb"
|
||||
#endif
|
||||
command="Browser:ShowAllHistory"/>
|
||||
<menuitem id="sanitizeItem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&clearRecentHistory.label;"
|
||||
key="key_sanitize"
|
||||
command="Tools:Sanitize"/>
|
||||
|
|
@ -387,9 +345,7 @@
|
|||
label="&historyUndoMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="historyUndoPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoSubmenu();"/>
|
||||
</menu>
|
||||
<menu id="historyUndoWindowMenu"
|
||||
|
|
@ -397,9 +353,7 @@
|
|||
label="&historyUndoWindowMenu.label;"
|
||||
disabled="true">
|
||||
<menupopup id="historyUndoWindowPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
onpopupshowing="document.getElementById('history-menu')._placesView.populateUndoWindowSubmenu();"/>
|
||||
</menu>
|
||||
<menuseparator id="startHistorySeparator"
|
||||
|
|
@ -414,9 +368,7 @@
|
|||
ondragover="PlacesMenuDNDHandler.onDragOver(event);"
|
||||
ondrop="PlacesMenuDNDHandler.onDrop(event);">
|
||||
<menupopup id="bookmarksMenuPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
context="placesContext"
|
||||
openInTabs="children"
|
||||
oncommand="BookmarksEventHandler.onCommand(event, this.parentNode._placesView);"
|
||||
|
|
@ -426,32 +378,24 @@
|
|||
new PlacesMenu(event, 'place:folder=BOOKMARKS_MENU');"
|
||||
tooltip="bhTooltip" popupsinherittooltip="true">
|
||||
<menuitem id="bookmarksShowAll"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&organizeBookmarks.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator id="organizeBookmarksSeparator"/>
|
||||
<menuitem id="menu_bookmarkThisPage"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&bookmarkThisPageCmd.label;"
|
||||
command="Browser:AddBookmarkAs"
|
||||
key="addBookmarkAsKb"/>
|
||||
<menuitem id="subscribeToPageMenuitem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenuitem.label;"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
observes="singleFeedMenuitemState"/>
|
||||
<menu id="subscribeToPageMenupopup"
|
||||
#ifndef XP_MACOSX
|
||||
class="menu-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenupopup.label;"
|
||||
observes="multipleFeedsMenuState">
|
||||
<menupopup id="subscribeToPageSubmenuMenupopup"
|
||||
|
|
@ -470,9 +414,7 @@
|
|||
label="&personalbarCmd.label;"
|
||||
container="true">
|
||||
<menupopup id="bookmarksToolbarFolderPopup"
|
||||
#ifndef XP_MACOSX
|
||||
placespopup="true"
|
||||
#endif
|
||||
context="placesContext"
|
||||
onpopupshowing="if (!this.parentNode._placesView)
|
||||
new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
|
||||
|
|
@ -482,9 +424,7 @@
|
|||
<menuseparator builder="end"
|
||||
class="hide-if-empty-places-result"/>
|
||||
<menuitem id="menu_unsortedBookmarks"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&unsortedBookmarksCmd.label;"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer('UnfiledBookmarks');"/>
|
||||
</menupopup>
|
||||
|
|
@ -560,9 +500,5 @@
|
|||
oncommand="openPreferences();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<menu id="windowMenu" />
|
||||
#endif
|
||||
<menu id="helpMenu" />
|
||||
</menubar>
|
||||
|
|
|
|||
|
|
@ -766,11 +766,7 @@ var BookmarksEventHandler = {
|
|||
*/
|
||||
onClick: function(aEvent, aView) {
|
||||
// Only handle middle-click or left-click with modifiers.
|
||||
#ifdef XP_MACOSX
|
||||
var modifKey = aEvent.metaKey || aEvent.shiftKey;
|
||||
#else
|
||||
var modifKey = aEvent.ctrlKey || aEvent.shiftKey;
|
||||
#endif
|
||||
if (aEvent.button == 2 || (aEvent.button == 0 && !modifKey)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
#define XP_GNOME 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
|
|
@ -172,10 +170,8 @@
|
|||
<key id="key_newNavigatorTab" key="&tabCmd.commandkey;" modifiers="accel" command="cmd_newNavigatorTab"/>
|
||||
<key id="focusURLBar" key="&openCmd.commandkey;" command="Browser:OpenLocation"
|
||||
modifiers="accel"/>
|
||||
#ifndef XP_MACOSX
|
||||
<key id="focusURLBar2" key="&urlbar.accesskey;" command="Browser:OpenLocation"
|
||||
modifiers="alt"/>
|
||||
#endif
|
||||
|
||||
#
|
||||
# Search Command Key Logic works like this:
|
||||
|
|
@ -195,9 +191,6 @@
|
|||
# for people to switch to Linux.
|
||||
#
|
||||
<key id="key_search" key="&searchFocus.commandkey;" command="Tools:Search" modifiers="accel"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_search2" key="&findOnCmd.commandkey;" command="Tools:Search" modifiers="accel,alt"/>
|
||||
#endif
|
||||
#ifdef XP_WIN
|
||||
<key id="key_search2" key="&searchFocus.commandkey2;" command="Tools:Search" modifiers="accel"/>
|
||||
#endif
|
||||
|
|
@ -236,28 +229,17 @@
|
|||
|
||||
<key keycode="VK_BACK" command="cmd_handleBackspace"/>
|
||||
<key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>
|
||||
#ifndef XP_MACOSX
|
||||
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/>
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/>
|
||||
#else
|
||||
<key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel" />
|
||||
<key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel" />
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
<key id="goBackKb2" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
|
||||
<key id="goForwardKb2" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
|
||||
#endif
|
||||
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
|
||||
<key keycode="VK_F5" command="Browser:Reload"/>
|
||||
#ifndef XP_MACOSX
|
||||
<key id="showAllHistoryKb" key="&showAllHistoryCmd.commandkey;" command="Browser:ShowAllHistory" modifiers="accel,shift"/>
|
||||
<key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
|
||||
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
|
||||
#else
|
||||
<key id="key_fullScreen" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,control"/>
|
||||
<key id="key_fullScreen_old" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>
|
||||
<key keycode="VK_F11" command="View:FullScreen"/>
|
||||
#endif
|
||||
<key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/>
|
||||
<key key="&reloadCmd.commandkey;" command="Browser:ReloadSkipCache" modifiers="accel,shift"/>
|
||||
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
|
||||
|
|
@ -290,18 +272,10 @@
|
|||
# networking requests, XHR, animated gifs, etc.
|
||||
<key id="key_stop" keycode="VK_ESCAPE" command="Browser:Stop"/>
|
||||
<key id="key_stop_all" keycode="VK_ESCAPE" modifiers="shift" oncommand="BrowserStop();"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_stop_mac" modifiers="accel" key="&stopCmd.macCommandKey;" command="Browser:Stop"/>
|
||||
<key id="key_stop_all_mac" modifiers="accel,shift" key="&stopCmd.macCommandKey;" oncommand="BrowserStop();"/>
|
||||
#endif
|
||||
|
||||
<key id="key_gotoHistory"
|
||||
key="&historySidebarCmd.commandKey;"
|
||||
#ifdef XP_MACOSX
|
||||
modifiers="accel,shift"
|
||||
#else
|
||||
modifiers="accel"
|
||||
#endif
|
||||
command="viewHistorySidebar"/>
|
||||
|
||||
<key id="key_fullZoomReduce" key="&fullZoomReduceCmd.commandkey;" command="cmd_fullZoomReduce" modifiers="accel"/>
|
||||
|
|
@ -318,9 +292,6 @@
|
|||
|
||||
<key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
|
||||
<key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_sanitize_mac" command="Tools:Sanitize" keycode="VK_BACK" modifiers="accel,shift"/>
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
<key id="key_quitApplication" key="&quitApplicationCmdUnix.key;" command="cmd_quitApplication" modifiers="accel"/>
|
||||
#endif
|
||||
|
|
@ -351,7 +322,4 @@
|
|||
</keyset>
|
||||
|
||||
# Used by baseMenuOverlay
|
||||
#ifdef XP_MACOSX
|
||||
<commandset id="baseMenuCommandSet" />
|
||||
#endif
|
||||
<keyset id="baseMenuKeyset" />
|
||||
|
|
|
|||
|
|
@ -991,9 +991,6 @@ var allTabs = {
|
|||
let container = this.container.getBoundingClientRect();
|
||||
let tabCloseButton = this.tabCloseButton.getBoundingClientRect();
|
||||
let alignLeft = getComputedStyle(this.panel, "").direction == "rtl";
|
||||
#ifdef XP_MACOSX
|
||||
alignLeft = !alignLeft;
|
||||
#endif
|
||||
this.tabCloseButton.left = canvas.left -
|
||||
container.left +
|
||||
parseInt(this.container.left) +
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@
|
|||
<handler event="mouseover" action="ctrlTab._mouseOverFocus(this);"/>
|
||||
<handler event="command" action="ctrlTab.pick(this);"/>
|
||||
<handler event="click" button="1" action="ctrlTab.remove(this);"/>
|
||||
#ifdef XP_MACOSX
|
||||
# Control+click is a right click on OS X
|
||||
<handler event="click" button="2" action="ctrlTab.pick(this);"/>
|
||||
#endif
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
|
|
|
|||
|
|
@ -179,12 +179,6 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
|
|||
background-position: top right;
|
||||
}
|
||||
|
||||
%ifdef XP_MACOSX
|
||||
#main-window[inFullscreen="true"] {
|
||||
padding-top: 0; /* override drawintitlebar="true" */
|
||||
}
|
||||
%endif
|
||||
|
||||
#browser-bottombox[lwthemefooter="true"] {
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom left;
|
||||
|
|
@ -553,11 +547,7 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(#nav-bar):not(
|
|||
.ctrlTab-favicon-container,
|
||||
.allTabs-favicon-container {
|
||||
-moz-box-align: start;
|
||||
%ifdef XP_MACOSX
|
||||
-moz-box-pack: end;
|
||||
%else
|
||||
-moz-box-pack: start;
|
||||
%endif
|
||||
}
|
||||
|
||||
.ctrlTab-favicon,
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ var gInPrintPreviewMode = false;
|
|||
var gContextMenu = null; // nsContextMenu instance
|
||||
var gMultiProcessBrowser = false;
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
var gEditUIVisible = true;
|
||||
#endif
|
||||
|
||||
[
|
||||
["gBrowser", "content"],
|
||||
["gNavToolbox", "navigator-toolbox"],
|
||||
|
|
@ -1206,12 +1203,10 @@ var gBrowserInit = {
|
|||
// unless there are downloads to be displayed.
|
||||
DownloadsButton.initializeIndicator();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
let placesContext = document.getElementById("placesContext");
|
||||
placesContext.addEventListener("popupshowing", updateEditUIVisibility, false);
|
||||
placesContext.addEventListener("popuphiding", updateEditUIVisibility, false);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_PERSONAS
|
||||
gBrowser.mPanelContainer.addEventListener("InstallBrowserTheme", LightWeightThemeWebInstaller, false, true);
|
||||
|
|
@ -1457,95 +1452,6 @@ var gBrowserInit = {
|
|||
window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = null;
|
||||
},
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// nonBrowserWindowStartup(), nonBrowserWindowDelayedStartup(), and
|
||||
// nonBrowserWindowShutdown() are used for non-browser windows in
|
||||
// macBrowserOverlay
|
||||
nonBrowserWindowStartup: function() {
|
||||
// Disable inappropriate commands / submenus
|
||||
var disabledItems = ['Browser:SavePage',
|
||||
'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
|
||||
'viewToolbarsMenu', 'viewSidebarMenuMenu', 'Browser:Reload',
|
||||
'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
|
||||
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'Browser:BookmarkAllTabs',
|
||||
'View:PageInfo', 'Browser:ToggleAddonBar'];
|
||||
var element;
|
||||
|
||||
for (let disabledItem of disabledItems) {
|
||||
element = document.getElementById(disabledItem);
|
||||
if (element) {
|
||||
element.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
||||
// If no windows are active (i.e. we're the hidden window), disable the close, minimize
|
||||
// and zoom menu commands as well
|
||||
if (window.location.href == "chrome://browser/content/hiddenWindow.xul") {
|
||||
var hiddenWindowDisabledItems = ['cmd_close', 'minimizeWindow', 'zoomWindow'];
|
||||
for (let hiddenWindowDisabledItem of hiddenWindowDisabledItems) {
|
||||
element = document.getElementById(hiddenWindowDisabledItem);
|
||||
if (element) {
|
||||
element.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
||||
// also hide the window-list separator
|
||||
element = document.getElementById("sep-window-list");
|
||||
element.setAttribute("hidden", "true");
|
||||
|
||||
// Setup the dock menu.
|
||||
let dockMenuElement = document.getElementById("menu_mac_dockmenu");
|
||||
if (dockMenuElement != null) {
|
||||
let nativeMenu = Cc["@mozilla.org/widget/standalonenativemenu;1"]
|
||||
.createInstance(Ci.nsIStandaloneNativeMenu);
|
||||
|
||||
try {
|
||||
nativeMenu.init(dockMenuElement);
|
||||
|
||||
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
|
||||
.getService(Ci.nsIMacDockSupport);
|
||||
dockSupport.dockMenu = nativeMenu;
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
document.getElementById("macDockMenuNewWindow").hidden = true;
|
||||
}
|
||||
|
||||
this._delayedStartupTimeoutId = setTimeout(this.nonBrowserWindowDelayedStartup.bind(this), 0);
|
||||
},
|
||||
|
||||
nonBrowserWindowDelayedStartup: function() {
|
||||
this._delayedStartupTimeoutId = null;
|
||||
|
||||
// initialise the offline listener
|
||||
BrowserOffline.init();
|
||||
|
||||
// Set up Sanitize Item
|
||||
this._initializeSanitizer();
|
||||
|
||||
// initialize the private browsing UI
|
||||
gPrivateBrowsingUI.init();
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
// initialize the sync UI
|
||||
gSyncUI.init();
|
||||
#endif
|
||||
},
|
||||
|
||||
nonBrowserWindowShutdown: function() {
|
||||
// If nonBrowserWindowDelayedStartup hasn't run yet, we have no work to do -
|
||||
// just cancel the pending timeout and return;
|
||||
if (this._delayedStartupTimeoutId) {
|
||||
clearTimeout(this._delayedStartupTimeoutId);
|
||||
return;
|
||||
}
|
||||
|
||||
BrowserOffline.uninit();
|
||||
},
|
||||
#endif
|
||||
|
||||
_initializeSanitizer: function() {
|
||||
const kDidSanitizeDomain = "privacy.sanitize.didShutdownSanitize";
|
||||
if (gPrefService.prefHasUserValue(kDidSanitizeDomain)) {
|
||||
|
|
@ -1597,11 +1503,6 @@ var gBrowserInit = {
|
|||
/* Legacy global init functions */
|
||||
var BrowserStartup = gBrowserInit.onLoad.bind(gBrowserInit);
|
||||
var BrowserShutdown = gBrowserInit.onUnload.bind(gBrowserInit);
|
||||
#ifdef XP_MACOSX
|
||||
var nonBrowserWindowStartup = gBrowserInit.nonBrowserWindowStartup.bind(gBrowserInit);
|
||||
var nonBrowserWindowDelayedStartup = gBrowserInit.nonBrowserWindowDelayedStartup.bind(gBrowserInit);
|
||||
var nonBrowserWindowShutdown = gBrowserInit.nonBrowserWindowShutdown.bind(gBrowserInit);
|
||||
#endif
|
||||
|
||||
function HandleAppCommandEvent(evt) {
|
||||
switch (evt.command) {
|
||||
|
|
@ -1738,11 +1639,7 @@ function BrowserStop() {
|
|||
|
||||
function BrowserReloadOrDuplicate(aEvent) {
|
||||
var backgroundTabModifier = aEvent.button == 1 ||
|
||||
#ifdef XP_MACOSX
|
||||
aEvent.metaKey;
|
||||
#else
|
||||
aEvent.ctrlKey;
|
||||
#endif
|
||||
if (aEvent.shiftKey && !backgroundTabModifier) {
|
||||
BrowserReloadSkipCache();
|
||||
return;
|
||||
|
|
@ -1801,13 +1698,6 @@ function BrowserGoHome(aEvent) {
|
|||
}
|
||||
|
||||
function loadOneOrMoreURIs(aURIString) {
|
||||
#ifdef XP_MACOSX
|
||||
// we're not a browser window, pass the URI string to a new browser window
|
||||
if (window.location.href != getBrowserURL()) {
|
||||
window.openDialog(getBrowserURL(), "_blank", "all,dialog=no", aURIString);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// This function throws for certain malformed URIs, so use exception handling
|
||||
// so that we don't disrupt startup
|
||||
try {
|
||||
|
|
@ -1834,22 +1724,6 @@ function openLocation() {
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (window.location.href != getBrowserURL()) {
|
||||
var win = getTopWin();
|
||||
if (win) {
|
||||
// If there's an open browser window, it should handle this command
|
||||
win.focus()
|
||||
win.openLocation();
|
||||
} else {
|
||||
// If there are no open browser windows, open a new one
|
||||
win = window.openDialog("chrome://browser/content/", "_blank",
|
||||
"chrome,all,dialog=no", BROWSER_NEW_TAB_URL);
|
||||
win.addEventListener("load", openLocationCallback, false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
openDialog("chrome://browser/content/openLocation.xul", "_blank",
|
||||
"chrome,modal,titlebar", window);
|
||||
}
|
||||
|
|
@ -1948,14 +1822,6 @@ function BrowserOpenFileWindow() {
|
|||
}
|
||||
|
||||
function BrowserCloseTabOrWindow() {
|
||||
#ifdef XP_MACOSX
|
||||
// If we're not a browser window, just close the window
|
||||
if (window.location.href != getBrowserURL()) {
|
||||
closeWindow(true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// If the current tab is the last one, this will close the window.
|
||||
gBrowser.removeCurrentTab({animate: true});
|
||||
}
|
||||
|
|
@ -3126,28 +2992,6 @@ const BrowserSearch = {
|
|||
* or focuses an existing window, if necessary.
|
||||
*/
|
||||
webSearch: function() {
|
||||
#ifdef XP_MACOSX
|
||||
if (window.location.href != getBrowserURL()) {
|
||||
var win = getTopWin();
|
||||
if (win) {
|
||||
// If there's an open browser window, it should handle this command
|
||||
win.focus();
|
||||
win.BrowserSearch.webSearch();
|
||||
} else {
|
||||
// If there are no open browser windows, open a new one
|
||||
var observer = function observer(subject, topic, data) {
|
||||
if (subject == win) {
|
||||
BrowserSearch.webSearch();
|
||||
Services.obs.removeObserver(observer, "browser-delayed-startup-finished");
|
||||
}
|
||||
}
|
||||
win = window.openDialog(getBrowserURL(), "_blank",
|
||||
"chrome,all,dialog=no", "about:blank");
|
||||
Services.obs.addObserver(observer, "browser-delayed-startup-finished", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
var searchBar = this.searchBar;
|
||||
if (searchBar && window.fullScreen) {
|
||||
FullScreen.showNavToolbox();
|
||||
|
|
@ -3469,9 +3313,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
|
|||
gIdentityHandler._cacheElements();
|
||||
window.XULBrowserWindow.init();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
updateEditUIVisibility();
|
||||
#endif
|
||||
|
||||
// Hacky: update the PopupNotifications' object's reference to the iconBox,
|
||||
// if it already exists, since it may have changed if the URL bar was
|
||||
|
|
@ -3576,7 +3418,6 @@ function retrieveToolbarIconsizesFromTheme() {
|
|||
* is a no op.
|
||||
*/
|
||||
function updateEditUIVisibility() {
|
||||
#ifndef XP_MACOSX
|
||||
let editMenuPopupState = document.getElementById("menu_EditPopup").state;
|
||||
let contextMenuPopupState = document.getElementById("contentAreaContextMenu").state;
|
||||
let placesContextMenuPopupState = document.getElementById("placesContext").state;
|
||||
|
|
@ -3618,7 +3459,6 @@ function updateEditUIVisibility() {
|
|||
goSetCommandEnabled("cmd_delete", true);
|
||||
goSetCommandEnabled("cmd_switchTextDirection", true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -6272,14 +6112,7 @@ function warnAboutClosingWindow() {
|
|||
|
||||
os.notifyObservers(null, "browser-lastwindow-close-granted", null);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// OS X doesn't quit the application when the last window is closed, but keeps
|
||||
// the session alive. Hence don't prompt users to save tabs, but warn about
|
||||
// closing multiple tabs.
|
||||
return isPBWindow || gBrowser.warnAboutClosingTabs(gBrowser.closingTabsEnum.ALL);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
var MailIntegration = {
|
||||
|
|
@ -7086,12 +6919,6 @@ var gPrivateBrowsingUI = {
|
|||
document.getElementById("Tools:Sanitize").setAttribute("disabled", "true");
|
||||
|
||||
if (window.location.href == getBrowserURL()) {
|
||||
#if defined(XP_MACOSX) && defined(MOZ_CAN_DRAW_IN_TITLEBAR)
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
document.documentElement.setAttribute("drawintitlebar", true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Adjust the window's title
|
||||
let docElement = document.documentElement;
|
||||
if (!PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
|
|
@ -7562,9 +7389,6 @@ var ToolbarIconColor = {
|
|||
}
|
||||
|
||||
let toolbarSelector = "toolbar:not([collapsed=true])";
|
||||
#ifdef XP_MACOSX
|
||||
toolbarSelector += ":not([type=menubar])";
|
||||
#endif
|
||||
|
||||
// The getComputedStyle calls and setting the brighttext are separated in
|
||||
// two loops to avoid flushing layout and making it dirty repeatedly.
|
||||
|
|
|
|||
|
|
@ -40,18 +40,10 @@
|
|||
onload="gBrowserInit.onLoad()" onunload="gBrowserInit.onUnload()" onclose="return WindowIsClosing();"
|
||||
title="&mainWindow.title;"
|
||||
title_normal="&mainWindow.title;"
|
||||
#ifdef XP_MACOSX
|
||||
title_privatebrowsing="&mainWindow.title;&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
|
||||
titledefault="&mainWindow.title;"
|
||||
titlemodifier=""
|
||||
titlemodifier_normal=""
|
||||
titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
|
||||
#else
|
||||
title_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
|
||||
titlemodifier="&mainWindow.titlemodifier;"
|
||||
titlemodifier_normal="&mainWindow.titlemodifier;"
|
||||
titlemodifier_privatebrowsing="&mainWindow.titlemodifier; &mainWindow.titlePrivateBrowsingSuffix;"
|
||||
#endif
|
||||
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
|
||||
#ifdef MOZ_PERSONAS
|
||||
lightweightthemes="true"
|
||||
|
|
@ -302,20 +294,12 @@
|
|||
|
||||
<tooltip id="back-button-tooltip">
|
||||
<label class="tooltip-label" value="&backButton.tooltip;"/>
|
||||
#ifdef XP_MACOSX
|
||||
<label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
|
||||
#else
|
||||
<label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
|
||||
#endif
|
||||
</tooltip>
|
||||
|
||||
<tooltip id="forward-button-tooltip">
|
||||
<label class="tooltip-label" value="&forwardButton.tooltip;"/>
|
||||
#ifdef XP_MACOSX
|
||||
<label class="tooltip-label" value="&backForwardButtonMenuMac.tooltip;"/>
|
||||
#else
|
||||
<label class="tooltip-label" value="&backForwardButtonMenu.tooltip;"/>
|
||||
#endif
|
||||
</tooltip>
|
||||
|
||||
#include popup-notifications.inc
|
||||
|
|
@ -336,9 +320,7 @@
|
|||
</button>
|
||||
</hbox>
|
||||
#endif
|
||||
#ifndef XP_MACOSX
|
||||
<spacer id="titlebar-spacer" flex="1"/>
|
||||
#endif
|
||||
<hbox id="titlebar-buttonbox-container" align="start">
|
||||
<hbox id="titlebar-buttonbox">
|
||||
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
|
||||
|
|
@ -581,32 +563,24 @@
|
|||
label="&viewBookmarksToolbar.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_bookmarksShowAll"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&organizeBookmarks.label;"
|
||||
command="Browser:ShowAllBookmarks"
|
||||
key="manBookmarkKb"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="BMB_bookmarkThisPage"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&bookmarkThisPageCmd.label;"
|
||||
command="Browser:AddBookmarkAs"
|
||||
key="addBookmarkAsKb"/>
|
||||
<menuitem id="BMB_subscribeToPageMenuitem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenuitem.label;"
|
||||
oncommand="return FeedHandler.subscribeToFeed(null, event);"
|
||||
onclick="checkForMiddleClick(this, event);"
|
||||
observes="singleFeedMenuitemState"/>
|
||||
<menu id="BMB_subscribeToPageMenupopup"
|
||||
#ifndef XP_MACOSX
|
||||
class="menu-iconic"
|
||||
#endif
|
||||
label="&subscribeToPageMenupopup.label;"
|
||||
observes="multipleFeedsMenuState">
|
||||
<menupopup id="BMB_subscribeToPageSubmenuMenupopup"
|
||||
|
|
@ -658,15 +632,11 @@
|
|||
popupsinherittooltip="true">
|
||||
<menuitem id="HMB_showAllHistory"
|
||||
label="&showAllHistoryCmd2.label;"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
key="showAllHistoryKb"
|
||||
#endif
|
||||
command="Browser:ShowAllHistory"/>
|
||||
<menuitem id="HMB_sanitizeItem"
|
||||
#ifndef XP_MACOSX
|
||||
class="menuitem-iconic"
|
||||
#endif
|
||||
label="&clearRecentHistory.label;"
|
||||
key="key_sanitize"
|
||||
command="Tools:Sanitize"/>
|
||||
|
|
@ -1012,28 +982,6 @@
|
|||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
<svg:svg height="0">
|
||||
<svg:clipPath id="osx-keyhole-forward-clip-path" clipPathUnits="objectBoundingBox">
|
||||
<svg:path d="M 0,0 C 0.15,0.12 0.25,0.3 0.25,0.5 0.25,0.7 0.15,0.88 0,1 L 1,1 1,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,-5 0,4.03 C 3.6,1.8 6,6.1 6,11 6,16 3.6,20 0,23 l 0,27 10000,0 0,-55 L 0,-5 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="M 9,0 C 7.3,0 6,1.3 6,3 l 0,14 c 0,3 -2.2,5 -5,5 l -1,0 0,1 12,0 0,-1 0,-19 0,-3 -3,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-ontop-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,3 0,19 0,1 12,0 0,-1 -1,0 C 8.2,22 6,20 6,17 L 6,3 C 6,1.3 4.7,0 3,0 L 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-left-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 1,0 c 2.8,0 5,2.2 5,5 l 0,14 c 0,2 1.3,3 3,3 l 3,0 0,-3 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
<svg:clipPath id="osx-tab-onbottom-right-curve-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:path d="m 0,0 0,1 0,19 0,3 3,0 c 1.7,0 3,-1 3,-3 L 6,6 C 6,3.2 8.2,1 11,1 L 12,1 12,0 0,0 z"/>
|
||||
</svg:clipPath>
|
||||
</svg:svg>
|
||||
#endif
|
||||
|
||||
</vbox>
|
||||
# <iframe id="tab-view"> is dynamically appended as the 2nd child of #tab-view-deck.
|
||||
|
|
|
|||
|
|
@ -5,15 +5,3 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
|
||||
<window id="main-window"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
#include browserMountPoints.inc
|
||||
|
||||
</window>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -986,26 +986,10 @@ nsContextMenu.prototype = {
|
|||
|
||||
// Confirm since it's annoying if you hit this accidentally.
|
||||
const kDesktopBackgroundURL = "chrome://browser/content/setDesktopBackground.xul";
|
||||
#ifdef XP_MACOSX
|
||||
// On Mac, the Set Desktop Background window is not modal.
|
||||
// Don't open more than one Set Desktop Background window.
|
||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var dbWin = wm.getMostRecentWindow("Shell:SetDesktopBackground");
|
||||
if (dbWin) {
|
||||
dbWin.gSetBackground.init(this.target);
|
||||
dbWin.focus();
|
||||
} else {
|
||||
openDialog(kDesktopBackgroundURL, "",
|
||||
"centerscreen,chrome,dialog=no,dependent,resizable=no",
|
||||
this.target);
|
||||
}
|
||||
#else
|
||||
// On non-Mac platforms, the Set Wallpaper dialog is modal.
|
||||
// The Set Wallpaper dialog is modal.
|
||||
openDialog(kDesktopBackgroundURL, "",
|
||||
"centerscreen,chrome,dialog,modal,dependent",
|
||||
this.target);
|
||||
#endif
|
||||
},
|
||||
|
||||
// Save URL of clicked-on frame.
|
||||
|
|
|
|||
|
|
@ -476,11 +476,7 @@ Sanitizer.__defineGetter__("prefs", function() {
|
|||
Sanitizer.showUI = function(aParentWindow) {
|
||||
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
|
||||
.getService(Components.interfaces.nsIWindowWatcher);
|
||||
#ifdef XP_MACOSX
|
||||
ww.openWindow(null, // make this an app-modal window on Mac
|
||||
#else
|
||||
ww.openWindow(aParentWindow,
|
||||
#endif
|
||||
"chrome://browser/content/sanitize.xul",
|
||||
"Sanitize",
|
||||
"chrome,titlebar,dialog,centerscreen,modal",
|
||||
|
|
|
|||
|
|
@ -113,11 +113,7 @@
|
|||
new Map();
|
||||
</field>
|
||||
<field name="arrowKeysShouldWrap" readonly="true">
|
||||
#ifdef XP_MACOSX
|
||||
true
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
</field>
|
||||
|
||||
<field name="_autoScrollPopup">
|
||||
|
|
@ -3151,22 +3147,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (!aEvent.metaKey)
|
||||
return;
|
||||
|
||||
var offset = 1;
|
||||
switch (aEvent.charCode) {
|
||||
case '}'.charCodeAt(0):
|
||||
offset = -1;
|
||||
case '{'.charCodeAt(0):
|
||||
if (window.getComputedStyle(this, null).direction == "ltr")
|
||||
offset *= -1;
|
||||
this.tabContainer.advanceSelectedTab(offset, true);
|
||||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
#else
|
||||
if (aEvent.ctrlKey && !aEvent.shiftKey && !aEvent.metaKey &&
|
||||
aEvent.keyCode == KeyEvent.DOM_VK_F4 &&
|
||||
!this.mCurrentTab.pinned) {
|
||||
|
|
@ -3174,7 +3154,6 @@
|
|||
aEvent.stopPropagation();
|
||||
aEvent.preventDefault();
|
||||
}
|
||||
#endif
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
@ -3612,9 +3591,7 @@
|
|||
</xul:hbox>
|
||||
<xul:arrowscrollbox anonid="arrowscrollbox" orient="horizontal" flex="1"
|
||||
style="min-width: 1px;"
|
||||
#ifndef XP_MACOSX
|
||||
clicktoscroll="true"
|
||||
#endif
|
||||
class="tabbrowser-arrowscrollbox">
|
||||
# This is a hack to circumvent bug 472020, otherwise the tabs show up on the
|
||||
# right of the newtab button.
|
||||
|
|
@ -4300,11 +4277,7 @@
|
|||
PrivateBrowsingUtils.isWindowPrivate(sourceNode.ownerDocument.defaultView))
|
||||
return dt.effectAllowed = "none";
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
return dt.effectAllowed = event.altKey ? "copy" : "move";
|
||||
#else
|
||||
return dt.effectAllowed = event.ctrlKey ? "copy" : "move";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4462,14 +4435,12 @@
|
|||
]]></handler>
|
||||
|
||||
<handler event="dblclick"><![CDATA[
|
||||
#ifndef XP_MACOSX
|
||||
// When the tabbar has an unified appearance with the titlebar
|
||||
// and menubar, a double-click in it should have the same behavior
|
||||
// as double-clicking the titlebar
|
||||
if (TabsInTitlebar.enabled ||
|
||||
(TabsOnTop.enabled && this.parentNode._dragBindingAlive))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (event.button != 0 ||
|
||||
event.originalTarget.localName != "box")
|
||||
|
|
@ -4559,11 +4530,7 @@
|
|||
|
||||
<handler event="keypress"><![CDATA[
|
||||
if (event.altKey || event.shiftKey ||
|
||||
#ifdef XP_MACOSX
|
||||
!event.metaKey)
|
||||
#else
|
||||
!event.ctrlKey || event.metaKey)
|
||||
#endif
|
||||
return;
|
||||
|
||||
switch (event.keyCode) {
|
||||
|
|
|
|||
|
|
@ -375,11 +375,7 @@
|
|||
// and only if we get a keyboard event, to match user expectations.
|
||||
if (/^\s*[^.:\/\s]+(?:\/.*|\s*)$/i.test(url) &&
|
||||
(aTriggeringEvent instanceof KeyEvent)) {
|
||||
#ifdef XP_MACOSX
|
||||
let accel = aTriggeringEvent.metaKey;
|
||||
#else
|
||||
let accel = aTriggeringEvent.ctrlKey;
|
||||
#endif
|
||||
let shift = aTriggeringEvent.shiftKey;
|
||||
|
||||
let suffix = "";
|
||||
|
|
|
|||
|
|
@ -167,11 +167,7 @@ function whereToOpenLink(e, ignoreButton, ignoreAlt) {
|
|||
|
||||
// Don't do anything special with right-mouse clicks. They're probably clicks on context menu items.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (meta || (middle && middleUsesTabs)) {
|
||||
#else
|
||||
if (ctrl || (middle && middleUsesTabs)) {
|
||||
#endif
|
||||
return shift ? "tabshifted" : "tab";
|
||||
}
|
||||
|
||||
|
|
@ -664,7 +660,6 @@ function buildHelpMenu() {
|
|||
}
|
||||
}
|
||||
#else
|
||||
#ifndef XP_MACOSX
|
||||
// Some extensions may rely on these being present so only hide the about
|
||||
// separator when there are no elements besides the check for updates menuitem
|
||||
// in between the about separator and the updates separator.
|
||||
|
|
@ -676,7 +671,6 @@ function buildHelpMenu() {
|
|||
updatesSeparator.hidden = true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -691,8 +685,6 @@ function openAboutDialog() {
|
|||
|
||||
#ifdef XP_WIN
|
||||
var features = "chrome,centerscreen,dependent";
|
||||
#elifdef XP_MACOSX
|
||||
var features = "chrome,resizable=no,minimizable=no";
|
||||
#else
|
||||
var features = "chrome,centerscreen,dependent,dialog=no";
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
</window>
|
||||
|
||||
<menubar id="viewSource-main-menubar">
|
||||
#ifdef XP_MACOSX
|
||||
<menu id="windowMenu"/>
|
||||
<menupopup id="menu_ToolsPopup"/>
|
||||
#endif
|
||||
<menu id="helpMenu"/>
|
||||
</menubar>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
browser.jar:
|
||||
% content browser %content/browser/ contentaccessible=yes
|
||||
#ifdef XP_MACOSX
|
||||
% overlay chrome://mozapps/content/downloads/downloads.xul chrome://browser/content/downloadManagerOverlay.xul
|
||||
% overlay chrome://global/content/console.xul chrome://browser/content/jsConsoleOverlay.xul
|
||||
% overlay chrome://mozapps/content/update/updates.xul chrome://browser/content/softwareUpdateOverlay.xul
|
||||
#endif
|
||||
#ifdef XP_WIN
|
||||
% overlay chrome://browser/content/browser.xul chrome://browser/content/win6BrowserOverlay.xul os=WINNT osversion>=6
|
||||
#endif
|
||||
|
|
@ -66,12 +61,6 @@ browser.jar:
|
|||
* content/browser/nsContextMenu.js (content/nsContextMenu.js)
|
||||
# XXX: We should exclude this one as well (bug 71895)
|
||||
* content/browser/hiddenWindow.xul (content/hiddenWindow.xul)
|
||||
#ifdef XP_MACOSX
|
||||
* content/browser/macBrowserOverlay.xul (content/macBrowserOverlay.xul)
|
||||
* content/browser/downloadManagerOverlay.xul (content/downloadManagerOverlay.xul)
|
||||
* content/browser/jsConsoleOverlay.xul (content/jsConsoleOverlay.xul)
|
||||
* content/browser/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul)
|
||||
#endif
|
||||
* content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul)
|
||||
#ifdef XP_WIN
|
||||
content/browser/win6BrowserOverlay.xul (content/win6BrowserOverlay.xul)
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
|
||||
#if defined(XP_WIN)
|
||||
#include "nsWindowsShellService.h"
|
||||
#elif defined(XP_MACOSX)
|
||||
#include "nsMacShellService.h"
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include "nsGNOMEShellService.h"
|
||||
#endif
|
||||
|
|
@ -28,8 +26,6 @@ using namespace mozilla::browser;
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(DirectoryProvider)
|
||||
#if defined(XP_WIN)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
|
||||
#elif defined(XP_MACOSX)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
|
||||
#endif
|
||||
|
|
@ -43,9 +39,6 @@ NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
||||
#endif
|
||||
NS_DEFINE_NAMED_CID(NS_FEEDSNIFFER_CID);
|
||||
#ifdef XP_MACOSX
|
||||
NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
|
||||
#endif
|
||||
|
||||
static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
||||
{ &kNS_BROWSERDIRECTORYPROVIDER_CID, false, nullptr, DirectoryProviderConstructor },
|
||||
|
|
@ -55,9 +48,6 @@ static const mozilla::Module::CIDEntry kBrowserCIDs[] = {
|
|||
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsGNOMEShellServiceConstructor },
|
||||
#endif
|
||||
{ &kNS_FEEDSNIFFER_CID, false, nullptr, nsFeedSnifferConstructor },
|
||||
#ifdef XP_MACOSX
|
||||
{ &kNS_SHELLSERVICE_CID, false, nullptr, nsMacShellServiceConstructor },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
@ -69,9 +59,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
|
|||
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
|
||||
#endif
|
||||
{ NS_FEEDSNIFFER_CONTRACTID, &kNS_FEEDSNIFFER_CID },
|
||||
#ifdef XP_MACOSX
|
||||
{ NS_SHELLSERVICE_CONTRACTID, &kNS_SHELLSERVICE_CID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -92,13 +92,8 @@
|
|||
accesskey="&cmd.removeFromHistory.accesskey;"/>
|
||||
<menuitem command="downloadsCmd_show"
|
||||
class="downloadShowMenuItem"
|
||||
#ifdef XP_MACOSX
|
||||
label="&cmd.showMac.label;"
|
||||
accesskey="&cmd.showMac.accesskey;"
|
||||
#else
|
||||
label="&cmd.show.label;"
|
||||
accesskey="&cmd.show.accesskey;"
|
||||
#endif
|
||||
/>
|
||||
|
||||
<menuseparator class="downloadCommandsSeparator"/>
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@
|
|||
<commandset id="editMenuCommands"/>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<stack flex="1">
|
||||
|
|
|
|||
|
|
@ -53,11 +53,7 @@
|
|||
tooltiptext="&cmd.retry.label;"
|
||||
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_retry');"/>
|
||||
<xul:button class="downloadButton downloadShow"
|
||||
#ifdef XP_MACOSX
|
||||
tooltiptext="&cmd.showMac.label;"
|
||||
#else
|
||||
tooltiptext="&cmd.show.label;"
|
||||
#endif
|
||||
oncommand="DownloadsView.onDownloadCommand(event, 'downloadsCmd_show');"/>
|
||||
</xul:stack>
|
||||
</content>
|
||||
|
|
@ -136,11 +132,7 @@
|
|||
tooltiptext="&cmd.retry.label;"
|
||||
oncommand="goDoCommand('downloadsCmd_retry')"/>
|
||||
<xul:button class="downloadButton downloadShow"
|
||||
#ifdef XP_MACOSX
|
||||
tooltiptext="&cmd.showMac.label;"
|
||||
#else
|
||||
tooltiptext="&cmd.show.label;"
|
||||
#endif
|
||||
oncommand="goDoCommand('downloadsCmd_show')"/>
|
||||
|
||||
</content>
|
||||
|
|
|
|||
|
|
@ -475,11 +475,7 @@ const DownloadsPanel = {
|
|||
}
|
||||
|
||||
let pasting = aEvent.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_V &&
|
||||
#ifdef XP_MACOSX
|
||||
aEvent.metaKey;
|
||||
#else
|
||||
aEvent.ctrlKey;
|
||||
#endif
|
||||
|
||||
if (!pasting) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -71,13 +71,8 @@
|
|||
accesskey="&cmd.removeFromHistory.accesskey;"/>
|
||||
<menuitem command="downloadsCmd_show"
|
||||
class="downloadShowMenuItem"
|
||||
#ifdef XP_MACOSX
|
||||
label="&cmd.showMac.label;"
|
||||
accesskey="&cmd.showMac.accesskey;"
|
||||
#else
|
||||
label="&cmd.show.label;"
|
||||
accesskey="&cmd.show.accesskey;"
|
||||
#endif
|
||||
/>
|
||||
|
||||
<menuseparator class="downloadCommandsSeparator"/>
|
||||
|
|
|
|||
|
|
@ -675,13 +675,6 @@ FeedWriter.prototype = {
|
|||
return file.getVersionInfoField("FileDescription");
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (file instanceof Ci.nsILocalFileMac) {
|
||||
try {
|
||||
return file.bundleDisplayName;
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
return file.leafName;
|
||||
},
|
||||
|
|
@ -733,11 +726,7 @@ FeedWriter.prototype = {
|
|||
#ifdef XP_WIN
|
||||
#expand if (fp.file.leafName != "__MOZ_APP_NAME__.exe") {
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
#expand if (fp.file.leafName != "__MOZ_MACBUNDLE_NAME__") {
|
||||
#else
|
||||
#expand if (fp.file.leafName != "__MOZ_APP_NAME__-bin") {
|
||||
#endif
|
||||
#endif
|
||||
this._initMenuItemWithFile(this._contentSandbox.selectedAppMenuItem,
|
||||
this._selectedApp);
|
||||
|
|
|
|||
|
|
@ -124,12 +124,6 @@ var gPage = {
|
|||
|
||||
// Initialize the drop target shim.
|
||||
gDropTargetShim.init();
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Workaround to prevent a delay on MacOSX due to a slow drop animation.
|
||||
document.addEventListener("dragover", this, false);
|
||||
document.addEventListener("drop", this, false);
|
||||
#endif
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -97,11 +97,9 @@ function BrowserGlue() {
|
|||
this._init();
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
# OS X has the concept of zero-window sessions and therefore ignores the
|
||||
# browser-lastwindow-close-* topics.
|
||||
# We don't have the concept of zero-window sessions on any supported OS-es
|
||||
# and therefore have to observe the browser-lastwindow-close-* topics.
|
||||
#define OBSERVE_LASTWINDOW_CLOSE_TOPICS 1
|
||||
#endif
|
||||
|
||||
BrowserGlue.prototype = {
|
||||
_saveSession: false,
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@
|
|||
%pageInfoDTD;
|
||||
]>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<window id="main-window"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="Browser:page-info"
|
||||
|
|
@ -66,11 +62,7 @@
|
|||
<keyset id="pageInfoKeySet">
|
||||
<key key="&closeWindow.key;" modifiers="accel" command="cmd_close"/>
|
||||
<key keycode="VK_ESCAPE" command="cmd_close"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key key="." modifiers="meta" command="cmd_close"/>
|
||||
#else
|
||||
<key keycode="VK_F1" command="cmd_help"/>
|
||||
#endif
|
||||
<key key="©.key;" modifiers="accel" command="cmd_copy"/>
|
||||
<key key="&selectall.key;" modifiers="accel" command="cmd_selectall"/>
|
||||
<key key="&selectall.key;" modifiers="alt" command="cmd_selectall"/>
|
||||
|
|
@ -500,8 +492,4 @@
|
|||
<!-- Others added by overlay -->
|
||||
</deck>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</window>
|
||||
|
|
|
|||
|
|
@ -312,12 +312,6 @@ PlacesViewBase.prototype = {
|
|||
PlacesUtils.livemarks.getLivemark({ id: itemId })
|
||||
.then(aLivemark => {
|
||||
element.setAttribute("livemark", "true");
|
||||
#ifdef XP_MACOSX
|
||||
// OS X native menubar doesn't track list-style-images since
|
||||
// it doesn't have a frame (bug 733415). Thus enforce updating.
|
||||
element.setAttribute("image", "");
|
||||
element.removeAttribute("image");
|
||||
#endif
|
||||
this.controller.cacheLivemarkInfo(aPlacesNode, aLivemark);
|
||||
}, () => undefined);
|
||||
}
|
||||
|
|
@ -329,10 +323,6 @@ PlacesViewBase.prototype = {
|
|||
popup.setAttribute("placespopup", "true");
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// No context menu on mac.
|
||||
popup.setAttribute("context", "placesContext");
|
||||
#endif
|
||||
element.appendChild(popup);
|
||||
element.className = "menu-iconic bookmark-item";
|
||||
|
||||
|
|
@ -486,12 +476,6 @@ PlacesViewBase.prototype = {
|
|||
let menu = elt.parentNode;
|
||||
if (!menu.hasAttribute("livemark")) {
|
||||
menu.setAttribute("livemark", "true");
|
||||
#ifdef XP_MACOSX
|
||||
// OS X native menubar doesn't track list-style-images since
|
||||
// it doesn't have a frame (bug 733415). Thus enforce updating.
|
||||
menu.setAttribute("image", "");
|
||||
menu.removeAttribute("image");
|
||||
#endif
|
||||
}
|
||||
|
||||
PlacesUtils.livemarks.getLivemark({ id: aPlacesNode.itemId })
|
||||
|
|
@ -999,9 +983,7 @@ PlacesToolbar.prototype = {
|
|||
popup.setAttribute("placespopup", "true");
|
||||
button.appendChild(popup);
|
||||
popup._placesNode = PlacesUtils.asContainer(aChild);
|
||||
#ifndef XP_MACOSX
|
||||
popup.setAttribute("context", "placesContext");
|
||||
#endif
|
||||
|
||||
this._domNodes.set(aChild, popup);
|
||||
}
|
||||
|
|
@ -1679,16 +1661,6 @@ function PlacesMenu(aPopupShowingEvent, aPlace) {
|
|||
this._addEventListeners(this._rootElt, ["popupshowing", "popuphidden"], true);
|
||||
this._addEventListeners(window, ["unload"], false);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Must walk up to support views in sub-menus, like Bookmarks Toolbar menu.
|
||||
for (let elt = this._viewElt.parentNode; elt; elt = elt.parentNode) {
|
||||
if (elt.localName == "menubar") {
|
||||
this._nativeView = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
PlacesViewBase.call(this, aPlace);
|
||||
this._onPopupShowing(aPopupShowingEvent);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@
|
|||
|
||||
<toolbar id="placesToolbar">
|
||||
<toolbarbutton id="clearDownloadsButton"
|
||||
#ifdef XP_MACOSX
|
||||
class="tabbable"
|
||||
#endif
|
||||
insertbefore="libraryToolbarSpacer"
|
||||
label="&clearDownloadsButton.label;"
|
||||
command="downloadsCmd_clearDownloads"
|
||||
|
|
|
|||
|
|
@ -33,9 +33,6 @@
|
|||
<commandset id="placesCommands"/>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<!-- required to overlay the context menu -->
|
||||
|
|
|
|||
|
|
@ -304,19 +304,6 @@
|
|||
if (elt.parentNode != this)
|
||||
return;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// XXX: The following check is a temporary hack until bug 420033 is
|
||||
// resolved.
|
||||
let parentElt = elt.parent;
|
||||
while (parentElt) {
|
||||
if (parentElt.id == "bookmarksMenuPopup" ||
|
||||
parentElt.id == "goPopup")
|
||||
return;
|
||||
|
||||
parentElt = parentElt.parentNode;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (window.XULBrowserWindow) {
|
||||
let elt = event.target;
|
||||
let placesNode = elt._placesNode;
|
||||
|
|
|
|||
|
|
@ -62,27 +62,6 @@ var PlacesOrganizer = {
|
|||
PlacesSearchBox.init();
|
||||
|
||||
window.addEventListener("AppCommand", this, true);
|
||||
#ifdef XP_MACOSX
|
||||
// 1. Map Edit->Find command to OrganizerCommand_find:all. Need to map
|
||||
// both the menuitem and the Find key.
|
||||
var findMenuItem = document.getElementById("menu_find");
|
||||
findMenuItem.setAttribute("command", "OrganizerCommand_find:all");
|
||||
var findKey = document.getElementById("key_find");
|
||||
findKey.setAttribute("command", "OrganizerCommand_find:all");
|
||||
|
||||
// 2. Disable some keybindings from browser.xul
|
||||
var elements = ["cmd_handleBackspace", "cmd_handleShiftBackspace"];
|
||||
for (var i=0; i < elements.length; i++) {
|
||||
document.getElementById(elements[i]).setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
// 3. Disable the keyboard shortcut for the History menu back/forward
|
||||
// in order to support those in the Library
|
||||
var historyMenuBack = document.getElementById("historyMenuBack");
|
||||
historyMenuBack.removeAttribute("key");
|
||||
var historyMenuForward = document.getElementById("historyMenuForward");
|
||||
historyMenuForward.removeAttribute("key");
|
||||
#endif
|
||||
|
||||
// remove the "Properties" context-menu item, we've our own details pane
|
||||
document.getElementById("placesContext")
|
||||
|
|
|
|||
|
|
@ -13,13 +13,9 @@
|
|||
|
||||
<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#else
|
||||
<?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
|
||||
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE window [
|
||||
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
|
||||
|
|
@ -53,12 +49,8 @@
|
|||
<stringbundle id="brandStrings" src="chrome://branding/locale/brand.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#else
|
||||
<commandset id="editMenuCommands"/>
|
||||
<commandset id="placesCommands"/>
|
||||
#endif
|
||||
<keyset id="placesCommandKeys"/>
|
||||
|
||||
<commandset id="organizerCommandSet">
|
||||
|
|
@ -94,7 +86,6 @@
|
|||
modifiers="accel"/>
|
||||
|
||||
<!-- Back/Forward Keys Support -->
|
||||
#ifndef XP_MACOSX
|
||||
<key id="placesKey_goBackKb"
|
||||
keycode="VK_LEFT"
|
||||
command="OrganizerCommand:Back"
|
||||
|
|
@ -103,16 +94,6 @@
|
|||
keycode="VK_RIGHT"
|
||||
command="OrganizerCommand:Forward"
|
||||
modifiers="alt"/>
|
||||
#else
|
||||
<key id="placesKey_goBackKb"
|
||||
keycode="VK_LEFT"
|
||||
command="OrganizerCommand:Back"
|
||||
modifiers="accel"/>
|
||||
<key id="placesKey_goForwardKb"
|
||||
keycode="VK_RIGHT"
|
||||
command="OrganizerCommand:Forward"
|
||||
modifiers="accel"/>
|
||||
#endif
|
||||
#ifdef XP_UNIX
|
||||
<key id="placesKey_goBackKb2"
|
||||
key="&goBackCmd.commandKey;"
|
||||
|
|
@ -126,9 +107,6 @@
|
|||
</keyset>
|
||||
|
||||
<keyset id="editMenuKeys">
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
|
||||
#endif
|
||||
</keyset>
|
||||
|
||||
<popupset id="placesPopupset">
|
||||
|
|
@ -150,17 +128,12 @@
|
|||
tooltiptext="&forwardButton.tooltip;"
|
||||
disabled="true"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
onpopupshowing="document.getElementById('placeContent').focus()"
|
||||
#else
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
<menubar id="placesMenu" _moz-menubarkeeplocal="true">
|
||||
#else
|
||||
<menubar id="placesMenu">
|
||||
#endif
|
||||
<menu accesskey="&organize.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="organizeButton" label="&organize.label;"
|
||||
tooltiptext="&organize.tooltip;">
|
||||
<menupopup id="organizeButtonPopup">
|
||||
|
|
@ -177,7 +150,6 @@
|
|||
label="&cmd.new_separator.label;"
|
||||
accesskey="&cmd.new_separator.accesskey;"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<menuseparator id="orgUndoSeparator"/>
|
||||
|
||||
<menuitem id="orgUndo"
|
||||
|
|
@ -225,20 +197,12 @@
|
|||
key="key_selectAll"
|
||||
accesskey="&selectAllCmd.accesskey;"/>
|
||||
|
||||
#endif
|
||||
<menuseparator id="orgMoveSeparator"/>
|
||||
|
||||
<menuitem id="orgMoveBookmarks"
|
||||
command="placesCmd_moveBookmarks"
|
||||
label="&cmd.moveBookmarks.label;"
|
||||
accesskey="&cmd.moveBookmarks.accesskey;"/>
|
||||
#ifdef XP_MACOSX
|
||||
<menuitem id="orgDelete"
|
||||
command="cmd_delete"
|
||||
label="&deleteCmd.label;"
|
||||
key="key_delete"
|
||||
accesskey="&deleteCmd.accesskey;"/>
|
||||
#else
|
||||
<menuseparator id="orgCloseSeparator"/>
|
||||
|
||||
<menuitem id="orgClose"
|
||||
|
|
@ -246,15 +210,9 @@
|
|||
label="&file.close.label;"
|
||||
accesskey="&file.close.accesskey;"
|
||||
oncommand="close();"/>
|
||||
#endif
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
#else
|
||||
</menu>
|
||||
<menu accesskey="&views.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="viewMenu" label="&views.label;"
|
||||
tooltiptext="&views.tooltip;">
|
||||
<menupopup id="viewMenuPopup">
|
||||
|
|
@ -282,13 +240,8 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
<toolbarbutton type="menu" class="tabbable"
|
||||
#else
|
||||
</menu>
|
||||
<menu accesskey="&maintenance.accesskey;" class="menu-iconic"
|
||||
#endif
|
||||
id="maintenanceButton" label="&maintenance.label;"
|
||||
tooltiptext="&maintenance.tooltip;">
|
||||
<menupopup id="maintenanceButtonPopup">
|
||||
|
|
@ -315,12 +268,8 @@
|
|||
label="&exportBookmarksToHTML.label;"
|
||||
accesskey="&exportBookmarksToHTML.accesskey;"/>
|
||||
</menupopup>
|
||||
#ifdef XP_MACOSX
|
||||
</toolbarbutton>
|
||||
#else
|
||||
</menu>
|
||||
</menubar>
|
||||
#endif
|
||||
|
||||
<spacer id="libraryToolbarSpacer" flex="1"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@ var SidebarUtils = {
|
|||
mouseInGutter = aEvent.clientX < rect.x;
|
||||
}
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
var modifKey = aEvent.metaKey || aEvent.shiftKey;
|
||||
#else
|
||||
var modifKey = aEvent.ctrlKey || aEvent.shiftKey;
|
||||
#endif
|
||||
|
||||
var isContainer = tbo.view.isContainer(cell.row);
|
||||
var openInTabs = isContainer &&
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
#endif
|
||||
|
||||
var gAppManagerDialog = {
|
||||
_removed: [],
|
||||
|
||||
|
|
|
|||
|
|
@ -95,13 +95,6 @@ function getFileDisplayName(file) {
|
|||
return file.getVersionInfoField("FileDescription");
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
if (file instanceof Ci.nsILocalFileMac) {
|
||||
try {
|
||||
return file.bundleDisplayName;
|
||||
} catch (e) {}
|
||||
}
|
||||
#endif
|
||||
return file.leafName;
|
||||
}
|
||||
|
|
@ -1332,11 +1325,7 @@ var gApplicationsPane = {
|
|||
#ifdef XP_WIN
|
||||
#expand aExecutable.leafName != "__MOZ_APP_NAME__.exe";
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
#expand aExecutable.leafName != "__MOZ_MACBUNDLE_NAME__";
|
||||
#else
|
||||
#expand aExecutable.leafName != "__MOZ_APP_NAME__-bin";
|
||||
#endif
|
||||
#endif
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/colors.dtd" >
|
||||
|
||||
|
|
@ -17,11 +14,7 @@
|
|||
title="&colorsDialog.title;"
|
||||
dlgbuttons="accept,cancel,help"
|
||||
ondialoghelp="openPrefsHelp()"
|
||||
#ifdef XP_MACOSX
|
||||
style="width: &window.macWidth; !important;">
|
||||
#else
|
||||
style="width: &window.width; !important;">
|
||||
#endif
|
||||
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
<prefpane id="ColorsDialogPane"
|
||||
|
|
|
|||
|
|
@ -16,11 +16,7 @@
|
|||
onbeforeaccept="return gConnectionsDialog.beforeAccept();"
|
||||
onload="gConnectionsDialog.checkForSystemProxy();"
|
||||
ondialoghelp="openPrefsHelp()"
|
||||
#ifdef XP_MACOSX
|
||||
style="width: &window.macWidth; !important;">
|
||||
#else
|
||||
style="width: &window.width; !important;">
|
||||
#endif
|
||||
|
||||
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -734,11 +734,7 @@ var gCookiesWindow = {
|
|||
},
|
||||
|
||||
onCookieKeyPress: function(aEvent) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
|
||||
this.deleteCookie();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -96,10 +96,8 @@
|
|||
<button id="removeAllCookies" disabled="true" icon="clear"
|
||||
oncommand="gCookiesWindow.deleteAllCookies();"/>
|
||||
<spacer flex="1"/>
|
||||
#ifndef XP_MACOSX
|
||||
<button oncommand="close();" icon="close"
|
||||
label="&button.close.label;" accesskey="&button.close.accesskey;"/>
|
||||
#endif
|
||||
</hbox>
|
||||
<resizer type="window" dir="bottomend"/>
|
||||
</hbox>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/fonts.dtd" >
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/languages.dtd">
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
#ifdef XP_MACOSX
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
|
||||
#endif
|
||||
|
||||
<prefwindow id="LanguagesDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
|
|
|
|||
|
|
@ -147,13 +147,8 @@
|
|||
onsyncfrompreference="return gMainPane.displayDownloadDirPref();"
|
||||
onsynctopreference="return gMainPane.getFolderListPref()"/>
|
||||
<button id="chooseFolder" oncommand="gMainPane.chooseFolder();"
|
||||
#ifdef XP_MACOSX
|
||||
accesskey="&chooseFolderMac.accesskey;"
|
||||
label="&chooseFolderMac.label;"
|
||||
#else
|
||||
accesskey="&chooseFolderWin.accesskey;"
|
||||
label="&chooseFolderWin.label;"
|
||||
#endif
|
||||
preference="browser.download.folderList"
|
||||
onsynctopreference="return gMainPane.getFolderListPref();"/>
|
||||
</hbox>
|
||||
|
|
|
|||
|
|
@ -347,11 +347,7 @@ var gPermissionManager = {
|
|||
|
||||
onPermissionKeyPress: function (aEvent)
|
||||
{
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE
|
||||
#ifdef XP_MACOSX
|
||||
|| aEvent.keyCode == KeyEvent.DOM_VK_BACK_SPACE
|
||||
#endif
|
||||
) {
|
||||
if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) {
|
||||
this.onPermissionDeleted();
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -28,10 +28,6 @@
|
|||
#define USE_WIN_TITLE_STYLE
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<prefwindow type="prefwindow"
|
||||
id="BrowserPreferences"
|
||||
windowtype="Browser:Preferences"
|
||||
|
|
@ -40,20 +36,14 @@
|
|||
title="&prefWindow.titleWin;"
|
||||
#else
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
title="&prefWindow.titleGNOME;"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
#ifdef USE_WIN_TITLE_STYLE
|
||||
style="&prefWinMinSize.styleWin2;"
|
||||
#else
|
||||
#ifdef XP_MACOSX
|
||||
style="&prefWinMinSize.styleMac;"
|
||||
#else
|
||||
style="&prefWinMinSize.styleGNOME;"
|
||||
#endif
|
||||
#endif
|
||||
onunload="if (typeof gSecurityPane != 'undefined') gSecurityPane.syncAddonSecurityLevel();"
|
||||
ondialogaccept="gNewtabUrl.writeNewtabUrl();">
|
||||
|
|
@ -84,9 +74,5 @@
|
|||
<prefpane id="paneAdvanced" label="&paneAdvanced.title;"
|
||||
src="chrome://browser/content/preferences/advanced.xul"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</prefwindow>
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,7 @@
|
|||
%globalDTD;
|
||||
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
||||
%browserDTD;
|
||||
#ifdef XP_MACOSX
|
||||
<!ENTITY basePBMenu.label "&fileMenu.label;">
|
||||
#else
|
||||
<!ENTITY basePBMenu.label "<span class='appMenuButton'>&brandShortName;</span><span class='fileMenu'>&fileMenu.label;</span>">
|
||||
#endif
|
||||
<!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
|
||||
%privatebrowsingpageDTD;
|
||||
]>
|
||||
|
|
@ -48,9 +44,7 @@
|
|||
document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
|
||||
setFavIcon("chrome://global/skin/icons/question-16.png");
|
||||
} else {
|
||||
#ifndef XP_MACOSX
|
||||
document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
|
||||
#endif
|
||||
setFavIcon("chrome://browser/skin/Privacy-16.png");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -804,11 +804,9 @@
|
|||
phase="capturing"
|
||||
action="return this.openSearch();"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<handler event="keypress" keycode="VK_F4"
|
||||
phase="capturing"
|
||||
action="return this.openSearch();"/>
|
||||
#endif
|
||||
|
||||
<handler event="dragover">
|
||||
<![CDATA[
|
||||
|
|
|
|||
|
|
@ -775,9 +775,7 @@ var SessionStoreInternal = {
|
|||
|
||||
if (closedWindowState) {
|
||||
let newWindowState;
|
||||
#ifndef XP_MACOSX
|
||||
if (!this._doResumeSession()) {
|
||||
#endif
|
||||
// We want to split the window up into pinned tabs and unpinned tabs.
|
||||
// Pinned tabs should be restored. If there are any remaining tabs,
|
||||
// they should be added back to _closedWindows.
|
||||
|
|
@ -801,7 +799,6 @@ var SessionStoreInternal = {
|
|||
delete normalTabsState.windows[0].__lastSessionWindowID;
|
||||
this._closedWindows[closedWindowIndex] = normalTabsState.windows[0];
|
||||
}
|
||||
#ifndef XP_MACOSX
|
||||
}
|
||||
else {
|
||||
// If we're just restoring the window, make sure it gets removed from
|
||||
|
|
@ -810,7 +807,6 @@ var SessionStoreInternal = {
|
|||
newWindowState = closedWindowState;
|
||||
delete newWindowState.hidden;
|
||||
}
|
||||
#endif
|
||||
if (newWindowState) {
|
||||
// Ensure that the window state isn't hidden
|
||||
this._restoreCount = 1;
|
||||
|
|
@ -911,11 +907,9 @@ var SessionStoreInternal = {
|
|||
this._updateCookies(windows);
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// Until we decide otherwise elsewhere, this window is part of a series
|
||||
// of closing windows to quit.
|
||||
winData._shouldRestore = true;
|
||||
#endif
|
||||
|
||||
// Save the window if it has multiple tabs or a single saveable tab and
|
||||
// it's not private.
|
||||
|
|
@ -2529,7 +2523,6 @@ var SessionStoreInternal = {
|
|||
// shallow copy this._closedWindows to preserve current state
|
||||
let lastClosedWindowsCopy = this._closedWindows.slice();
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// If no non-popup browser window remains open, return the state of the last
|
||||
// closed window(s). We only want to do this when we're actually "ending"
|
||||
// the session.
|
||||
|
|
@ -2543,7 +2536,6 @@ var SessionStoreInternal = {
|
|||
total.unshift(lastClosedWindowsCopy.shift())
|
||||
} while (total[0].isPopup && lastClosedWindowsCopy.length > 0)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aPinnedOnly) {
|
||||
// perform a deep copy so that existing session variables are not changed.
|
||||
|
|
@ -3776,7 +3768,6 @@ var SessionStoreInternal = {
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
// We want to restore closed windows that are marked with _shouldRestore.
|
||||
// We're doing this here because we want to control this only when saving
|
||||
// the file.
|
||||
|
|
@ -3791,7 +3782,6 @@ var SessionStoreInternal = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pinnedOnly) {
|
||||
// Save original resume_session_once preference for when quiting browser,
|
||||
|
|
@ -4408,7 +4398,6 @@ var SessionStoreInternal = {
|
|||
if (this._closedWindows.length <= this._max_windows_undo)
|
||||
return;
|
||||
let spliceTo = this._max_windows_undo;
|
||||
#ifndef XP_MACOSX
|
||||
let normalWindowIndex = 0;
|
||||
// try to find a non-popup window in this._closedWindows
|
||||
while (normalWindowIndex < this._closedWindows.length &&
|
||||
|
|
@ -4416,7 +4405,6 @@ var SessionStoreInternal = {
|
|||
normalWindowIndex++;
|
||||
if (normalWindowIndex >= this._max_windows_undo)
|
||||
spliceTo = normalWindowIndex + 1;
|
||||
#endif
|
||||
this._closedWindows.splice(spliceTo, this._closedWindows.length);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -141,11 +141,7 @@ function onListClick(aEvent) {
|
|||
if (cell.col) {
|
||||
// Restore this specific tab in the same window for middle/double/accel clicking
|
||||
// on a tab's title.
|
||||
#ifdef XP_MACOSX
|
||||
let accelKey = aEvent.metaKey;
|
||||
#else
|
||||
let accelKey = aEvent.ctrlKey;
|
||||
#endif
|
||||
if ((aEvent.button == 1 || aEvent.button == 0 && aEvent.detail == 2 || accelKey) &&
|
||||
cell.col.id == "title" &&
|
||||
!treeView.isContainer(cell.row)) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ var ShellServiceInternal = {
|
|||
.QueryInterface(Ci.nsIGNOMEShellService);
|
||||
return linuxShellService.canSetDesktopBackground;
|
||||
}
|
||||
#elif defined(XP_WIN) || defined(XP_MACOSX)
|
||||
#elif defined(XP_WIN)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,8 @@
|
|||
var Ci = Components.interfaces;
|
||||
|
||||
var gSetBackground = {
|
||||
#ifdef XP_MACOSX
|
||||
_position : "STRETCH",
|
||||
_backgroundColor : undefined,
|
||||
#else
|
||||
_position : "",
|
||||
_backgroundColor : 0,
|
||||
#endif
|
||||
_screenWidth : 0,
|
||||
_screenHeight : 0,
|
||||
_image : null,
|
||||
|
|
@ -28,9 +23,6 @@ var gSetBackground = {
|
|||
this._canvas = document.getElementById("screen");
|
||||
this._screenWidth = screen.width;
|
||||
this._screenHeight = screen.height;
|
||||
#ifdef XP_MACOSX
|
||||
document.documentElement.getButton("accept").hidden = true;
|
||||
#endif
|
||||
if (this._screenWidth / this._screenHeight >= 1.6)
|
||||
document.getElementById("monitor").setAttribute("aspectratio", "16:10");
|
||||
|
||||
|
|
@ -63,37 +55,14 @@ var gSetBackground = {
|
|||
var ctx = this._canvas.getContext("2d");
|
||||
ctx.scale(this._canvas.clientWidth / this._screenWidth, this._canvas.clientHeight / this._screenHeight);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Make sure to reset the button state in case the user has already
|
||||
// set an image as their desktop background.
|
||||
var setDesktopBackground = document.getElementById("setDesktopBackground");
|
||||
setDesktopBackground.hidden = false;
|
||||
var bundle = document.getElementById("backgroundBundle");
|
||||
setDesktopBackground.label = bundle.getString("DesktopBackgroundSet");
|
||||
setDesktopBackground.disabled = false;
|
||||
|
||||
document.getElementById("showDesktopPreferences").hidden = true;
|
||||
#else
|
||||
this._initColor();
|
||||
#endif
|
||||
this.updatePosition();
|
||||
},
|
||||
|
||||
setDesktopBackground: function ()
|
||||
{
|
||||
#ifdef XP_MACOSX
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Ci.nsIObserverService)
|
||||
.addObserver(this, "shell:desktop-background-changed", false);
|
||||
|
||||
var bundle = document.getElementById("backgroundBundle");
|
||||
var setDesktopBackground = document.getElementById("setDesktopBackground");
|
||||
setDesktopBackground.disabled = true;
|
||||
setDesktopBackground.label = bundle.getString("DesktopBackgroundDownloading");
|
||||
#else
|
||||
document.persist("menuPosition", "value");
|
||||
this._shell.desktopBackgroundColor = this._hexStringToLong(this._backgroundColor);
|
||||
#endif
|
||||
this._shell.setDesktopBackground(this._image,
|
||||
Ci.nsIShellService["BACKGROUND_" + this._position]);
|
||||
},
|
||||
|
|
@ -103,9 +72,7 @@ var gSetBackground = {
|
|||
var ctx = this._canvas.getContext("2d");
|
||||
ctx.clearRect(0, 0, this._screenWidth, this._screenHeight);
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
this._position = document.getElementById("menuPosition").value;
|
||||
#endif
|
||||
|
||||
switch (this._position) {
|
||||
case "TILE":
|
||||
|
|
@ -161,24 +128,6 @@ var gSetBackground = {
|
|||
}
|
||||
};
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
gSetBackground["observe"] = function (aSubject, aTopic, aData)
|
||||
{
|
||||
if (aTopic == "shell:desktop-background-changed") {
|
||||
document.getElementById("setDesktopBackground").hidden = true;
|
||||
document.getElementById("showDesktopPreferences").hidden = false;
|
||||
|
||||
Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Ci.nsIObserverService)
|
||||
.removeObserver(this, "shell:desktop-background-changed");
|
||||
}
|
||||
};
|
||||
|
||||
gSetBackground["showDesktopPrefs"] = function()
|
||||
{
|
||||
this._shell.openApplication(Ci.nsIMacShellService.APPLICATION_DESKTOP);
|
||||
};
|
||||
#else
|
||||
gSetBackground["_initColor"] = function ()
|
||||
{
|
||||
var color = this._shell.desktopBackgroundColor;
|
||||
|
|
@ -214,4 +163,3 @@ gSetBackground["_rgbToHex"] = function (aR, aG, aB)
|
|||
return "#" + [aR, aG, aB].map(aInt => aInt.toString(16).replace(/^(.)$/, "0$1"))
|
||||
.join("").toUpperCase();
|
||||
};
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -9,18 +9,10 @@
|
|||
|
||||
<!DOCTYPE dialog SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
|
||||
#endif
|
||||
|
||||
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
windowtype="Shell:SetDesktopBackground"
|
||||
#ifndef XP_MACOSX
|
||||
buttons="accept,cancel"
|
||||
#else
|
||||
buttons="accept"
|
||||
#endif
|
||||
buttonlabelaccept="&setDesktopBackground.title;"
|
||||
onload="gSetBackground.load();"
|
||||
ondialogaccept="gSetBackground.setDesktopBackground();"
|
||||
|
|
@ -33,7 +25,6 @@
|
|||
<script type="application/javascript" src="chrome://browser/content/setDesktopBackground.js"/>
|
||||
<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
<hbox align="center">
|
||||
<label value="&position.label;"/>
|
||||
<menulist id="menuPosition"
|
||||
|
|
@ -53,7 +44,6 @@
|
|||
type="button"
|
||||
onchange="gSetBackground.updateColor(this.color);"/>
|
||||
</hbox>
|
||||
#endif
|
||||
<groupbox align="center">
|
||||
<caption label="&preview.label;"/>
|
||||
<stack>
|
||||
|
|
@ -63,22 +53,4 @@
|
|||
</stack>
|
||||
</groupbox>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<separator/>
|
||||
|
||||
<hbox align="right">
|
||||
<button id="setDesktopBackground"
|
||||
label="&setDesktopBackground.title;"
|
||||
oncommand="gSetBackground.setDesktopBackground();"/>
|
||||
<button id="showDesktopPreferences"
|
||||
label="&openDesktopPrefs.label;"
|
||||
oncommand="gSetBackground.showDesktopPrefs();"
|
||||
hidden="true"/>
|
||||
</hbox>
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include ../../../base/content/browserMountPoints.inc
|
||||
#endif
|
||||
|
||||
</dialog>
|
||||
|
|
|
|||
|
|
@ -32,14 +32,6 @@
|
|||
|
||||
#filter substitution
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
; Mac bundle stuff
|
||||
@APPNAME@/Contents/Info.plist
|
||||
@APPNAME@/Contents/PkgInfo
|
||||
@RESPATH@/firefox.icns
|
||||
@RESPATH@/document.icns
|
||||
#endif
|
||||
|
||||
[@AB_CD@]
|
||||
@RESPATH@/browser/chrome/@AB_CD@@JAREXT@
|
||||
@RESPATH@/browser/chrome/@AB_CD@.manifest
|
||||
|
|
@ -78,17 +70,8 @@
|
|||
@BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/XUL
|
||||
#else
|
||||
@BINPATH@/@DLL_PREFIX@xul@DLL_SUFFIX@
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@.app/
|
||||
@BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@
|
||||
#else
|
||||
@BINPATH@/@MOZ_CHILD_PROCESS_NAME@
|
||||
#endif
|
||||
#ifdef XP_WIN32
|
||||
@BINPATH@/plugin-hang-ui@BIN_SUFFIX@
|
||||
#if MOZ_PACKAGE_MSVC_DLLS
|
||||
|
|
@ -135,10 +118,8 @@
|
|||
@RESPATH@/browser/blocklist.xml
|
||||
@RESPATH@/browser/ua-update.json
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
@RESPATH@/run-mozilla.sh
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Components]
|
||||
@RESPATH@/components/*
|
||||
|
|
@ -166,8 +147,6 @@
|
|||
#endif
|
||||
#ifdef MOZ_ENABLE_XREMOTE
|
||||
#endif
|
||||
#ifdef XP_MACOSX
|
||||
#endif
|
||||
|
||||
;@RESPATH@/chrome/marionette@JAREXT@
|
||||
;@RESPATH@/chrome/marionette.manifest
|
||||
|
|
@ -217,7 +196,6 @@
|
|||
|
||||
; shell icons
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
; shell icons
|
||||
@RESPATH@/browser/icons/*.png
|
||||
#ifdef MOZ_UPDATER
|
||||
|
|
@ -225,7 +203,6 @@
|
|||
@RESPATH@/icons/updater.png
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; [Default Preferences]
|
||||
; All the pref files must be part of base to prevent migration bugs
|
||||
|
|
@ -272,21 +249,11 @@
|
|||
@RESPATH@/res/table-remove-row-hover.gif
|
||||
@RESPATH@/res/table-remove-row.gif
|
||||
@RESPATH@/res/grabber.gif
|
||||
#ifdef XP_MACOSX
|
||||
@RESPATH@/res/cursors/*
|
||||
#endif
|
||||
@RESPATH@/res/fonts/*
|
||||
@RESPATH@/res/dtd/*
|
||||
@RESPATH@/res/html/*
|
||||
#if defined(XP_MACOSX)
|
||||
; For SafariProfileMigrator.js.
|
||||
@RESPATH@/res/langGroups.properties
|
||||
#endif
|
||||
@RESPATH@/res/language.properties
|
||||
@RESPATH@/res/entityTables/*
|
||||
#ifdef XP_MACOSX
|
||||
@RESPATH@/res/MainMenu.nib/
|
||||
#endif
|
||||
|
||||
; svg
|
||||
@RESPATH@/res/svg.css
|
||||
|
|
@ -327,12 +294,8 @@
|
|||
; [Updater]
|
||||
;
|
||||
#ifdef MOZ_UPDATER
|
||||
#ifdef XP_MACOSX
|
||||
@BINPATH@/updater.app/
|
||||
#else
|
||||
@BINPATH@/updater@BIN_SUFFIX@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
; Shutdown Terminator
|
||||
|
||||
|
|
|
|||
|
|
@ -69,22 +69,11 @@
|
|||
# Firefox 27
|
||||
@DIR_MACOS@distribution/extensions/testpilot@labs.mozilla.com.xpi
|
||||
|
||||
# Mac OS X v2 signing removals
|
||||
#ifdef XP_MACOSX
|
||||
@DIR_MACOS@active-update.xml
|
||||
@DIR_MACOS@update-settings.ini
|
||||
@DIR_MACOS@updates.xml
|
||||
@DIR_MACOS@defaults/*
|
||||
@DIR_MACOS@updates/*
|
||||
#endif
|
||||
|
||||
# Common Directory removals
|
||||
@DIR_MACOS@chrome/
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
chrome/icons/
|
||||
chrome/icons/default/
|
||||
#endif
|
||||
chrome/icons/
|
||||
chrome/icons/default/
|
||||
#endif
|
||||
@DIR_MACOS@chrome/overlayinfo/
|
||||
@DIR_MACOS@components/
|
||||
|
|
@ -106,11 +95,5 @@
|
|||
@DIR_MACOS@greprefs/
|
||||
@DIR_MACOS@jssubloader/
|
||||
@DIR_MACOS@modules/
|
||||
#ifdef XP_MACOSX
|
||||
@DIR_MACOS@plugins/Default Plugin.plugin/*
|
||||
@DIR_MACOS@plugins/JavaEmbeddingPlugin.bundle/*
|
||||
@DIR_MACOS@plugins/MRJPlugin.plugin/*
|
||||
Contents/Plug-Ins/PrintPDE.plugin/*
|
||||
#endif
|
||||
@DIR_MACOS@searchplugins/*
|
||||
@DIR_MACOS@webapprt/components/
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if ! git remote -v | grep origin | grep -q cctools-port; then
|
||||
echo "must be in a cctools-port checkout"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir build-cctools
|
||||
cd build-cctools
|
||||
|
||||
CFLAGS='-mcpu=generic -mtune=generic' MACOSX_DEPLOYMENT_TARGET=10.7 ../cctools/configure --target=x86_64-apple-darwin11
|
||||
env MACOSX_DEPLOYMENT_TARGET=10.7 make -s -j4
|
||||
|
||||
if test ! -e ld64/src/ld/ld; then
|
||||
echo "ld did not get built"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gtar jcf cctools.tar.bz2 ld64/src/ld/ld --transform 's#ld64/src/ld#cctools/bin#'
|
||||
|
||||
cd ../
|
||||
|
||||
echo "build from $(git show --pretty=format:%H -s HEAD) complete!"
|
||||
echo "upload the build-cctools/cctools.tar.bz2 file to tooltool"
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_AUTOMATION_L10N_CHECK=0
|
||||
|
||||
if [ "x$IS_NIGHTLY" = "xyes" ]; then
|
||||
# Some nightlies (eg: Mulet) don't want these set.
|
||||
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1}
|
||||
MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-1}
|
||||
fi
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
# ld needs libLTO.so from llvm
|
||||
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
|
||||
|
||||
CROSS_CCTOOLS_PATH=$topsrcdir/cctools
|
||||
CROSS_SYSROOT=$topsrcdir/MacOSX10.7.sdk
|
||||
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
|
||||
FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT"
|
||||
|
||||
export CC="$topsrcdir/clang/bin/clang $FLAGS"
|
||||
export CXX="$topsrcdir/clang/bin/clang++ $FLAGS"
|
||||
export CPP="$topsrcdir/clang/bin/clang $FLAGS -E"
|
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
|
||||
export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip"
|
||||
export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-
|
||||
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
|
||||
export GENISOIMAGE=$topsrcdir/genisoimage/genisoimage
|
||||
export DMG_TOOL=$topsrcdir/dmg/dmg
|
||||
|
||||
export HOST_CC="$topsrcdir/clang/bin/clang"
|
||||
export HOST_CXX="$topsrcdir/clang/bin/clang++"
|
||||
export HOST_CPP="$topsrcdir/clang/bin/clang -E"
|
||||
export HOST_CFLAGS="-g"
|
||||
export HOST_CXXFLAGS="-g"
|
||||
export HOST_LDFLAGS="-g"
|
||||
|
||||
ac_add_options --target=x86_64-apple-darwin
|
||||
ac_add_options --with-macos-private-frameworks=$CROSS_PRIVATE_FRAMEWORKS
|
||||
|
||||
# Enable static analysis checks by default on OSX cross builds.
|
||||
ac_add_options --enable-clang-plugin
|
||||
|
||||
. "$topsrcdir/build/mozconfig.cache"
|
||||
|
||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if [ "x$IS_NIGHTLY" = "xyes" ]; then
|
||||
# Some nightlies (eg: Mulet) don't want these set.
|
||||
MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
|
||||
MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1}
|
||||
MOZ_AUTOMATION_SDK=${MOZ_AUTOMATION_SDK-1}
|
||||
fi
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then
|
||||
# mozilla-central based build
|
||||
export CC=$topsrcdir/clang/bin/clang
|
||||
export CXX=$topsrcdir/clang/bin/clang++
|
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
|
||||
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
|
||||
# Use an updated linker.
|
||||
ldflags="-B$topsrcdir/cctools/bin"
|
||||
elif [ -d "$topsrcdir/../clang" ]; then
|
||||
# comm-central based build
|
||||
export CC=$topsrcdir/../clang/bin/clang
|
||||
export CXX=$topsrcdir/../clang/bin/clang++
|
||||
export LLVMCONFIG=$topsrcdir/../clang/bin/llvm-config
|
||||
export DSYMUTIL=$topsrcdir/../clang/bin/llvm-dsymutil
|
||||
# Use an updated linker.
|
||||
ldflags="-B$topsrcdir/../cctools/bin"
|
||||
fi
|
||||
|
||||
# Ensure the updated linker doesn't generate things our older build tools
|
||||
# don't understand.
|
||||
ldflags="$ldflags -Wl,-no_data_in_code_info"
|
||||
export LDFLAGS="$ldflags"
|
||||
|
||||
# If not set use the system default clang
|
||||
if [ -z "$CC" ]; then
|
||||
export CC=clang
|
||||
fi
|
||||
|
||||
# If not set use the system default clang++
|
||||
if [ -z "$CXX" ]; then
|
||||
export CXX=clang++
|
||||
fi
|
||||
|
||||
export SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE=/builds/crash-stats-api.token
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
if test `uname -s` = Linux; then
|
||||
. $topsrcdir/build/macosx/cross-mozconfig.common
|
||||
else
|
||||
. $topsrcdir/build/macosx/local-mozconfig.common
|
||||
fi
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
return 1;
|
||||
|
||||
uid_t realuser = getuid();
|
||||
char uidstring[20];
|
||||
snprintf(uidstring, 19, "%i", realuser);
|
||||
uidstring[19] = '\0';
|
||||
|
||||
return execl("/usr/sbin/chown",
|
||||
"/usr/sbin/chown", "-R", "-h", uidstring, argv[1], (char*) 0);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
return 1;
|
||||
|
||||
return execl("/usr/sbin/chown",
|
||||
"/usr/sbin/chown", "-R", "-h", "root:admin", argv[1], (char*) 0);
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# i386/x86-64 Universal Build mozconfig
|
||||
|
||||
# As used here, arguments in $MOZ_BUILD_PROJECTS are suitable as arguments
|
||||
# to gcc's -arch parameter.
|
||||
mk_add_options MOZ_BUILD_PROJECTS="x86_64 i386"
|
||||
|
||||
. $topsrcdir/build/macosx/universal/mozconfig.common
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
mk_add_options MOZ_UNIFY_BDATE=1
|
||||
|
||||
DARWIN_VERSION=10
|
||||
ac_add_app_options i386 --target=i386-apple-darwin$DARWIN_VERSION
|
||||
ac_add_app_options x86_64 --target=x86_64-apple-darwin$DARWIN_VERSION
|
||||
ac_add_app_options i386 --with-unify-dist=../x86_64/dist
|
||||
ac_add_app_options x86_64 --with-unify-dist=../i386/dist
|
||||
|
||||
if ! test `uname -s` = Linux; then
|
||||
# Cross-universal builds already do the equivalent of this by setting -isysroot directly
|
||||
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.7.sdk
|
||||
fi
|
||||
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
# $MOZ_BUILD_APP is only defined when sourced by configure. That's not a
|
||||
# problem, because the variables it affects only need to be set for
|
||||
# configure.
|
||||
if test -n "$MOZ_BUILD_APP" ; then
|
||||
if test "$MOZ_BUILD_APP" = "i386" -o "$MOZ_BUILD_APP" = "x86_64"; then
|
||||
TARGET_CPU=$MOZ_BUILD_APP
|
||||
|
||||
# $HOST_CXX is presently unused. $HOST_CC will only be used during a cross
|
||||
# compile.
|
||||
HOST_CC=$CC
|
||||
HOST_CXX=$CXX
|
||||
|
||||
NATIVE_CPU=`$topsrcdir/build/autoconf/config.guess | cut -f1 -d-`
|
||||
|
||||
# It's not strictly necessary to specify -arch during native builds, but it
|
||||
# makes the merged about:buildconfig easier to follow, and it reduces
|
||||
# conditionalized differences between builds.
|
||||
CC="$CC -arch $TARGET_CPU"
|
||||
CXX="$CXX -arch $TARGET_CPU"
|
||||
|
||||
# These must be set for cross builds, and don't hurt straight builds.
|
||||
RANLIB="${TOOLCHAIN_PREFIX}ranlib"
|
||||
AR="${TOOLCHAIN_PREFIX}ar"
|
||||
AS=$CC
|
||||
LD=ld
|
||||
STRIP="${TOOLCHAIN_PREFIX}strip"
|
||||
OTOOL="${TOOLCHAIN_PREFIX}otool"
|
||||
|
||||
# Each per-CPU build should be entirely oblivious to the fact that a
|
||||
# universal binary will be produced. The exception is packager.mk, which
|
||||
# needs to know to look for universal bits when building the .dmg.
|
||||
UNIVERSAL_BINARY=1
|
||||
|
||||
export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP OTOOL
|
||||
fi
|
||||
fi
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -5449,11 +5449,19 @@ nsDocShell::Stop(uint32_t aStopFlags)
|
|||
}
|
||||
|
||||
if (nsIWebNavigation::STOP_CONTENT & aStopFlags) {
|
||||
// Stop the document loading
|
||||
// Stop the document loading and animations
|
||||
if (mContentViewer) {
|
||||
nsCOMPtr<nsIContentViewer> cv = mContentViewer;
|
||||
cv->Stop();
|
||||
}
|
||||
} else if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
|
||||
// Stop the document loading only
|
||||
if (mContentViewer) {
|
||||
RefPtr<nsIDocument> doc = mContentViewer->GetDocument();
|
||||
if (doc) {
|
||||
doc->StopDocumentLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
|
||||
|
|
|
|||
|
|
@ -2240,6 +2240,7 @@ GK_ATOM(scrollbar_end_backward, "scrollbar-end-backward")
|
|||
GK_ATOM(scrollbar_end_forward, "scrollbar-end-forward")
|
||||
GK_ATOM(scrollbar_thumb_proportional, "scrollbar-thumb-proportional")
|
||||
GK_ATOM(overlay_scrollbars, "overlay-scrollbars")
|
||||
GK_ATOM(prefers_color_scheme, "prefers-color-scheme")
|
||||
GK_ATOM(windows_accent_color_applies, "windows-accent-color-applies")
|
||||
GK_ATOM(windows_accent_color_is_dark, "windows-accent-color-is-dark")
|
||||
GK_ATOM(windows_default_theme, "windows-default-theme")
|
||||
|
|
|
|||
|
|
@ -390,6 +390,16 @@ WebGLContext::TexImage(const char* funcName, uint8_t funcDims, GLenum rawTarget,
|
|||
if (!ValidateTexImageTarget(this, funcName, funcDims, rawTarget, &target, &tex))
|
||||
return;
|
||||
|
||||
const bool isUploadFromPbo = bool(src.mPboOffset);
|
||||
const bool isPboBound = bool(mBoundPixelUnpackBuffer);
|
||||
if (isUploadFromPbo != isPboBound) {
|
||||
SynthesizeGLError(LOCAL_GL_INVALID_OPERATION,
|
||||
"Tex upload from %s but PIXEL_UNPACK_BUFFER %s bound.",
|
||||
isUploadFromPbo ? "PBO" : "non-PBO",
|
||||
isPboBound ? "was" : "was not");
|
||||
return;
|
||||
}
|
||||
|
||||
const webgl::PackingInfo pi = {unpackFormat, unpackType};
|
||||
tex->TexImage(funcName, target, level, internalFormat, width, height, depth, border,
|
||||
pi, src);
|
||||
|
|
@ -407,6 +417,16 @@ WebGLContext::TexSubImage(const char* funcName, uint8_t funcDims, GLenum rawTarg
|
|||
if (!ValidateTexImageTarget(this, funcName, funcDims, rawTarget, &target, &tex))
|
||||
return;
|
||||
|
||||
const bool isUploadFromPbo = bool(src.mPboOffset);
|
||||
const bool isPboBound = bool(mBoundPixelUnpackBuffer);
|
||||
if (isUploadFromPbo != isPboBound) {
|
||||
SynthesizeGLError(LOCAL_GL_INVALID_OPERATION,
|
||||
"Tex upload from %s but PIXEL_UNPACK_BUFFER %s bound.",
|
||||
isUploadFromPbo ? "PBO" : "non-PBO",
|
||||
isPboBound ? "was" : "was not");
|
||||
return;
|
||||
}
|
||||
|
||||
const webgl::PackingInfo pi = {unpackFormat, unpackType};
|
||||
tex->TexSubImage(funcName, target, level, xOffset, yOffset, zOffset, width, height,
|
||||
depth, pi, src);
|
||||
|
|
|
|||
|
|
@ -331,13 +331,6 @@ AudioStream::Init(uint32_t aNumChannels, uint32_t aRate,
|
|||
cubeb_stream_params params;
|
||||
params.rate = aRate;
|
||||
params.channels = mOutChannels;
|
||||
#if defined(__ANDROID__)
|
||||
params.stream_type = CUBEB_STREAM_TYPE_MUSIC;
|
||||
|
||||
if (params.stream_type == CUBEB_STREAM_TYPE_MAX) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
#endif
|
||||
|
||||
params.format = ToCubebFormat<AUDIO_OUTPUT_FORMAT>::value;
|
||||
mAudioClock.Init(aRate);
|
||||
|
|
|
|||
|
|
@ -630,15 +630,7 @@ AudioCallbackDriver::Init()
|
|||
|
||||
mSampleRate = output.rate = CubebUtils::PreferredSampleRate();
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
output.stream_type = CUBEB_STREAM_TYPE_MUSIC;
|
||||
if (output.stream_type == CUBEB_STREAM_TYPE_MAX) {
|
||||
NS_WARNING("Bad stream type");
|
||||
return;
|
||||
}
|
||||
#else
|
||||
(void)mAudioChannel;
|
||||
#endif
|
||||
|
||||
output.channels = mGraphImpl->AudioChannelCount();
|
||||
if (AUDIO_OUTPUT_FORMAT == AUDIO_FORMAT_S16) {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
/*
|
||||
* Copyright © 2000 SuSE, Inc.
|
||||
* Copyright © 2007 Red Hat, Inc.
|
||||
* Copyright © 2021 Moonchild Productions
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of SuSE not be used in advertising or
|
||||
* documentation, and that the names of the authors not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. SuSE makes no representations about the
|
||||
* written prior permission. The authors make no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
|
||||
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS
|
||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
|
|
@ -94,39 +95,6 @@ detect_cpu_features (void)
|
|||
return features;
|
||||
}
|
||||
|
||||
#elif defined(__ANDROID__) || defined(ANDROID) /* Android */
|
||||
|
||||
static arm_cpu_features_t
|
||||
detect_cpu_features (void)
|
||||
{
|
||||
arm_cpu_features_t features = 0;
|
||||
char buf[1024];
|
||||
char* pos;
|
||||
const char* ver_token = "CPU architecture: ";
|
||||
FILE* f = fopen("/proc/cpuinfo", "r");
|
||||
if (!f) {
|
||||
return features;
|
||||
}
|
||||
|
||||
fread(buf, sizeof(char), sizeof(buf), f);
|
||||
fclose(f);
|
||||
pos = strstr(buf, ver_token);
|
||||
if (pos) {
|
||||
char vchar = *(pos + strlen(ver_token));
|
||||
if (vchar >= '0' && vchar <= '9') {
|
||||
int ver = vchar - '0';
|
||||
if (ver >= 7)
|
||||
features |= ARM_V7;
|
||||
}
|
||||
}
|
||||
if (strstr(buf, "neon") != NULL)
|
||||
features |= ARM_NEON;
|
||||
if (strstr(buf, "vfp") != NULL)
|
||||
features |= ARM_VFP;
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
#elif defined (__linux__) /* linux ELF */
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
/*
|
||||
* Copyright © 2000 SuSE, Inc.
|
||||
* Copyright © 2007 Red Hat, Inc.
|
||||
* Copyright © 2021 Moonchild Productions
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of SuSE not be used in advertising or
|
||||
* documentation, and that the names of the authors not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. SuSE makes no representations about the
|
||||
* written prior permission. The authors make no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
|
||||
* THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS
|
||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
|
|
@ -290,7 +291,7 @@ pixman_have_arm_iwmmxt (void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#elif defined (__linux__) || defined(__ANDROID__) || defined(ANDROID) /* linux ELF or ANDROID */
|
||||
#elif defined (__linux__) /* linux ELF */
|
||||
|
||||
static pixman_bool_t arm_has_v7 = FALSE;
|
||||
static pixman_bool_t arm_has_v6 = FALSE;
|
||||
|
|
@ -299,39 +300,6 @@ static pixman_bool_t arm_has_neon = FALSE;
|
|||
static pixman_bool_t arm_has_iwmmxt = FALSE;
|
||||
static pixman_bool_t arm_tests_initialized = FALSE;
|
||||
|
||||
#if defined(__ANDROID__) || defined(ANDROID) /* Android device support */
|
||||
|
||||
static void
|
||||
pixman_arm_read_auxv_or_cpu_features ()
|
||||
{
|
||||
char buf[1024];
|
||||
char* pos;
|
||||
const char* ver_token = "CPU architecture: ";
|
||||
FILE* f = fopen("/proc/cpuinfo", "r");
|
||||
if (!f) {
|
||||
arm_tests_initialized = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
fread(buf, sizeof(char), sizeof(buf), f);
|
||||
fclose(f);
|
||||
pos = strstr(buf, ver_token);
|
||||
if (pos) {
|
||||
char vchar = *(pos + strlen(ver_token));
|
||||
if (vchar >= '0' && vchar <= '9') {
|
||||
int ver = vchar - '0';
|
||||
arm_has_v7 = ver >= 7;
|
||||
arm_has_v6 = ver >= 6;
|
||||
}
|
||||
}
|
||||
arm_has_neon = strstr(buf, "neon") != NULL;
|
||||
arm_has_vfp = strstr(buf, "vfp") != NULL;
|
||||
arm_has_iwmmxt = strstr(buf, "iwmmxt") != NULL;
|
||||
arm_tests_initialized = TRUE;
|
||||
}
|
||||
|
||||
#elif defined (__linux__) /* linux ELF */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -382,8 +350,6 @@ pixman_arm_read_auxv_or_cpu_features ()
|
|||
arm_tests_initialized = TRUE;
|
||||
}
|
||||
|
||||
#endif /* Linux elf */
|
||||
|
||||
#if defined(USE_ARM_SIMD)
|
||||
pixman_bool_t
|
||||
pixman_have_arm_simd (void)
|
||||
|
|
@ -420,7 +386,7 @@ pixman_have_arm_iwmmxt (void)
|
|||
|
||||
#endif /* USE_ARM_IWMMXT */
|
||||
|
||||
#else /* !_MSC_VER && !Linux elf && !Android */
|
||||
#else /* !_MSC_VER && !Linux elf */
|
||||
|
||||
#define pixman_have_arm_simd() FALSE
|
||||
#define pixman_have_arm_neon() FALSE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* Copyright © 2007,2008,2009 Red Hat, Inc.
|
||||
* Copyright © 2011,2012 Google, Inc.
|
||||
* Copyright © 2021 Moonchild Productions
|
||||
*
|
||||
* This is part of HarfBuzz, a text shaping library.
|
||||
*
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
*
|
||||
* Red Hat Author(s): Behdad Esfahbod
|
||||
* Google Author(s): Behdad Esfahbod
|
||||
* Moonchild Productions Author(s): Moonchild Straver
|
||||
*/
|
||||
|
||||
#ifndef HB_PRIVATE_HH
|
||||
|
|
@ -197,13 +199,6 @@ static int errno = 0; /* Use something better? */
|
|||
* mingw32 headers say atexit is safe to use in shared libraries.
|
||||
*/
|
||||
# define HB_USE_ATEXIT 1
|
||||
# elif defined(__ANDROID__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
/* This was fixed in Android NKD r8 or r8b:
|
||||
* https://code.google.com/p/android/issues/detail?id=6455
|
||||
* which introduced GCC 4.6:
|
||||
* https://developer.android.com/tools/sdk/ndk/index.html
|
||||
*/
|
||||
# define HB_USE_ATEXIT 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
#ifndef JIT_SPEW_DIR
|
||||
# if defined(_WIN32)
|
||||
# define JIT_SPEW_DIR ""
|
||||
# elif defined(__ANDROID__)
|
||||
# define JIT_SPEW_DIR "/data/local/tmp/"
|
||||
# else
|
||||
# define JIT_SPEW_DIR "/tmp/"
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -28,12 +28,7 @@
|
|||
// so also try /sdcard/.
|
||||
|
||||
#ifndef PERF_SPEW_DIR
|
||||
# if defined(__ANDROID__)
|
||||
# define PERF_SPEW_DIR "/data/local/tmp/"
|
||||
# define PERF_SPEW_DIR_2 "/sdcard/"
|
||||
# else
|
||||
# define PERF_SPEW_DIR "/tmp/"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
using namespace js;
|
||||
|
|
@ -104,12 +99,6 @@ js::jit::CheckPerf() {
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
if (openPerfMap(PERF_SPEW_DIR_2)) {
|
||||
PerfChecked = true;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
fprintf(stderr, "Failed to open perf map file. Disabling IONPERF.\n");
|
||||
PerfMode = PERF_MODE_NONE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,8 @@ using mozilla::TimeStamp;
|
|||
|
||||
static const long NanoSecPerSec = 1000000000;
|
||||
|
||||
// Android 32-bit & macOS 10.12 has the clock functions, but not pthread_condattr_setclock.
|
||||
#if defined(HAVE_CLOCK_MONOTONIC) && \
|
||||
!(defined(__ANDROID__) && !defined(__LP64__)) && !defined(__APPLE__)
|
||||
// MacOS 10.12 has the clock functions, but not pthread_condattr_setclock.
|
||||
#if defined(HAVE_CLOCK_MONOTONIC) && !defined(__APPLE__)
|
||||
# define USE_CLOCK_API
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ CSS_KEY(crosshair, crosshair)
|
|||
CSS_KEY(currentcolor, currentcolor)
|
||||
CSS_KEY(cursive, cursive)
|
||||
CSS_KEY(cyclic, cyclic)
|
||||
CSS_KEY(dark, dark)
|
||||
CSS_KEY(darken, darken)
|
||||
CSS_KEY(dashed, dashed)
|
||||
CSS_KEY(dense, dense)
|
||||
|
|
@ -364,6 +365,7 @@ CSS_KEY(last baseline, last_baseline) // only used for DevTools auto-completion
|
|||
CSS_KEY(layout, layout)
|
||||
CSS_KEY(left, left)
|
||||
CSS_KEY(legacy, legacy)
|
||||
CSS_KEY(light, light)
|
||||
CSS_KEY(lighten, lighten)
|
||||
CSS_KEY(lighter, lighter)
|
||||
CSS_KEY(line-through, line_through)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "nsIDocument.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StyleSheet.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
|
||||
|
|
@ -45,6 +46,12 @@ static const nsCSSProps::KTableEntry kDisplayModeKeywords[] = {
|
|||
{ eCSSKeyword_UNKNOWN, -1 }
|
||||
};
|
||||
|
||||
static const nsCSSProps::KTableEntry kPrefersColorSchemeKeywords[] = {
|
||||
{ eCSSKeyword_light, NS_STYLE_PREFERS_COLOR_SCHEME_LIGHT },
|
||||
{ eCSSKeyword_dark, NS_STYLE_PREFERS_COLOR_SCHEME_DARK },
|
||||
{ eCSSKeyword_UNKNOWN, -1 },
|
||||
};
|
||||
|
||||
#ifdef XP_WIN
|
||||
struct WindowsThemeName {
|
||||
LookAndFeel::WindowsTheme id;
|
||||
|
|
@ -457,6 +464,25 @@ GetOperatingSystemVersion(nsPresContext* aPresContext, const nsMediaFeature* aFe
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
GetPrefersColorScheme(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
|
||||
nsCSSValue& aResult)
|
||||
{
|
||||
switch(Preferences::GetInt("browser.display.prefers_color_scheme", 1)) {
|
||||
case 1:
|
||||
aResult.SetIntValue(NS_STYLE_PREFERS_COLOR_SCHEME_LIGHT,
|
||||
eCSSUnit_Enumerated);
|
||||
break;
|
||||
case 2:
|
||||
aResult.SetIntValue(NS_STYLE_PREFERS_COLOR_SCHEME_DARK,
|
||||
eCSSUnit_Enumerated);
|
||||
break;
|
||||
default:
|
||||
aResult.Reset();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
GetIsGlyph(nsPresContext* aPresContext, const nsMediaFeature* aFeature,
|
||||
nsCSSValue& aResult)
|
||||
|
|
@ -556,6 +582,14 @@ nsMediaFeatures::features[] = {
|
|||
{ nullptr },
|
||||
GetMonochrome
|
||||
},
|
||||
{
|
||||
&nsGkAtoms::prefers_color_scheme,
|
||||
nsMediaFeature::eMinMaxNotAllowed,
|
||||
nsMediaFeature::eEnumerated,
|
||||
nsMediaFeature::eNoRequirements,
|
||||
{ kPrefersColorSchemeKeywords },
|
||||
GetPrefersColorScheme
|
||||
},
|
||||
{
|
||||
&nsGkAtoms::resolution,
|
||||
nsMediaFeature::eMinMaxAllowed,
|
||||
|
|
|
|||
|
|
@ -1306,6 +1306,10 @@ enum class StyleDisplay : uint8_t {
|
|||
#define NS_STYLE_DISPLAY_MODE_STANDALONE 2
|
||||
#define NS_STYLE_DISPLAY_MODE_FULLSCREEN 3
|
||||
|
||||
// prefers-color-scheme
|
||||
#define NS_STYLE_PREFERS_COLOR_SCHEME_LIGHT 0
|
||||
#define NS_STYLE_PREFERS_COLOR_SCHEME_DARK 1
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* nsStyleConsts_h___ */
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
#include "nss.h"
|
||||
#include "pk11pub.h"
|
||||
|
||||
#include "nsNetUtil.h" // for NS_CheckPortSafety
|
||||
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIProperty.h"
|
||||
#include "nsIPropertyBag2.h"
|
||||
|
|
@ -494,6 +496,13 @@ PeerConnectionConfiguration::Init(const RTCConfiguration& aSrc)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// list of known acceptable ports for webrtc
|
||||
int16_t gGoodWebrtcPortList[] = {
|
||||
3478, // stun or turn
|
||||
5349, // stuns or turns
|
||||
0, // Sentinel value: This MUST be zero
|
||||
};
|
||||
|
||||
nsresult
|
||||
PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
|
||||
{
|
||||
|
|
@ -567,6 +576,21 @@ PeerConnectionConfiguration::AddIceServer(const RTCIceServer &aServer)
|
|||
if (port == -1)
|
||||
port = (isStuns || isTurns)? 5349 : 3478;
|
||||
|
||||
// First check the known good ports for webrtc
|
||||
bool knownGoodPort = false;
|
||||
for (int i = 0; !knownGoodPort && gGoodWebrtcPortList[i]; i++) {
|
||||
if (port == gGoodWebrtcPortList[i]) {
|
||||
knownGoodPort = true;
|
||||
}
|
||||
}
|
||||
|
||||
// if not in the list of known good ports for webrtc, check
|
||||
// the generic block list using NS_CheckPortSafety.
|
||||
if (!knownGoodPort) {
|
||||
rv = NS_CheckPortSafety(port, nullptr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
if (isTurn || isTurns) {
|
||||
NS_ConvertUTF16toUTF8 credential(aServer.mCredential.Value());
|
||||
NS_ConvertUTF16toUTF8 username(aServer.mUsername.Value());
|
||||
|
|
|
|||
|
|
@ -266,6 +266,10 @@ pref("browser.display.use_document_fonts", 1); // 0 = never, 1 = quick, 2 = al
|
|||
// 1 = always
|
||||
// 2 = never
|
||||
pref("browser.display.document_color_use", 0);
|
||||
// 0 = feature disabled
|
||||
// 1 = default: light theme preferred
|
||||
// 2 = dark theme preferred
|
||||
pref("browser.display.prefers_color_scheme", 1);
|
||||
pref("browser.display.use_system_colors", false);
|
||||
pref("browser.display.foreground_color", "#000000");
|
||||
pref("browser.display.background_color", "#FFFFFF");
|
||||
|
|
|
|||
224
old-configure.in
224
old-configure.in
|
|
@ -96,12 +96,6 @@ case "$target" in
|
|||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
*-apple-darwin*)
|
||||
MOZ_IOS_SDK
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ANDROID_SOURCE)
|
||||
AC_SUBST(ANDROID_PACKAGE_NAME)
|
||||
AC_SUBST(OBJCOPY)
|
||||
|
|
@ -738,11 +732,6 @@ case "$host" in
|
|||
esac
|
||||
;;
|
||||
|
||||
*-darwin*)
|
||||
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX"
|
||||
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
|
||||
;;
|
||||
|
||||
*-linux*|*-kfreebsd*-gnu|*-gnu*)
|
||||
HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX"
|
||||
HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}"
|
||||
|
|
@ -779,76 +768,6 @@ dnl System overrides of the defaults for target
|
|||
dnl ========================================================
|
||||
|
||||
case "$target" in
|
||||
*-darwin*)
|
||||
MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
|
||||
MOZ_OPTIMIZE_FLAGS="-O3"
|
||||
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
|
||||
DLL_SUFFIX=".dylib"
|
||||
DSO_LDOPTS=''
|
||||
STRIP_FLAGS="$STRIP_FLAGS -x -S"
|
||||
# Ensure that if we're targeting iOS an SDK was provided.
|
||||
AC_CACHE_CHECK(for iOS target,
|
||||
ac_cv_ios_target,
|
||||
[AC_TRY_COMPILE([#include <TargetConditionals.h>
|
||||
#if !(TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR)
|
||||
#error not iOS
|
||||
#endif],
|
||||
[],
|
||||
ac_cv_ios_target="yes",
|
||||
ac_cv_ios_target="no")])
|
||||
if test "$ac_cv_ios_target" = "yes" -a -z $MOZ_IOS; then
|
||||
AC_MSG_ERROR([targeting iOS but not using an iOS SDK?])
|
||||
fi
|
||||
if test -n "$MOZ_IOS"; then
|
||||
direct_nspr_config=1
|
||||
else
|
||||
# The ExceptionHandling framework is needed for Objective-C exception
|
||||
# logging code in nsObjCExceptions.h. Currently we only use that in debug
|
||||
# builds.
|
||||
MOZ_DEBUG_LDFLAGS="$MOZ_DEBUG_LDFLAGS -framework ExceptionHandling";
|
||||
fi
|
||||
|
||||
if test "x$lto_is_enabled" = "xyes"; then
|
||||
echo "Skipping -dead_strip because lto is enabled."
|
||||
dnl DTrace and -dead_strip don't interact well. See bug 403132.
|
||||
dnl ===================================================================
|
||||
elif test "x$enable_dtrace" = "xyes"; then
|
||||
echo "Skipping -dead_strip because DTrace is enabled. See bug 403132."
|
||||
else
|
||||
dnl check for the presence of the -dead_strip linker flag
|
||||
AC_MSG_CHECKING([for -dead_strip option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-dead_strip"
|
||||
AC_TRY_LINK(,[return 0;],_HAVE_DEAD_STRIP=1,_HAVE_DEAD_STRIP=)
|
||||
if test -n "$_HAVE_DEAD_STRIP" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
MOZ_OPTIMIZE_LDFLAGS="-Wl,-dead_strip"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
fi
|
||||
|
||||
dnl With newer linkers we need to pass -allow_heap_execute because of
|
||||
dnl Microsoft Silverlight (5.1.10411.0 at least).
|
||||
AC_MSG_CHECKING([for -allow_heap_execute option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-allow_heap_execute"
|
||||
AC_TRY_LINK(,[return 0;],_HAVE_ALLOW_HEAP_EXECUTE=1,
|
||||
_HAVE_ALLOW_HEAP_EXECUTE=)
|
||||
if test -n "$_HAVE_ALLOW_HEAP_EXECUTE" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
MOZ_ALLOW_HEAP_EXECUTE_FLAGS="-Wl,-allow_heap_execute"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
|
||||
MOZ_FIX_LINK_PATHS="-Wl,-executable_path,${DIST}/bin"
|
||||
;;
|
||||
|
||||
*-*linux*)
|
||||
if test "$GNU_CC" -o "$GNU_CXX"; then
|
||||
MOZ_PGO_OPTIMIZE_FLAGS="-O3"
|
||||
|
|
@ -1209,9 +1128,6 @@ case "$target" in
|
|||
*-linux*|*-kfreebsd*-gnu|*-gnu*)
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
|
||||
;;
|
||||
*-darwin*)
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-exported_symbols_list -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-export-list'
|
||||
;;
|
||||
*-mingw*)
|
||||
if test -n "$GNU_CC"; then
|
||||
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
|
||||
|
|
@ -1246,8 +1162,6 @@ MOZ_CXX11
|
|||
AC_LANG_C
|
||||
|
||||
case "${OS_TARGET}" in
|
||||
Darwin)
|
||||
;;
|
||||
*)
|
||||
STL_FLAGS="-I${DIST}/stl_wrappers"
|
||||
WRAP_STL_INCLUDES=1
|
||||
|
|
@ -1329,15 +1243,7 @@ dnl Checks for libraries.
|
|||
dnl ========================================================
|
||||
AC_CHECK_LIB(c_r, gethostbyname_r)
|
||||
|
||||
dnl We don't want to link with libdl even if it's present on OS X, since
|
||||
dnl it's not used and not part of the default installation. OS/2 has dlfcn
|
||||
dnl in libc.
|
||||
dnl We don't want to link against libm or libpthread on Darwin since
|
||||
dnl they both are just symlinks to libSystem and explicitly linking
|
||||
dnl against libSystem causes issues when debugging (see bug 299601).
|
||||
case $target in
|
||||
*-darwin*)
|
||||
;;
|
||||
*)
|
||||
AC_SEARCH_LIBS(dlopen, dl,
|
||||
MOZ_CHECK_HEADER(dlfcn.h,
|
||||
|
|
@ -1413,27 +1319,20 @@ AC_SUBST_LIST(XSS_LIBS)
|
|||
|
||||
dnl ========================================================
|
||||
dnl = pthread support
|
||||
dnl = Start by checking whether the system support pthreads
|
||||
dnl ========================================================
|
||||
case "$target_os" in
|
||||
darwin*)
|
||||
MOZ_USE_PTHREADS=1
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(pthreads, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
|
||||
AC_CHECK_LIB(pthread, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
|
||||
AC_CHECK_LIB(c_r, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
|
||||
AC_CHECK_LIB(c, pthread_create,
|
||||
MOZ_USE_PTHREADS=1
|
||||
)
|
||||
|
||||
AC_CHECK_LIB(pthreads, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads",
|
||||
AC_CHECK_LIB(pthread, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread",
|
||||
AC_CHECK_LIB(c_r, pthread_create,
|
||||
MOZ_USE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r",
|
||||
AC_CHECK_LIB(c, pthread_create,
|
||||
MOZ_USE_PTHREADS=1
|
||||
)
|
||||
)
|
||||
)
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
dnl ========================================================
|
||||
dnl Check the command line for --with-pthreads
|
||||
|
|
@ -1533,35 +1432,27 @@ AC_FUNC_MEMCMP
|
|||
AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize gmtime_r localtime_r arc4random arc4random_buf mallinfo gettid lchown setpriority strerror syscall)
|
||||
|
||||
dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
|
||||
dnl avoid this on Darwin, since depending on your system config, we may think
|
||||
dnl it exists but it really doesn't
|
||||
case "$OS_TARGET" in
|
||||
Darwin)
|
||||
;;
|
||||
*)
|
||||
AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
|
||||
ac_cv_clock_monotonic,
|
||||
[for libs in "" -lrt; do
|
||||
_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS $libs"
|
||||
AC_TRY_LINK([#include <time.h>],
|
||||
[ struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
||||
ac_cv_clock_monotonic=$libs
|
||||
LIBS="$_SAVE_LIBS"
|
||||
break,
|
||||
ac_cv_clock_monotonic=no)
|
||||
LIBS="$_SAVE_LIBS"
|
||||
done])
|
||||
if test "$ac_cv_clock_monotonic" != "no"; then
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
REALTIME_LIBS=$ac_cv_clock_monotonic
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC)
|
||||
AC_SUBST(HAVE_CLOCK_MONOTONIC)
|
||||
AC_SUBST_LIST(REALTIME_LIBS)
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
|
||||
ac_cv_clock_monotonic,
|
||||
[for libs in "" -lrt; do
|
||||
_SAVE_LIBS="$LIBS"
|
||||
LIBS="$LIBS $libs"
|
||||
AC_TRY_LINK([#include <time.h>],
|
||||
[ struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
||||
ac_cv_clock_monotonic=$libs
|
||||
LIBS="$_SAVE_LIBS"
|
||||
break,
|
||||
ac_cv_clock_monotonic=no)
|
||||
LIBS="$_SAVE_LIBS"
|
||||
done])
|
||||
if test "$ac_cv_clock_monotonic" != "no"; then
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
REALTIME_LIBS=$ac_cv_clock_monotonic
|
||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC)
|
||||
AC_SUBST(HAVE_CLOCK_MONOTONIC)
|
||||
AC_SUBST_LIST(REALTIME_LIBS)
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for pthread_cond_timedwait_monotonic_np,
|
||||
ac_cv_pthread_cond_timedwait_monotonic_np,
|
||||
|
|
@ -1633,11 +1524,6 @@ AC_LANG_CPLUSPLUS
|
|||
|
||||
ICONV_LIBS=
|
||||
|
||||
case $target_os in
|
||||
darwin*|mingw*)
|
||||
;;
|
||||
*)
|
||||
|
||||
AC_CHECK_LIB(c, iconv, [ICONV_LIBS=],
|
||||
AC_CHECK_LIB(iconv, iconv, [ICONV_LIBS="-liconv"],
|
||||
AC_CHECK_LIB(iconv, libiconv, [ICONV_LIBS="-liconv"])))
|
||||
|
|
@ -1685,9 +1571,6 @@ if test "$ac_cv_func_iconv" = "yes"; then
|
|||
fi
|
||||
LIBS=$_SAVE_LIBS
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST_LIST(ICONV_LIBS)
|
||||
|
||||
AM_LANGINFO_CODESET
|
||||
|
|
@ -1970,7 +1853,7 @@ dnl ========================================================
|
|||
MOZ_ARG_HEADER(External Packages)
|
||||
|
||||
case "$OS_TARGET" in
|
||||
WINNT|Darwin|Android)
|
||||
WINNT)
|
||||
MOZ_FOLD_LIBS=1
|
||||
;;
|
||||
*)
|
||||
|
|
@ -2604,7 +2487,7 @@ dnl --enable-webrtc to override. Can disable for everything in
|
|||
dnl the master list above.
|
||||
if test -n "$MOZ_WEBRTC"; then
|
||||
case "$target" in
|
||||
*-linux*|*-mingw*|*-darwin*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
|
||||
*-linux*|*-mingw*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
|
||||
dnl Leave enabled
|
||||
;;
|
||||
*)
|
||||
|
|
@ -2750,11 +2633,11 @@ dnl = Client drawing in titlebar
|
|||
dnl ========================================================
|
||||
if test -n "$MOZ_CAN_DRAW_IN_TITLEBAR"; then
|
||||
case "$OS_TARGET" in
|
||||
WINNT|Darwin)
|
||||
WINNT)
|
||||
AC_DEFINE(MOZ_CAN_DRAW_IN_TITLEBAR)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Drawing in the titlebar is only supported on Windows and Macintosh targets])
|
||||
AC_MSG_ERROR([Drawing in the titlebar is only supported on Windows targets])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
@ -2925,14 +2808,6 @@ if test -z "$MOZ_SYSTEM_LIBVPX"; then
|
|||
|
||||
dnl See if we have assembly on this platform.
|
||||
case "$OS_ARCH:$CPU_ARCH" in
|
||||
Darwin:x86)
|
||||
VPX_USE_YASM=1
|
||||
VPX_X86_ASM=1
|
||||
;;
|
||||
Darwin:x86_64)
|
||||
VPX_USE_YASM=1
|
||||
VPX_X86_ASM=1
|
||||
;;
|
||||
WINNT:x86_64)
|
||||
VPX_USE_YASM=1
|
||||
VPX_X86_ASM=1
|
||||
|
|
@ -3057,7 +2932,7 @@ dnl ========================================================
|
|||
|
||||
dnl If using Desktop Linux, ensure that the PA library is available
|
||||
case "$OS_TARGET" in
|
||||
WINNT|Darwin|Android|OpenBSD)
|
||||
WINNT)
|
||||
;;
|
||||
*)
|
||||
MOZ_PULSEAUDIO=1
|
||||
|
|
@ -3337,11 +3212,6 @@ MOZ_ARG_ENABLE_BOOL(gamepad,
|
|||
|
||||
if test "$MOZ_GAMEPAD"; then
|
||||
case "$OS_TARGET" in
|
||||
Darwin)
|
||||
if test -z "$MOZ_IOS"; then
|
||||
MOZ_GAMEPAD_BACKEND=cocoa
|
||||
fi
|
||||
;;
|
||||
WINNT)
|
||||
MOZ_GAMEPAD_BACKEND=windows
|
||||
;;
|
||||
|
|
@ -3389,14 +3259,6 @@ if test -n "$MOZ_LIBJPEG_TURBO" -a -n "$COMPILE_ENVIRONMENT"; then
|
|||
|
||||
dnl Do we support libjpeg-turbo on this platform?
|
||||
case "$OS_ARCH:$CPU_ARCH" in
|
||||
Darwin:x86)
|
||||
LIBJPEG_TURBO_ASFLAGS="-DPIC -DMACHO"
|
||||
;;
|
||||
Darwin:x86_64)
|
||||
LIBJPEG_TURBO_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
|
||||
;;
|
||||
Darwin:arm*)
|
||||
;;
|
||||
WINNT:x86)
|
||||
LIBJPEG_TURBO_ASFLAGS="-DPIC -DWIN32"
|
||||
;;
|
||||
|
|
@ -3476,9 +3338,6 @@ if test -n "$MOZ_LIBAV_FFT" -a -n "$COMPILE_ENVIRONMENT"; then
|
|||
AC_DEFINE(MOZ_LIBAV_FFT)
|
||||
dnl Do we support libav-fft on this platform?
|
||||
case "$OS_ARCH:$CPU_ARCH" in
|
||||
Darwin:x86_64)
|
||||
LIBAV_FFT_ASFLAGS="-D__x86_64__ -DPIC -DMACHO"
|
||||
;;
|
||||
WINNT:x86)
|
||||
LIBAV_FFT_ASFLAGS="-DPIC -DWIN32"
|
||||
;;
|
||||
|
|
@ -3889,11 +3748,11 @@ if test -n "$MOZ_DEBUG"; then
|
|||
fi
|
||||
|
||||
case "${OS_TARGET}" in
|
||||
Android|WINNT|Darwin)
|
||||
WINNT)
|
||||
MOZ_GLUE_IN_PROGRAM=
|
||||
;;
|
||||
*)
|
||||
dnl On !Android !Windows !OSX, we only want to link executables against mozglue
|
||||
dnl On !Windows, we only want to link executables against mozglue
|
||||
MOZ_GLUE_IN_PROGRAM=1
|
||||
AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
|
||||
;;
|
||||
|
|
@ -4863,13 +4722,6 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
|
|||
|
||||
if test "$MOZ_NECKO_WIFI"; then
|
||||
case "$OS_TARGET" in
|
||||
Android)
|
||||
;;
|
||||
Darwin)
|
||||
if test -z "$MOZ_IOS"; then
|
||||
NECKO_WIFI=1
|
||||
fi
|
||||
;;
|
||||
DragonFly|FreeBSD|WINNT)
|
||||
NECKO_WIFI=1
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -34,16 +34,6 @@
|
|||
# define SPS_ARCH_amd64 1
|
||||
# define SPS_OS_linux 1
|
||||
|
||||
#elif defined(__ANDROID__) && defined(__arm__)
|
||||
# define SPS_PLAT_arm_android 1
|
||||
# define SPS_ARCH_arm 1
|
||||
# define SPS_OS_android 1
|
||||
|
||||
#elif defined(__ANDROID__) && defined(__i386__)
|
||||
# define SPS_PLAT_x86_android 1
|
||||
# define SPS_ARCH_x86 1
|
||||
# define SPS_OS_android 1
|
||||
|
||||
#elif defined(__linux__) && defined(__i386__)
|
||||
# define SPS_PLAT_x86_linux 1
|
||||
# define SPS_ARCH_x86 1
|
||||
|
|
|
|||
|
|
@ -30,21 +30,11 @@
|
|||
# define LUL_ARCH_x64 1
|
||||
# define LUL_OS_linux 1
|
||||
|
||||
#elif defined(__linux__) && defined(__i386__) && !defined(__ANDROID__)
|
||||
#elif defined(__linux__) && defined(__i386__)
|
||||
# define LUL_PLAT_x86_linux 1
|
||||
# define LUL_ARCH_x86 1
|
||||
# define LUL_OS_linux 1
|
||||
|
||||
#elif defined(__ANDROID__) && defined(__arm__)
|
||||
# define LUL_PLAT_arm_android 1
|
||||
# define LUL_ARCH_arm 1
|
||||
# define LUL_OS_android 1
|
||||
|
||||
#elif defined(__ANDROID__) && defined(__i386__)
|
||||
# define LUL_PLAT_x86_android 1
|
||||
# define LUL_ARCH_x86 1
|
||||
# define LUL_OS_android 1
|
||||
|
||||
#else
|
||||
# error "Unsupported platform"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue