diff --git a/accessible/src/base/nsAccUtils.cpp b/accessible/src/base/nsAccUtils.cpp index 1b6a448024dd..a881cd5401cd 100644 --- a/accessible/src/base/nsAccUtils.cpp +++ b/accessible/src/base/nsAccUtils.cpp @@ -461,24 +461,24 @@ nsAccUtils::TextLength(nsAccessible *aAccessible) } bool -nsAccUtils::MustPrune(nsIAccessible *aAccessible) +nsAccUtils::MustPrune(nsAccessible* aAccessible) { - PRUint32 role = nsAccUtils::Role(aAccessible); + roles::Role role = aAccessible->Role(); // We don't prune buttons any more however AT don't expect children inside of // button in general, we allow menu buttons to have children to make them // accessible. - return role == nsIAccessibleRole::ROLE_MENUITEM || - role == nsIAccessibleRole::ROLE_COMBOBOX_OPTION || - role == nsIAccessibleRole::ROLE_OPTION || - role == nsIAccessibleRole::ROLE_ENTRY || - role == nsIAccessibleRole::ROLE_FLAT_EQUATION || - role == nsIAccessibleRole::ROLE_PASSWORD_TEXT || - role == nsIAccessibleRole::ROLE_TOGGLE_BUTTON || - role == nsIAccessibleRole::ROLE_GRAPHIC || - role == nsIAccessibleRole::ROLE_SLIDER || - role == nsIAccessibleRole::ROLE_PROGRESSBAR || - role == nsIAccessibleRole::ROLE_SEPARATOR; + return role == roles::MENUITEM || + role == roles::COMBOBOX_OPTION || + role == roles::OPTION || + role == roles::ENTRY || + role == roles::FLAT_EQUATION || + role == roles::PASSWORD_TEXT || + role == roles::TOGGLE_BUTTON || + role == roles::GRAPHIC || + role == roles::SLIDER || + role == roles::PROGRESSBAR || + role == roles::SEPARATOR; } nsresult diff --git a/accessible/src/base/nsAccUtils.h b/accessible/src/base/nsAccUtils.h index 393194b0129a..02b5fcebd2eb 100644 --- a/accessible/src/base/nsAccUtils.h +++ b/accessible/src/base/nsAccUtils.h @@ -295,7 +295,7 @@ public: * Return true if the given accessible can't have children. Used when exposing * to platform accessibility APIs, should the children be pruned off? */ - static bool MustPrune(nsIAccessible *aAccessible); + static bool MustPrune(nsAccessible* aAccessible); /** * Search hint enum constants. Used by GetHeaderCellsFor() method. diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index 54fa24ed9daf..41c19cf4445a 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -392,11 +392,17 @@ pref("browser.link.open_newwindow", 3); // 2: don't divert window.open with features pref("browser.link.open_newwindow.restriction", 0); -// Enable browser frames (including OOP), but make in-process browser frames -// the default. +// Enable browser frames (including OOP, except on Windows, where it doesn't +// work), but make in-process browser frames the default. pref("dom.mozBrowserFramesEnabled", true); pref("dom.mozBrowserFramesWhitelist", "http://homescreen.gaiamobile.org,http://browser.gaiamobile.org"); + +#ifdef XP_WIN +pref("dom.ipc.tabs.disabled", true); +#else pref("dom.ipc.tabs.disabled", false); +#endif + pref("dom.ipc.browser_frames.oop_by_default", false); // Temporary permission hack for WebSMS diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index b2246a6e226f..b75551a6d474 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -179,7 +179,10 @@ var shell = { if (!audioManager) return; - let volume = audioManager.masterVolume + delta / steps; + let currentVolume = audioManager.masterVolume; + let newStep = Math.round(steps * Math.sqrt(currentVolume)) + delta; + let volume = (newStep / steps) * (newStep / steps); + if (volume > 1) volume = 1; if (volume < 0) diff --git a/browser/Makefile.in b/browser/Makefile.in index ebe8b1fdb664..d3d2e3bea65b 100644 --- a/browser/Makefile.in +++ b/browser/Makefile.in @@ -16,6 +16,7 @@ PARALLEL_DIRS = \ locales \ modules \ themes \ + extensions \ $(NULL) DIRS = \ diff --git a/browser/app/macbuild/Contents/CodeResources b/browser/app/macbuild/Contents/CodeResources new file mode 120000 index 000000000000..1a65e20cbead --- /dev/null +++ b/browser/app/macbuild/Contents/CodeResources @@ -0,0 +1 @@ +_CodeSignature/CodeResources \ No newline at end of file diff --git a/browser/app/macbuild/Contents/_CodeSignature/CodeResources b/browser/app/macbuild/Contents/_CodeSignature/CodeResources new file mode 100644 index 000000000000..485e4c3753e4 --- /dev/null +++ b/browser/app/macbuild/Contents/_CodeSignature/CodeResources @@ -0,0 +1,45 @@ + + + + + rules + + ^Info.plist$ + + ^PkgInfo$ + + ^MacOS/ + + ^Resources/ + + ^MacOS/extensions/.* + omit + + + ^MacOS/distribution/.* + omit + + + ^MacOS/updates/.* + omit + + + ^MacOS/active-update.xml$ + omit + + + ^MacOS/defaults/.* + omit + + + ^MacOS/mozilla.cfg$ + omit + + + ^MacOS/updates.xml$ + omit + + + + + diff --git a/browser/app/profile/extensions/Makefile.in b/browser/app/profile/extensions/Makefile.in index 4f7b9f4163bc..0cf924535410 100644 --- a/browser/app/profile/extensions/Makefile.in +++ b/browser/app/profile/extensions/Makefile.in @@ -14,7 +14,6 @@ include $(DEPTH)/config/autoconf.mk DIRS = \ {972ce4c6-7e08-4474-a285-3208198ce6fd} \ - uriloader@pdf.js \ $(NULL) include $(topsrcdir)/config/rules.mk diff --git a/browser/app/profile/extensions/uriloader@pdf.js/Makefile.in b/browser/app/profile/extensions/uriloader@pdf.js/Makefile.in deleted file mode 100644 index 0c923a4f86d2..000000000000 --- a/browser/app/profile/extensions/uriloader@pdf.js/Makefile.in +++ /dev/null @@ -1,30 +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/. - -DEPTH = ../../../../.. -topsrcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -APPEXT = $(call core_abspath,$(DIST))/bin/extensions - -TEST_DIRS += test - -include $(DEPTH)/config/autoconf.mk -include $(topsrcdir)/config/rules.mk - -# Using the extension-files as an extension files whitelist to avoid noise -# in the xpi file such as MOZILLA.readme, install.pdf.in and this make file. -FILES := $(shell cat $(srcdir)/extension-files) - -libs:: - $(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(srcdir)/install.rdf.in > install.rdf - $(ZIP) -9X $(APPEXT)/uriloader@pdf.js.xpi install.rdf - cd $(call core_abspath,$(srcdir)) && \ - $(ZIP) -9X $(APPEXT)/uriloader@pdf.js.xpi $(FILES) - -install:: - $(SYSINSTALL) $(IFLAGS1) $(APPEXT)/uriloader@pdf.js.xpi $(DESTDIR)$(mozappdir)/extensions - -GARBAGE += install.rdf diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 5baca2f8432c..9acc22abb995 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -59,9 +59,8 @@ pref("extensions.hotfix.id", "firefox-hotfix@mozilla.org"); pref("extensions.hotfix.cert.checkAttributes", true); pref("extensions.hotfix.certs.1.sha1Fingerprint", "F1:DB:F9:6A:7B:B8:04:FA:48:3C:16:95:C7:2F:17:C6:5B:C2:9F:45"); -// Disable add-ons installed into the shared user and shared system areas by -// default. This does not include the application directory. See the SCOPE -// constants in AddonManager.jsm for values to use here +// Disable add-ons that are not installed by the user in all scopes by default. +// See the SCOPE constants in AddonManager.jsm for values to use here. pref("extensions.autoDisableScopes", 15); // Dictionary download preference @@ -146,6 +145,10 @@ pref("app.update.mode", 1); // If set to true, the Update Service will present no UI for any event. pref("app.update.silent", false); +// If set to true, the Update Service will apply updates in the background +// when it finishes downloading them. +pref("app.update.stage.enabled", true); + // Update service URL: pref("app.update.url", "https://aus3.mozilla.org/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml"); // app.update.url.manual is in branding section @@ -1027,7 +1030,7 @@ pref("devtools.layoutview.enabled", false); pref("devtools.layoutview.open", false); // Enable the Debugger -pref("devtools.debugger.enabled", false); +pref("devtools.debugger.enabled", true); pref("devtools.debugger.remote-enabled", false); pref("devtools.debugger.remote-host", "localhost"); pref("devtools.debugger.remote-port", 6000); diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js index 3e40b656adfd..29a2914f6e46 100644 --- a/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js @@ -122,6 +122,12 @@ function appUpdater() return; } + if (this.isApplied) { + this.setupUpdateButton("update.restart." + + (this.isMajor ? "upgradeButton" : "restartButton")); + return; + } + if (this.isDownloading) { this.startDownload(); return; @@ -151,6 +157,16 @@ appUpdater.prototype = this.um.activeUpdate.state == "pending-service"); }, + // true when there is an update already installed in the background. + get isApplied() { + if (this.update) + return this.update.state == "applied" || + this.update.state == "applied-service"; + return this.um.activeUpdate && + (this.um.activeUpdate.state == "applied" || + this.um.activeUpdate.state == "applied-service"); + }, + // true when there is an update download in progress. get isDownloading() { if (this.update) @@ -181,6 +197,12 @@ appUpdater.prototype = return true; // Firefox default is true }, + // true when updating in background is enabled. + get backgroundUpdateEnabled() { + return this.updateEnabled && + Services.prefs.getBoolPref("app.update.stage.enabled"); + }, + // true when updating is automatic. get updateAuto() { try { @@ -220,7 +242,7 @@ appUpdater.prototype = * Handles oncommand for the update button. */ buttonOnCommand: function() { - if (this.isPending) { + if (this.isPending || this.isApplied) { // Notify all windows that an application quit has been requested. let cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]. createInstance(Components.interfaces.nsISupportsPRBool); @@ -505,9 +527,34 @@ appUpdater.prototype = break; case Components.results.NS_OK: this.removeDownloadListener(); - this.selectPanel("updateButtonBox"); - this.setupUpdateButton("update.restart." + - (this.isMajor ? "upgradeButton" : "updateButton")); + if (this.backgroundUpdateEnabled) { + this.selectPanel("applying"); + let update = this.um.activeUpdate; + let self = this; + let timer = Components.classes["@mozilla.org/timer;1"] + .createInstance(Components.interfaces.nsITimer); + timer.initWithCallback(function () { + // Update the UI when the background updater is finished + let status = update.state; + if (status == "applied" || status == "applied-service") { + self.selectPanel("updateButtonBox"); + self.setupUpdateButton("update.restart." + + (self.isMajor ? "upgradeButton" : "restartButton")); + timer.cancel(); + timer = null; + } else if (status == "failed") { + // Background update has failed, let's show the UI responsible for + // prompting the user to update manually. + self.selectPanel("downloadFailed"); + timer.cancel(); + timer = null; + } + }, 500, timer.TYPE_REPEATING_SLACK); + } else { + this.selectPanel("updateButtonBox"); + this.setupUpdateButton("update.restart." + + (this.isMajor ? "upgradeButton" : "updateButton")); + } break; default: this.removeDownloadListener(); diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul index 6c41bc9a64d9..d6cef8da0230 100644 --- a/browser/base/content/aboutDialog.xul +++ b/browser/base/content/aboutDialog.xul @@ -64,6 +64,9 @@ + + + diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index b3dfb7d93600..f691616d7608 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4184,7 +4184,7 @@ var FullScreen = { cancelWarning: function(event) { if (!this.warningBox) return; - this.fullscreenDocUri = null; + this.fullscreenDoc = null; this.warningBox.removeEventListener("transitionend", this); if (this.warningFadeOutTimeout) { clearTimeout(this.warningFadeOutTimeout); @@ -4204,39 +4204,52 @@ var FullScreen = { }, setFullscreenAllowed: function(isApproved) { - let remember = document.getElementById("full-screen-remember-decision").checked; - if (remember) - Services.perms.add(this.fullscreenDocUri, - "fullscreen", - isApproved ? Services.perms.ALLOW_ACTION : Services.perms.DENY_ACTION, - Services.perms.EXPIRE_NEVER); - else if (isApproved) { - // The user has only temporarily approved fullscren for this domain. - // Add the permission (so Gecko knows fullscreen is approved) but add a - // listener to remove the permission when the chrome document exits fullscreen. - Services.perms.add(this.fullscreenDocUri, - "fullscreen", - Services.perms.ALLOW_ACTION, - Services.perms.EXPIRE_SESSION); - let host = this.fullscreenDocUri.host; - function onFullscreenchange(event) { - if (event.target == document && document.mozFullScreenElement == null) { - // The chrome document has left fullscreen. Remove the temporary permission grant. - Services.perms.remove(host, "fullscreen"); - document.removeEventListener("mozfullscreenchange", onFullscreenchange); + // The "remember decision" checkbox is hidden when showing for documents that + // the permission manager can't handle (documents with URIs without a host). + // We simply require those to be approved every time instead. + let rememberCheckbox = document.getElementById("full-screen-remember-decision"); + let uri = this.fullscreenDoc.nodePrincipal.URI; + if (!rememberCheckbox.hidden) { + if (rememberCheckbox.checked) + Services.perms.add(uri, + "fullscreen", + isApproved ? Services.perms.ALLOW_ACTION : Services.perms.DENY_ACTION, + Services.perms.EXPIRE_NEVER); + else if (isApproved) { + // The user has only temporarily approved fullscren for this fullscreen + // session only. Add the permission (so Gecko knows to approve any further + // fullscreen requests for this host in this fullscreen session) but add + // a listener to revoke the permission when the chrome document exits + // fullscreen. + Services.perms.add(uri, + "fullscreen", + Services.perms.ALLOW_ACTION, + Services.perms.EXPIRE_SESSION); + let host = uri.host; + function onFullscreenchange(event) { + if (event.target == document && document.mozFullScreenElement == null) { + // The chrome document has left fullscreen. Remove the temporary permission grant. + Services.perms.remove(host, "fullscreen"); + document.removeEventListener("mozfullscreenchange", onFullscreenchange); + } } + document.addEventListener("mozfullscreenchange", onFullscreenchange); } - document.addEventListener("mozfullscreenchange", onFullscreenchange); } if (this.warningBox) this.warningBox.setAttribute("fade-warning-out", "true"); - if (!isApproved) + // If the document has been granted fullscreen, notify Gecko so it can resume + // any pending pointer lock requests, otherwise exit fullscreen; the user denied + // the fullscreen request. + if (isApproved) + Services.obs.notifyObservers(this.fullscreenDoc, "fullscreen-approved", ""); + else document.mozCancelFullScreen(); }, warningBox: null, warningFadeOutTimeout: null, - fullscreenDocUri: null, + fullscreenDoc: null, // Shows the fullscreen approval UI, or if the domain has already been approved // for fullscreen, shows a warning that the site has entered fullscreen for a short @@ -4247,15 +4260,37 @@ var FullScreen = { return; // Set the strings on the fullscreen approval UI. - this.fullscreenDocUri = targetDoc.nodePrincipal.URI; - let utils = {}; - Cu.import("resource://gre/modules/DownloadUtils.jsm", utils); - let [displayHost, fullHost] = utils.DownloadUtils.getURIHost(this.fullscreenDocUri.spec); - let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); - let domainText = bundle.formatStringFromName("fullscreen.entered", [displayHost], 1); - document.getElementById("full-screen-domain-text").textContent = domainText; - let rememberText = bundle.formatStringFromName("fullscreen.rememberDecision", [displayHost], 1); - document.getElementById("full-screen-remember-decision").label = rememberText; + this.fullscreenDoc = targetDoc; + let uri = this.fullscreenDoc.nodePrincipal.URI; + let host = null; + try { + host = uri.host; + } catch (e) { } + let hostLabel = document.getElementById("full-screen-domain-text"); + let rememberCheckbox = document.getElementById("full-screen-remember-decision"); + let isApproved = false; + if (host) { + // Document's principal's URI has a host. Display a warning including the hostname and + // show UI to enable the user to permanently grant this host permission to enter fullscreen. + let utils = {}; + Cu.import("resource://gre/modules/DownloadUtils.jsm", utils); + let displayHost = utils.DownloadUtils.getURIHost(uri.spec)[0]; + let bundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); + + hostLabel.textContent = bundle.formatStringFromName("fullscreen.entered", [displayHost], 1); + hostLabel.removeAttribute("hidden"); + + rememberCheckbox.label = bundle.formatStringFromName("fullscreen.rememberDecision", [displayHost], 1); + rememberCheckbox.checked = false; + rememberCheckbox.removeAttribute("hidden"); + + // Note we only allow documents whose principal's URI has a host to + // store permission grants. + isApproved = Services.perms.testPermission(uri, "fullscreen") == Services.perms.ALLOW_ACTION; + } else { + hostLabel.setAttribute("hidden", "true"); + rememberCheckbox.setAttribute("hidden", "true"); + } // Note: the warning box can be non-null if the warning box from the previous request // wasn't hidden before another request was made. @@ -4269,11 +4304,10 @@ var FullScreen = { // If fullscreen mode has not yet been approved for the fullscreen // document's domain, show the approval UI and don't auto fade out the // fullscreen warning box. Otherwise, we're just notifying of entry into - // fullscreen mode. - let isApproved = - Services.perms.testPermission(this.fullscreenDocUri, "fullscreen") == Services.perms.ALLOW_ACTION; + // fullscreen mode. Note if the resource's host is null, we must be + // showing a local file or a local data URI, and we require explicit + // approval every time. let authUI = document.getElementById("full-screen-approval-pane"); - document.getElementById("full-screen-remember-decision").checked = false; if (isApproved) authUI.setAttribute("hidden", "true"); else { @@ -4471,7 +4505,7 @@ var XULBrowserWindow = { startTime: 0, statusText: "", isBusy: false, - inContentWhitelist: ["about:addons", "about:permissions", + inContentWhitelist: ["about:addons", "about:permissions", "about:sync-progress", "about:preferences"], QueryInterface: function (aIID) { diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index d5bf5349eb3c..f265b3966519 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -780,8 +780,16 @@ function saveMedia() var item = getSelectedImage(tree); var url = gImageView.data[tree.currentIndex][COL_IMAGE_ADDRESS]; - if (url) - saveURL(url, null, "SaveImageTitle", false, false, makeURI(item.baseURI)); + if (url) { + var titleKey = "SaveImageTitle"; + + if (item instanceof HTMLVideoElement) + titleKey = "SaveVideoTitle"; + else if (item instanceof HTMLAudioElement) + titleKey = "SaveAudioTitle"; + + saveURL(url, null, titleKey, false, false, makeURI(item.baseURI)); + } } else { var odir = selectSaveFolder(); diff --git a/browser/components/about/Makefile.in b/browser/components/about/Makefile.in index 9400a8dcbee7..e83ef7e13fb7 100644 --- a/browser/components/about/Makefile.in +++ b/browser/components/about/Makefile.in @@ -11,11 +11,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = browserabout LIBRARY_NAME = browserabout_s -FORCE_STATIC_LIB = 1 -ifndef MOZ_MEMORY -USE_STATIC_LIBS = 1 -endif +FORCE_STATIC_LIB = 1 +USE_STATIC_LIBS = 1 EXPORTS_NAMESPACES = mozilla/browser diff --git a/browser/components/build/Makefile.in b/browser/components/build/Makefile.in index 83e799bfbcb0..941982b9718c 100644 --- a/browser/components/build/Makefile.in +++ b/browser/components/build/Makefile.in @@ -16,11 +16,7 @@ IS_COMPONENT = 1 MODULE_NAME = nsBrowserCompsModule FORCE_SHARED_LIB = 1 -# Statically link the CRT on Windows if building against -# a XULRunner SDK. -ifdef LIBXUL_SDK USE_STATIC_LIBS = 1 -endif EXPORTS = nsBrowserCompsCID.h @@ -56,7 +52,7 @@ endif EXTRA_DSO_LDOPTS += \ $(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \ - $(XPCOM_GLUE_LDOPTS) \ + $(XPCOM_STATICRUNTIME_GLUE_LDOPTS) \ $(MOZ_COMPONENT_LIBS) \ $(NULL) diff --git a/browser/components/dirprovider/Makefile.in b/browser/components/dirprovider/Makefile.in index 0e138bf1a3de..08c23a9e7a6c 100644 --- a/browser/components/dirprovider/Makefile.in +++ b/browser/components/dirprovider/Makefile.in @@ -15,12 +15,7 @@ LIBRARY_NAME = browserdir_s TEST_DIRS += tests FORCE_STATIC_LIB = 1 - -# Because we are an application component, link against the CRT statically -# (on Windows, but only if we're not building our own CRT for jemalloc) -ifndef MOZ_MEMORY -USE_STATIC_LIBS = 1 -endif +USE_STATIC_LIBS = 1 EXPORTS_NAMESPACES = mozilla/browser EXPORTS_mozilla/browser = DirectoryProvider.h diff --git a/browser/components/feeds/src/Makefile.in b/browser/components/feeds/src/Makefile.in index 12ce272d0886..b4d386fe2abf 100644 --- a/browser/components/feeds/src/Makefile.in +++ b/browser/components/feeds/src/Makefile.in @@ -11,10 +11,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = browser_feeds LIBRARY_NAME = browser_feeds_s + FORCE_STATIC_LIB = 1 -ifndef MOZ_MEMORY USE_STATIC_LIBS = 1 -endif DEFINES += \ -DMOZ_APP_NAME=$(MOZ_APP_NAME) \ diff --git a/browser/components/migration/src/Makefile.in b/browser/components/migration/src/Makefile.in index f72bcb9a829f..5ae31136a5e3 100644 --- a/browser/components/migration/src/Makefile.in +++ b/browser/components/migration/src/Makefile.in @@ -11,10 +11,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = migration LIBRARY_NAME = migration_s + FORCE_STATIC_LIB = 1 -ifndef MOZ_MEMORY USE_STATIC_LIBS = 1 -endif EXTRA_PP_COMPONENTS = \ ProfileMigrator.js \ diff --git a/browser/components/privatebrowsing/src/Makefile.in b/browser/components/privatebrowsing/src/Makefile.in index 44f9ce62358a..7a7ab036eeb7 100644 --- a/browser/components/privatebrowsing/src/Makefile.in +++ b/browser/components/privatebrowsing/src/Makefile.in @@ -11,11 +11,9 @@ include $(DEPTH)/config/autoconf.mk MODULE = privatebrowsing LIBRARY_NAME = privatebrowsing_s -FORCE_STATIC_LIB = 1 -ifndef MOZ_MEMORY -USE_STATIC_LIBS = 1 -endif +FORCE_STATIC_LIB = 1 +USE_STATIC_LIBS = 1 CPPSRCS = \ nsPrivateBrowsingServiceWrapper.cpp \ diff --git a/browser/components/sessionstore/src/DocumentUtils.jsm b/browser/components/sessionstore/src/DocumentUtils.jsm index abad89e9bbb5..5e8257c1b616 100644 --- a/browser/components/sessionstore/src/DocumentUtils.jsm +++ b/browser/components/sessionstore/src/DocumentUtils.jsm @@ -73,16 +73,16 @@ let DocumentUtils = { // s with the multiple attribute are easier to determine the // default value since each + + + + + + + + \ No newline at end of file diff --git a/browser/components/shell/src/Makefile.in b/browser/components/shell/src/Makefile.in index 1575a2331515..e5e1d4035be5 100644 --- a/browser/components/shell/src/Makefile.in +++ b/browser/components/shell/src/Makefile.in @@ -11,11 +11,9 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = shellservice -FORCE_STATIC_LIB = 1 -ifndef MOZ_MEMORY -USE_STATIC_LIBS = 1 -endif +FORCE_STATIC_LIB = 1 +USE_STATIC_LIBS = 1 ifeq ($(OS_ARCH),WINNT) CPPSRCS = nsWindowsShellService.cpp diff --git a/browser/components/test/browser_bug538331.js b/browser/components/test/browser_bug538331.js index c530de739fae..9d0699b55635 100644 --- a/browser/components/test/browser_bug538331.js +++ b/browser/components/test/browser_bug538331.js @@ -412,9 +412,10 @@ function writeUpdatesToXMLFile(aText) const MODE_CREATE = 0x08; const MODE_TRUNCATE = 0x20; + const kIsWin = (navigator.platform.indexOf("Win") == 0); let file = Cc["@mozilla.org/file/directory_service;1"]. getService(Ci.nsIProperties). - get("XCurProcD", Ci.nsIFile); + get(kIsWin ? "UpdRootD" : "XCurProcD", Ci.nsIFile); file.append("updates.xml"); let fos = Cc["@mozilla.org/network/file-output-stream;1"]. createInstance(Ci.nsIFileOutputStream); diff --git a/browser/devtools/commandline/gcli.jsm b/browser/devtools/commandline/gcli.jsm index e2693fe89c0f..bcba334c54d1 100644 --- a/browser/devtools/commandline/gcli.jsm +++ b/browser/devtools/commandline/gcli.jsm @@ -6201,7 +6201,7 @@ var eagerHelperSettingSpec = { { name: 'always', value: Eagerness.ALWAYS }, ] }, - defaultValue: 1, + defaultValue: Eagerness.SOMETIMES, description: l10n.lookup('eagerHelperDesc'), ignoreTypeDifference: true }; @@ -6346,7 +6346,8 @@ FocusManager.prototype.removeMonitoredElement = function(element, where) { FocusManager.prototype.updatePosition = function(dimensions) { var ev = { tooltipVisible: this.isTooltipVisible, - outputVisible: this.isOutputVisible + outputVisible: this.isOutputVisible, + dimensions: dimensions }; this.onVisibilityChange(ev); }; diff --git a/browser/devtools/commandline/gclioutput.xhtml b/browser/devtools/commandline/gclioutput.xhtml new file mode 100644 index 000000000000..76172e6f5bb0 --- /dev/null +++ b/browser/devtools/commandline/gclioutput.xhtml @@ -0,0 +1,58 @@ + + + %webConsoleDTD; + ] +> + + + + + + + + + + + + +
+ + diff --git a/browser/devtools/commandline/gcliblank.xhtml b/browser/devtools/commandline/gclitooltip.xhtml similarity index 89% rename from browser/devtools/commandline/gcliblank.xhtml rename to browser/devtools/commandline/gclitooltip.xhtml index b8b86e6f7859..d268cd86c87b 100644 --- a/browser/devtools/commandline/gcliblank.xhtml +++ b/browser/devtools/commandline/gclitooltip.xhtml @@ -19,8 +19,8 @@ - -
-
+ +
+
diff --git a/browser/devtools/commandline/test/browser_gcli_web.js b/browser/devtools/commandline/test/browser_gcli_web.js old mode 100755 new mode 100644 diff --git a/browser/devtools/debugger/debugger-controller.js b/browser/devtools/debugger/debugger-controller.js index 02bd6855111d..3d6ae9bb09a2 100644 --- a/browser/devtools/debugger/debugger-controller.js +++ b/browser/devtools/debugger/debugger-controller.js @@ -533,32 +533,10 @@ StackFrames.prototype = { paramVar.setGrip(paramVal); this._addExpander(paramVar, paramVal); } - - // If we already found 'arguments', we are done here. - if ("arguments" in frame.environment.bindings.variables) { - // Signal that variables have been fetched. - DebuggerController.dispatchEvent("Debugger:FetchedVariables"); - return; - } - } - - // Sometimes in call frames with arguments we don't get 'arguments' in the - // environment (bug 746601) and we have to construct it manually. Note, that - // in this case arguments.callee will be absent, even in the cases where it - // shouldn't be. - if (frame.arguments && frame.arguments.length > 0) { - // Add "arguments". - let argsVar = localScope.addVar("arguments"); - argsVar.setGrip({ - type: "object", - class: "Arguments" - }); - this._addExpander(argsVar, frame.arguments); - - // Signal that variables have been fetched. - DebuggerController.dispatchEvent("Debugger:FetchedVariables"); } + // Signal that variables have been fetched. + DebuggerController.dispatchEvent("Debugger:FetchedVariables"); }, /** @@ -566,10 +544,9 @@ StackFrames.prototype = { * new properties. */ _addExpander: function SF__addExpander(aVar, aObject) { - // No need for expansion for null and undefined values, but we do need them - // for frame.arguments which is a regular array. + // No need for expansion for null and undefined values. if (!aVar || !aObject || typeof aObject !== "object" || - (aObject.type !== "object" && !Array.isArray(aObject))) { + aObject.type !== "object") { return; } @@ -588,23 +565,6 @@ StackFrames.prototype = { return; } - // For arrays we have to construct a grip-like object. - if (Array.isArray(aObject)) { - let properties = { length: { value: aObject.length } }; - for (let i = 0, l = aObject.length; i < l; i++) { - properties[i] = { value: aObject[i] }; - } - aVar.addProperties(properties); - - // Expansion handlers must be set after the properties are added. - for (let i = 0, l = aObject.length; i < l; i++) { - this._addExpander(aVar[i], aObject[i]); - } - - aVar.fetched = true; - return; - } - let objClient = this.activeThread.pauseGrip(aObject); objClient.getPrototypeAndProperties(function SF_onProtoAndProps(aResponse) { // Add __proto__. diff --git a/browser/devtools/debugger/test/browser_dbg_propertyview-07.js b/browser/devtools/debugger/test/browser_dbg_propertyview-07.js index a9eb80f7b5ed..25383c1d90c9 100644 --- a/browser/devtools/debugger/test/browser_dbg_propertyview-07.js +++ b/browser/devtools/debugger/test/browser_dbg_propertyview-07.js @@ -76,18 +76,17 @@ function testFrameParameters() is(localNodes[6].querySelector(".info").textContent, "undefined", "Should have the right property value for 'fArg'."); - // FIXME bug TODO: reenable - //is(localNodes[7].querySelector(".info").textContent, "1", - // "Should have the right property value for 'a'."); + is(localNodes[7].querySelector(".info").textContent, "1", + "Should have the right property value for 'a'."); - //is(localNodes[8].querySelector(".info").textContent, "[object Object]", - // "Should have the right property value for 'b'."); + is(localNodes[8].querySelector(".info").textContent, "[object Object]", + "Should have the right property value for 'b'."); - //is(localNodes[9].querySelector(".info").textContent, "[object Object]", - // "Should have the right property value for 'c'."); + is(localNodes[9].querySelector(".info").textContent, "[object Object]", + "Should have the right property value for 'c'."); - //is(localNodes[10].querySelector(".info").textContent, "[object Arguments]", - // "Should have the right property value for 'arguments'."); + is(localNodes[10].querySelector(".info").textContent, "[object Arguments]", + "Should have the right property value for 'arguments'."); resumeAndFinish(); }}, 0); diff --git a/browser/devtools/debugger/test/browser_dbg_propertyview-08.js b/browser/devtools/debugger/test/browser_dbg_propertyview-08.js index 418715eae938..7a9a86621504 100644 --- a/browser/devtools/debugger/test/browser_dbg_propertyview-08.js +++ b/browser/devtools/debugger/test/browser_dbg_propertyview-08.js @@ -56,7 +56,7 @@ function testFrameParameters() is(localNodes[0].querySelector(".info").textContent, "[object Proxy]", "Should have the right property value for 'this'."); - // Expand the '__proto__', 'arguments' and 'a' tree nodes. This causes + // Expand the 'this', 'arguments' and 'c' tree nodes. This causes // their properties to be retrieved and displayed. localNodes[0].expand(); localNodes[9].expand(); @@ -67,6 +67,7 @@ function testFrameParameters() // content window timers are disabled while the debuggee is paused. let count = 0; let intervalID = window.setInterval(function(){ + dump("count: "+count+" "); if (++count > 50) { ok(false, "Timed out while polling for the properties."); resumeAndFinish(); @@ -96,17 +97,17 @@ function testFrameParameters() .textContent, 1, "Should have the right value for 'c.a'."); - //is(localNodes[10].querySelector(".info").textContent, - // "[object Arguments]", - // "Should have the right property value for 'arguments'."); + is(localNodes[10].querySelector(".info").textContent, + "[object Arguments]", + "Should have the right property value for 'arguments'."); - //is(localNodes[10].querySelector(".property > .title > .key") - // .textContent, "length", - // "Should have the right property name for 'length'."); + is(localNodes[10].querySelectorAll(".property > .title > .key")[7] + .textContent, "length", + "Should have the right property name for 'length'."); - //is(localNodes[10].querySelector(".property > .title > .value") - // .textContent, 5, - // "Should have the right argument length."); + is(localNodes[10].querySelectorAll(".property > .title > .value")[7] + .textContent, 5, + "Should have the right argument length."); resumeAndFinish(); }, 100); diff --git a/browser/devtools/jar.mn b/browser/devtools/jar.mn index b9978d47e354..4e16157bcc19 100644 --- a/browser/devtools/jar.mn +++ b/browser/devtools/jar.mn @@ -23,4 +23,5 @@ browser.jar: content/browser/debugger-controller.js (debugger/debugger-controller.js) content/browser/debugger-view.js (debugger/debugger-view.js) content/browser/devtools/gcli.css (commandline/gcli.css) - content/browser/devtools/gcliblank.xhtml (commandline/gcliblank.xhtml) + content/browser/devtools/gclioutput.xhtml (commandline/gclioutput.xhtml) + content/browser/devtools/gclitooltip.xhtml (commandline/gclitooltip.xhtml) diff --git a/browser/devtools/shared/DeveloperToolbar.jsm b/browser/devtools/shared/DeveloperToolbar.jsm index b7ef2fd2693d..c60c5ca32e69 100644 --- a/browser/devtools/shared/DeveloperToolbar.jsm +++ b/browser/devtools/shared/DeveloperToolbar.jsm @@ -7,7 +7,6 @@ const EXPORTED_SYMBOLS = [ "DeveloperToolbar" ]; const NS_XHTML = "http://www.w3.org/1999/xhtml"; -const URI_GCLIBLANK = "chrome://browser/content/devtools/gcliblank.xhtml"; Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); Components.utils.import("resource://gre/modules/Services.jsm"); @@ -79,7 +78,6 @@ DeveloperToolbar.prototype.toggle = function DT_toggle() this.hide(); } else { this.show(); - this._input.focus(); } }; @@ -154,9 +152,11 @@ DeveloperToolbar.prototype._onload = function DT_onload() this.display.onOutput.add(this.outputPanel._outputChanged, this.outputPanel); this._chromeWindow.getBrowser().tabContainer.addEventListener("TabSelect", this, false); - this._chromeWindow.getBrowser().addEventListener("load", this, true); + this._chromeWindow.getBrowser().addEventListener("load", this, true); + this._chromeWindow.addEventListener("resize", this, false); this._element.hidden = false; + this._input.focus(); this._notify(NOTIFICATIONS.SHOW); if (this._pendingShowCallback) { @@ -263,65 +263,10 @@ DeveloperToolbar.prototype.handleEvent = function DT_handleEvent(aEvent) }); } } -}; - -/** - * Add class="gcli-panel-inner-arrowcontent" to a panel's - * || so we can alter the styling - * without complex CSS expressions. - * @param aPanel The panel to affect - */ -function getContentBox(aPanel) -{ - let container = aPanel.ownerDocument.getAnonymousElementByAttribute( - aPanel, "anonid", "container"); - return container.querySelector(".panel-inner-arrowcontent"); -} - -/** - * Helper function to calculate the sum of the vertical padding and margins - * between a nested node |aNode| and an ancestor |aRoot|. Iff all of the - * children of aRoot are 'only-childs' until you get to aNode then to avoid - * scroll-bars, the 'correct' height of aRoot is verticalSpacing + aNode.height. - * @param aNode The child node whose height is known. - * @param aRoot The parent height whose height we can affect. - * @return The sum of the vertical padding/margins in between aNode and aRoot. - */ -function getVerticalSpacing(aNode, aRoot) -{ - let win = aNode.ownerDocument.defaultView; - - function pxToNum(styles, property) { - return parseInt(styles.getPropertyValue(property).replace(/px$/, ''), 10); + else if (aEvent.type == "resize") { + this.outputPanel._resize(); } - - let vertSpacing = 0; - do { - let styles = win.getComputedStyle(aNode); - vertSpacing += pxToNum(styles, "padding-top"); - vertSpacing += pxToNum(styles, "padding-bottom"); - vertSpacing += pxToNum(styles, "margin-top"); - vertSpacing += pxToNum(styles, "margin-bottom"); - vertSpacing += pxToNum(styles, "border-top-width"); - vertSpacing += pxToNum(styles, "border-bottom-width"); - - let prev = aNode.previousSibling; - while (prev != null) { - vertSpacing += prev.clientHeight; - prev = prev.previousSibling; - } - - let next = aNode.nextSibling; - while (next != null) { - vertSpacing += next.clientHeight; - next = next.nextSibling; - } - - aNode = aNode.parentNode; - } while (aNode !== aRoot); - - return vertSpacing + 9; -} +}; /** * Panel to handle command line output. @@ -332,32 +277,31 @@ function getVerticalSpacing(aNode, aRoot) function OutputPanel(aChromeDoc, aInput, aLoadCallback) { this._input = aInput; - this._anchor = aChromeDoc.getElementById("developer-toolbar"); + this._toolbar = aChromeDoc.getElementById("developer-toolbar"); this._loadCallback = aLoadCallback; /* -