diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 080e49bf6de0..300c15d4cfd9 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -216,6 +216,8 @@ pref("browser.shell.defaultBrowserCheckCount", 0); // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore pref("browser.startup.page", 1); pref("browser.startup.homepage", "chrome://branding/locale/browserconfig.properties"); +// Whether we should skip the homepage when opening the first-run page +pref("browser.startup.firstrunSkipsHomepage", false); pref("browser.slowStartup.notificationDisabled", false); pref("browser.slowStartup.timeThreshold", 40000); diff --git a/browser/base/content/downloadManagerOverlay.xul b/browser/base/content/downloadManagerOverlay.xul deleted file mode 100644 index 9987820cb92e..000000000000 --- a/browser/base/content/downloadManagerOverlay.xul +++ /dev/null @@ -1,32 +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 browserMountPoints.inc - - - - - - diff --git a/browser/base/jar.mn b/browser/base/jar.mn index 113b5248a589..9e7d61ca2b3b 100644 --- a/browser/base/jar.mn +++ b/browser/base/jar.mn @@ -4,7 +4,6 @@ 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://mozapps/content/update/updates.xul chrome://browser/content/softwareUpdateOverlay.xul #endif #ifdef XP_WIN @@ -174,7 +173,6 @@ browser.jar: * 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/softwareUpdateOverlay.xul (content/softwareUpdateOverlay.xul) #endif * content/browser/viewSourceOverlay.xul (content/viewSourceOverlay.xul) diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js index 689939b119d3..121d1af56950 100644 --- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -551,8 +551,11 @@ nsBrowserContentHandler.prototype = { if (startPage == "about:blank") startPage = ""; - // Only show the startPage if we're not restoring an update session. - if (overridePage && startPage && !willRestoreSession) + let skipStartPage = override == OVERRIDE_NEW_PROFILE && + prefb.getBoolPref("browser.startup.firstrunSkipsHomepage"); + // Only show the startPage if we're not restoring an update session and are + // not set to skip the start page on this profile + if (overridePage && startPage && !willRestoreSession && !skipStartPage) return overridePage + "|" + startPage; return overridePage || startPage || "about:blank"; diff --git a/browser/components/syncedtabs/SyncedTabsDeckComponent.js b/browser/components/syncedtabs/SyncedTabsDeckComponent.js index d9d93da75d2f..dfbec056ca0b 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckComponent.js +++ b/browser/components/syncedtabs/SyncedTabsDeckComponent.js @@ -52,6 +52,7 @@ function SyncedTabsDeckComponent({ SyncedTabs: SyncedTabs, clipboardHelper: Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper), + getChromeWindow: this._getChromeWindow, }); } diff --git a/browser/components/syncedtabs/TabListComponent.js b/browser/components/syncedtabs/TabListComponent.js index 08269a4131f5..d3aace8f9ced 100644 --- a/browser/components/syncedtabs/TabListComponent.js +++ b/browser/components/syncedtabs/TabListComponent.js @@ -29,11 +29,13 @@ this.EXPORTED_SYMBOLS = [ * to state changes so it can rerender. */ -function TabListComponent({window, store, View, SyncedTabs, clipboardHelper}) { +function TabListComponent({window, store, View, SyncedTabs, clipboardHelper, + getChromeWindow}) { this._window = window; this._store = store; this._View = View; this._clipboardHelper = clipboardHelper; + this._getChromeWindow = getChromeWindow; // used to trigger Sync from context menu this._SyncedTabs = SyncedTabs; } @@ -116,7 +118,7 @@ TabListComponent.prototype = { BrowserUITelemetry.countSyncedTabEvent("open", "sidebar"); }, - onOpenTabs(urls, where, params) { + onOpenTabs(urls, where) { if (!PlacesUIUtils.confirmOpenInTabs(urls.length, this._window)) { return; } @@ -124,9 +126,8 @@ TabListComponent.prototype = { this._window.openDialog(this._window.getBrowserURL(), "_blank", "chrome,dialog=no,all", urls.join("|")); } else { - for (let url of urls) { - this._window.openUILinkIn(url, where, params); - } + let loadInBackground = where == "tabshifted" ? true : false; + this._getChromeWindow(this._window).gBrowser.loadTabs(urls, loadInBackground, false); } BrowserUITelemetry.countSyncedTabEvent("openmultiple", "sidebar"); }, diff --git a/browser/components/syncedtabs/TabListView.js b/browser/components/syncedtabs/TabListView.js index 31d04d4f945d..dab15101bf83 100644 --- a/browser/components/syncedtabs/TabListView.js +++ b/browser/components/syncedtabs/TabListView.js @@ -289,7 +289,7 @@ TabListView.prototype = { if (where != "current") { const tabs = itemNode.querySelector(".item-tabs-list").childNodes; const urls = [...tabs].map(tab => tab.dataset.url); - this.props.onOpenTabs(urls, where, {}); + this.props.onOpenTabs(urls, where); } } diff --git a/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js b/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js index 4a8951f9a189..0b0665a1b3de 100644 --- a/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js +++ b/browser/components/syncedtabs/test/xpcshell/test_TabListComponent.js @@ -68,6 +68,13 @@ add_task(function* testInitUninit() { add_task(function* testActions() { let store = new SyncedTabsListStore(); + let chromeWindowMock = { + gBrowser: { + loadTabs() {}, + }, + }; + let getChromeWindowMock = sinon.stub(); + getChromeWindowMock.returns(chromeWindowMock); let clipboardHelperMock = { copyString() {}, }; @@ -84,7 +91,8 @@ add_task(function* testActions() { }; let component = new TabListComponent({ window: windowMock, store, View: null, SyncedTabs, - clipboardHelper: clipboardHelperMock}); + clipboardHelper: clipboardHelperMock, + getChromeWindow: getChromeWindowMock }); sinon.stub(store, "getData"); component.onFilter("query"); @@ -127,12 +135,13 @@ add_task(function* testActions() { component.onOpenTab("uri", "where", "params"); Assert.ok(windowMock.openUILinkIn.calledWith("uri", "where", "params")); - component.onOpenTabs(["uri1", "uri2"], "where", "params"); - Assert.ok(windowMock.openUILinkIn.calledWith("uri1", "where", "params")); - Assert.ok(windowMock.openUILinkIn.calledWith("uri2", "where", "params")); - sinon.spy(windowMock, "openDialog"); - component.onOpenTabs(["uri1", "uri2"], "window", "params"); - Assert.deepEqual(windowMock.openDialog.args[0][3], ["uri1", "uri2"].join("|")); + sinon.spy(chromeWindowMock.gBrowser, "loadTabs"); + let tabsToOpen = ["uri1", "uri2"]; + component.onOpenTabs(tabsToOpen, "where"); + Assert.ok(getChromeWindowMock.calledWith(windowMock)); + Assert.ok(chromeWindowMock.gBrowser.loadTabs.calledWith(tabsToOpen, false, false)); + component.onOpenTabs(tabsToOpen, "tabshifted"); + Assert.ok(chromeWindowMock.gBrowser.loadTabs.calledWith(tabsToOpen, true, false)); sinon.spy(clipboardHelperMock, "copyString"); component.onCopyTabLocation("uri"); diff --git a/browser/components/uitour/UITour-lib.js b/browser/components/uitour/UITour-lib.js index a0f782f24d7b..40c1a82b4d99 100644 --- a/browser/components/uitour/UITour-lib.js +++ b/browser/components/uitour/UITour-lib.js @@ -220,6 +220,10 @@ if (typeof Mozilla == 'undefined') { }); }; + Mozilla.UITour.showNewTab = function() { + _sendEvent('showNewTab'); + }; + Mozilla.UITour.getConfiguration = function(configName, callback) { _sendEvent('getConfiguration', { callbackID: _waitForCallback(callback), diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index cd4e1743438b..2e25fdd458f4 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -527,6 +527,11 @@ this.UITour = { break; } + case "showNewTab": { + this.showNewTab(window, browser); + break; + } + case "getConfiguration": { if (typeof data.configuration != "string") { log.warn("getConfiguration: No configuration option specified"); @@ -1744,6 +1749,10 @@ this.UITour = { } }, + showNewTab: function(aWindow, aBrowser) { + aWindow.openLinkIn("about:newtab", "current", {targetBrowser: aBrowser}); + }, + hideAnnotationsForPanel: function(aEvent, aTargetPositionCallback) { let win = aEvent.target.ownerGlobal; let annotationElements = new Map([ diff --git a/browser/components/uitour/test/browser.ini b/browser/components/uitour/test/browser.ini index fd1205d45d05..ae027a738a90 100644 --- a/browser/components/uitour/test/browser.ini +++ b/browser/components/uitour/test/browser.ini @@ -16,6 +16,9 @@ skip-if = true # Bug 1113038 - Intermittent "Popup was opened" [browser_trackingProtection.js] skip-if = os == "linux" # Intermittent NS_ERROR_NOT_AVAILABLE [nsIUrlClassifierDBService.beginUpdate] tag = trackingprotection +support-files = + !/browser/base/content/test/general/benignPage.html + !/browser/base/content/test/general/trackingPage.html [browser_trackingProtection_tour.js] tag = trackingprotection [browser_showMenu_controlCenter.js] @@ -41,5 +44,6 @@ skip-if = true # Disabled due to frequent failures, bugs 1026310 and 1032137 skip-if = true # Disabled pending removal of pocket UI Tour [browser_UITour_registerPageID.js] [browser_UITour_resetProfile.js] +[browser_UITour_showNewTab.js] [browser_UITour_sync.js] [browser_UITour_toggleReaderMode.js] diff --git a/browser/components/uitour/test/browser_UITour_showNewTab.js b/browser/components/uitour/test/browser_UITour_showNewTab.js new file mode 100644 index 000000000000..2deb08148aca --- /dev/null +++ b/browser/components/uitour/test/browser_UITour_showNewTab.js @@ -0,0 +1,17 @@ +"use strict"; + +var gTestTab; +var gContentAPI; +var gContentWindow; + +add_task(setup_UITourTest); + +// Test that we can switch to about:newtab +add_UITour_task(function* test_aboutNewTab() { + let newTabLoaded = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, "about:newtab"); + info("Showing about:newtab"); + yield gContentAPI.showNewTab(); + info("Waiting for about:newtab to load"); + yield newTabLoaded; + is(gBrowser.selectedBrowser.currentURI.spec, "about:newtab", "Loaded about:newtab"); +}); diff --git a/browser/config/mozconfigs/linux32/artifact b/browser/config/mozconfigs/linux32/artifact index 29eb8ba1c227..b52d41e2adf7 100644 --- a/browser/config/mozconfigs/linux32/artifact +++ b/browser/config/mozconfigs/linux32/artifact @@ -8,3 +8,5 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO diff --git a/browser/config/mozconfigs/linux32/beta b/browser/config/mozconfigs/linux32/beta index 315c32b843ac..346a8bdaa7d0 100644 --- a/browser/config/mozconfigs/linux32/beta +++ b/browser/config/mozconfigs/linux32/beta @@ -11,5 +11,4 @@ ac_add_options --enable-verify-mar mk_add_options MOZ_PGO=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux32/debug b/browser/config/mozconfigs/linux32/debug index de97087d2a8b..542c20f2c453 100644 --- a/browser/config/mozconfigs/linux32/debug +++ b/browser/config/mozconfigs/linux32/debug @@ -19,6 +19,5 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/linux32/debug-artifact b/browser/config/mozconfigs/linux32/debug-artifact index 3fc3faf89e1a..1d368e98134a 100644 --- a/browser/config/mozconfigs/linux32/debug-artifact +++ b/browser/config/mozconfigs/linux32/debug-artifact @@ -8,5 +8,7 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO ac_add_options --enable-debug diff --git a/browser/config/mozconfigs/linux32/nightly b/browser/config/mozconfigs/linux32/nightly index ce1c5e7f643e..468c3d263fe9 100644 --- a/browser/config/mozconfigs/linux32/nightly +++ b/browser/config/mozconfigs/linux32/nightly @@ -10,6 +10,5 @@ STRIP_FLAGS="--strip-debug" ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/linux32/release b/browser/config/mozconfigs/linux32/release index b17186666b91..8982e2716660 100644 --- a/browser/config/mozconfigs/linux32/release +++ b/browser/config/mozconfigs/linux32/release @@ -18,5 +18,4 @@ mk_add_options MOZ_PGO=1 # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux64/artifact b/browser/config/mozconfigs/linux64/artifact index 524a25e69022..4e13ca2509b9 100644 --- a/browser/config/mozconfigs/linux64/artifact +++ b/browser/config/mozconfigs/linux64/artifact @@ -8,3 +8,5 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO diff --git a/browser/config/mozconfigs/linux64/beta b/browser/config/mozconfigs/linux64/beta index f349ee9f8355..34e1b63c7e6b 100644 --- a/browser/config/mozconfigs/linux64/beta +++ b/browser/config/mozconfigs/linux64/beta @@ -11,5 +11,4 @@ ac_add_options --enable-verify-mar mk_add_options MOZ_PGO=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/linux64/debug b/browser/config/mozconfigs/linux64/debug index a879da75e6e9..8196af81bbf4 100644 --- a/browser/config/mozconfigs/linux64/debug +++ b/browser/config/mozconfigs/linux64/debug @@ -17,6 +17,5 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/linux64/debug-artifact b/browser/config/mozconfigs/linux64/debug-artifact index 6dc4d13cea88..f95e7c01df72 100644 --- a/browser/config/mozconfigs/linux64/debug-artifact +++ b/browser/config/mozconfigs/linux64/debug-artifact @@ -8,6 +8,8 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO ac_add_options --enable-debug diff --git a/browser/config/mozconfigs/linux64/hazards b/browser/config/mozconfigs/linux64/hazards index 03d72ef7ec28..3767d941e68f 100644 --- a/browser/config/mozconfigs/linux64/hazards +++ b/browser/config/mozconfigs/linux64/hazards @@ -29,6 +29,11 @@ CFLAGS="$CFLAGS -Wno-attributes" CPPFLAGS="$CPPFLAGS -Wno-attributes" CXXFLAGS="$CXXFLAGS -Wno-attributes" +# Override rust toolchain paths. In this build they're in $TOOLTOOL_DIR +# instead of $topsrcdir as referenced by mozconfig.common. +RUSTC=$TOOLTOOL_DIR/rustc/bin/rustc +CARGO=$TOOLTOOL_DIR/rustc/bin/cargo + export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig . $topsrcdir/build/unix/mozconfig.gtk diff --git a/browser/config/mozconfigs/linux64/nightly b/browser/config/mozconfigs/linux64/nightly index 41f5c2249590..ac48aa4fd4c3 100644 --- a/browser/config/mozconfigs/linux64/nightly +++ b/browser/config/mozconfigs/linux64/nightly @@ -10,6 +10,5 @@ STRIP_FLAGS="--strip-debug" ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/linux64/release b/browser/config/mozconfigs/linux64/release index 2090f3525de1..d38600b9e47e 100644 --- a/browser/config/mozconfigs/linux64/release +++ b/browser/config/mozconfigs/linux64/release @@ -18,5 +18,4 @@ mk_add_options MOZ_PGO=1 # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/macosx-universal/beta b/browser/config/mozconfigs/macosx-universal/beta index 07f089a679ab..64e7ca847816 100644 --- a/browser/config/mozconfigs/macosx-universal/beta +++ b/browser/config/mozconfigs/macosx-universal/beta @@ -10,6 +10,5 @@ fi ac_add_options --enable-official-branding ac_add_options --enable-verify-mar -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx-universal/nightly b/browser/config/mozconfigs/macosx-universal/nightly index 1928d79afd1a..e8280983e40f 100644 --- a/browser/config/mozconfigs/macosx-universal/nightly +++ b/browser/config/mozconfigs/macosx-universal/nightly @@ -16,6 +16,5 @@ fi ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx-universal/release b/browser/config/mozconfigs/macosx-universal/release index c352022e3615..8942f6229eed 100644 --- a/browser/config/mozconfigs/macosx-universal/release +++ b/browser/config/mozconfigs/macosx-universal/release @@ -16,6 +16,5 @@ ac_add_options --enable-verify-mar # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/artifact b/browser/config/mozconfigs/macosx64/artifact index 303b180b7d46..9a5bfbb11c5d 100644 --- a/browser/config/mozconfigs/macosx64/artifact +++ b/browser/config/mozconfigs/macosx64/artifact @@ -11,3 +11,5 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO diff --git a/browser/config/mozconfigs/macosx64/beta b/browser/config/mozconfigs/macosx64/beta index 64cf69d866f7..53608e59761d 100644 --- a/browser/config/mozconfigs/macosx64/beta +++ b/browser/config/mozconfigs/macosx64/beta @@ -10,6 +10,5 @@ fi ac_add_options --enable-official-branding ac_add_options --enable-verify-mar -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/debug b/browser/config/mozconfigs/macosx64/debug index 4b052aa00d03..923d020a9cdf 100644 --- a/browser/config/mozconfigs/macosx64/debug +++ b/browser/config/mozconfigs/macosx64/debug @@ -19,6 +19,5 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/debug-artifact b/browser/config/mozconfigs/macosx64/debug-artifact index 3afa8e4bf645..38feec6337c8 100644 --- a/browser/config/mozconfigs/macosx64/debug-artifact +++ b/browser/config/mozconfigs/macosx64/debug-artifact @@ -8,5 +8,7 @@ ac_add_options --enable-artifact-builds ac_add_options --enable-artifact-build-symbols unset CC unset CXX +unset RUSTC +unset CARGO ac_add_options --enable-debug diff --git a/browser/config/mozconfigs/macosx64/nightly b/browser/config/mozconfigs/macosx64/nightly index 0a915da54660..d75737fa41cf 100644 --- a/browser/config/mozconfigs/macosx64/nightly +++ b/browser/config/mozconfigs/macosx64/nightly @@ -16,6 +16,5 @@ fi ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/opt-static-analysis b/browser/config/mozconfigs/macosx64/opt-static-analysis index 72ed3d6bdd58..50739c01ff99 100644 --- a/browser/config/mozconfigs/macosx64/opt-static-analysis +++ b/browser/config/mozconfigs/macosx64/opt-static-analysis @@ -10,7 +10,6 @@ ac_add_options --enable-dmd ac_add_options --enable-clang-plugin -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/macosx64/release b/browser/config/mozconfigs/macosx64/release index 562a16b50ebe..d033c780c8e0 100644 --- a/browser/config/mozconfigs/macosx64/release +++ b/browser/config/mozconfigs/macosx64/release @@ -16,6 +16,5 @@ ac_add_options --enable-verify-mar # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/win32/beta b/browser/config/mozconfigs/win32/beta index cc14d6800ac5..c83335fbd123 100644 --- a/browser/config/mozconfigs/win32/beta +++ b/browser/config/mozconfigs/win32/beta @@ -13,6 +13,4 @@ mk_add_options MOZ_PGO=1 ac_add_options --enable-official-branding ac_add_options --enable-verify-mar -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win32/clang b/browser/config/mozconfigs/win32/clang index a79bc780e0d3..426958d45568 100644 --- a/browser/config/mozconfigs/win32/clang +++ b/browser/config/mozconfigs/win32/clang @@ -12,8 +12,6 @@ ac_add_options --enable-optimize . $topsrcdir/build/win32/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" . "$topsrcdir/build/mozconfig.clang-cl" diff --git a/browser/config/mozconfigs/win32/clang-debug b/browser/config/mozconfigs/win32/clang-debug index 958741bf4daf..b354d25acfbe 100644 --- a/browser/config/mozconfigs/win32/clang-debug +++ b/browser/config/mozconfigs/win32/clang-debug @@ -13,8 +13,6 @@ ac_add_options --enable-debug . $topsrcdir/build/win32/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" . "$topsrcdir/build/mozconfig.clang-cl" diff --git a/browser/config/mozconfigs/win32/debug b/browser/config/mozconfigs/win32/debug index 6beee93c284f..e8bb581a0703 100644 --- a/browser/config/mozconfigs/win32/debug +++ b/browser/config/mozconfigs/win32/debug @@ -21,7 +21,5 @@ export MOZ_PACKAGE_JSSHELL=1 ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/win32/debug-static-analysis b/browser/config/mozconfigs/win32/debug-static-analysis index efc0820b5fa7..29bfb2fddb2b 100644 --- a/browser/config/mozconfigs/win32/debug-static-analysis +++ b/browser/config/mozconfigs/win32/debug-static-analysis @@ -12,8 +12,6 @@ ac_add_options --enable-clang-plugin . $topsrcdir/build/win32/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" . "$topsrcdir/build/mozconfig.clang-cl" diff --git a/browser/config/mozconfigs/win32/nightly b/browser/config/mozconfigs/win32/nightly index 54fbc93f174d..7cd328b54772 100644 --- a/browser/config/mozconfigs/win32/nightly +++ b/browser/config/mozconfigs/win32/nightly @@ -6,7 +6,5 @@ ac_add_options --enable-verify-mar ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/win32/release b/browser/config/mozconfigs/win32/release index daaa45f89823..ea1f242efbdd 100644 --- a/browser/config/mozconfigs/win32/release +++ b/browser/config/mozconfigs/win32/release @@ -19,6 +19,4 @@ ac_add_options --enable-verify-mar # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64/beta b/browser/config/mozconfigs/win64/beta index 6fc4ebe36743..6b9960abc3c5 100644 --- a/browser/config/mozconfigs/win64/beta +++ b/browser/config/mozconfigs/win64/beta @@ -14,6 +14,4 @@ mk_add_options MOZ_PGO=1 ac_add_options --enable-official-branding ac_add_options --enable-verify-mar -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/mozconfigs/win64/clang b/browser/config/mozconfigs/win64/clang index 0bc3a7ebebe4..8de249b45190 100644 --- a/browser/config/mozconfigs/win64/clang +++ b/browser/config/mozconfigs/win64/clang @@ -14,8 +14,6 @@ ac_add_options --enable-optimize . $topsrcdir/build/win64/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" . "$topsrcdir/build/mozconfig.clang-cl" diff --git a/browser/config/mozconfigs/win64/clang-debug b/browser/config/mozconfigs/win64/clang-debug index e254d76622ee..ba416e22fc04 100644 --- a/browser/config/mozconfigs/win64/clang-debug +++ b/browser/config/mozconfigs/win64/clang-debug @@ -15,8 +15,6 @@ ac_add_options --enable-debug . $topsrcdir/build/win64/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" . "$topsrcdir/build/mozconfig.clang-cl" diff --git a/browser/config/mozconfigs/win64/debug b/browser/config/mozconfigs/win64/debug index db4eb59406ad..723fa0e0b08a 100644 --- a/browser/config/mozconfigs/win64/debug +++ b/browser/config/mozconfigs/win64/debug @@ -23,7 +23,5 @@ ac_add_options --with-branding=browser/branding/nightly . $topsrcdir/build/win64/mozconfig.vs-latest -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/win64/nightly b/browser/config/mozconfigs/win64/nightly index f710aabe3a01..9c31c44644ee 100644 --- a/browser/config/mozconfigs/win64/nightly +++ b/browser/config/mozconfigs/win64/nightly @@ -7,7 +7,5 @@ ac_add_options --enable-verify-mar ac_add_options --with-branding=browser/branding/nightly -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" . "$topsrcdir/build/mozconfig.cache" diff --git a/browser/config/mozconfigs/win64/release b/browser/config/mozconfigs/win64/release index 62e83205f803..389a1ea4b40e 100644 --- a/browser/config/mozconfigs/win64/release +++ b/browser/config/mozconfigs/win64/release @@ -20,6 +20,4 @@ ac_add_options --enable-verify-mar # defines.sh during the beta cycle export BUILDING_RELEASE=1 -. "$topsrcdir/build/mozconfig.rust" - . "$topsrcdir/build/mozconfig.common.override" diff --git a/browser/config/tooltool-manifests/linux64/asan.manifest b/browser/config/tooltool-manifests/linux64/asan.manifest index 9642de0b0f47..5e475fc6b169 100644 --- a/browser/config/tooltool-manifests/linux64/asan.manifest +++ b/browser/config/tooltool-manifests/linux64/asan.manifest @@ -16,6 +16,14 @@ "unpack": true }, { +"version": "rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16) repack", +"size": 96275316, +"digest": "26c11e34df81f5d7ffafc3492df9c6821f644a2e2eda5cfbbcdb1ac23e4ee196007b417c862c60a97bbf66e4be9c801400990938cd3aefec19b1cf9eaf1a9b54", +"algorithm": "sha512", +"filename": "rustc.tar.xz", +"unpack": true +}, +{ "size": 12072532, "digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9", "algorithm": "sha512", diff --git a/browser/config/tooltool-manifests/linux64/clang.manifest b/browser/config/tooltool-manifests/linux64/clang.manifest index 43e758cf3a9c..b068b6f21b42 100644 --- a/browser/config/tooltool-manifests/linux64/clang.manifest +++ b/browser/config/tooltool-manifests/linux64/clang.manifest @@ -16,6 +16,14 @@ "unpack": true }, { +"version": "rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16) repack", +"size": 96275316, +"digest": "26c11e34df81f5d7ffafc3492df9c6821f644a2e2eda5cfbbcdb1ac23e4ee196007b417c862c60a97bbf66e4be9c801400990938cd3aefec19b1cf9eaf1a9b54", +"algorithm": "sha512", +"filename": "rustc.tar.xz", +"unpack": true +}, +{ "version": "sccache rev b21198a7183a2fe226ff49348b1c0b51bae9f4f8", "algorithm": "sha512", "visibility": "public", diff --git a/browser/config/tooltool-manifests/linux64/clang.manifest.centos6 b/browser/config/tooltool-manifests/linux64/clang.manifest.centos6 index a496d2b14f0d..06dbcade9a0f 100644 --- a/browser/config/tooltool-manifests/linux64/clang.manifest.centos6 +++ b/browser/config/tooltool-manifests/linux64/clang.manifest.centos6 @@ -16,6 +16,14 @@ "unpack": true }, { +"version": "rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16) repack", +"size": 96275316, +"digest": "26c11e34df81f5d7ffafc3492df9c6821f644a2e2eda5cfbbcdb1ac23e4ee196007b417c862c60a97bbf66e4be9c801400990938cd3aefec19b1cf9eaf1a9b54", +"algorithm": "sha512", +"filename": "rustc.tar.xz", +"unpack": true +}, +{ "version": "sccache rev b21198a7183a2fe226ff49348b1c0b51bae9f4f8", "algorithm": "sha512", "filename": "sccache2.tar.xz", diff --git a/browser/config/tooltool-manifests/linux64/msan.manifest b/browser/config/tooltool-manifests/linux64/msan.manifest index 9642de0b0f47..5e475fc6b169 100644 --- a/browser/config/tooltool-manifests/linux64/msan.manifest +++ b/browser/config/tooltool-manifests/linux64/msan.manifest @@ -16,6 +16,14 @@ "unpack": true }, { +"version": "rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16) repack", +"size": 96275316, +"digest": "26c11e34df81f5d7ffafc3492df9c6821f644a2e2eda5cfbbcdb1ac23e4ee196007b417c862c60a97bbf66e4be9c801400990938cd3aefec19b1cf9eaf1a9b54", +"algorithm": "sha512", +"filename": "rustc.tar.xz", +"unpack": true +}, +{ "size": 12072532, "digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9", "algorithm": "sha512", diff --git a/browser/config/tooltool-manifests/linux64/releng.manifest b/browser/config/tooltool-manifests/linux64/releng.manifest index b3ad33ce24cd..819df48fd339 100644 --- a/browser/config/tooltool-manifests/linux64/releng.manifest +++ b/browser/config/tooltool-manifests/linux64/releng.manifest @@ -17,8 +17,8 @@ }, { "version": "rustc 1.14.0-beta.2 (e627a2e6e 2016-11-16) repack", -"size": 96275316, -"digest": "26c11e34df81f5d7ffafc3492df9c6821f644a2e2eda5cfbbcdb1ac23e4ee196007b417c862c60a97bbf66e4be9c801400990938cd3aefec19b1cf9eaf1a9b54", +"size": 94830820, +"digest": "6f2a1cf325d957f0328d2d853fc07944a857e872f6e44df15f6ebb45c032c0ebbf52f56c872bc72927ebcdd830002d759dd92e8fc90048b52c07058955c69c4c", "algorithm": "sha512", "filename": "rustc.tar.xz", "unpack": true diff --git a/browser/config/tooltool-manifests/macosx64/clang.manifest b/browser/config/tooltool-manifests/macosx64/clang.manifest index a419ccb1bfa7..fbbe6a4a7cb5 100644 --- a/browser/config/tooltool-manifests/macosx64/clang.manifest +++ b/browser/config/tooltool-manifests/macosx64/clang.manifest @@ -8,6 +8,14 @@ "unpack": true }, { +"version": "rustc 1.13.0 (2c6933acc 2016-11-07) repack", +"size": 104593379, +"digest": "9cbc4a6d4d647dd79629e97c0e7b177443d30e669ccd761ab520728d8c2b7e1cc4ab38ec444c1957649338c4088861db3bfe4f840ec3fedcc01f9f1a74da200a", +"algorithm": "sha512", +"filename": "rustc.tar.bz2", +"unpack": true +}, +{ "version": "sccache rev b21198a7183a2fe226ff49348b1c0b51bae9f4f8", "algorithm": "sha512", "visibility": "public", diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure index fbfd4fe9074e..e1a7c82c299d 100644 --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -4,7 +4,7 @@ # 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/. -option('--enable-rust', help='Include Rust language sources') +option('--disable-rust', help='Don\'t include Rust language sources') @depends('--enable-rust') def rust_compiler_names(value): diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index 765e0b0e8863..cc90f6517a95 100644 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -972,4 +972,3 @@ def is_windows(target): return target.kernel == 'WINNT' include('windows.configure', when=is_windows) -include('rust.configure') diff --git a/build/mozconfig.common b/build/mozconfig.common index 6e19ae80ecac..e817b77bf5be 100644 --- a/build/mozconfig.common +++ b/build/mozconfig.common @@ -24,3 +24,4 @@ MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0} ac_add_options --enable-js-shell . "$topsrcdir/build/mozconfig.automation" +. "$topsrcdir/build/mozconfig.rust" diff --git a/build/mozconfig.rust b/build/mozconfig.rust index 27936c3b3c23..b5efe131b9c8 100644 --- a/build/mozconfig.rust +++ b/build/mozconfig.rust @@ -1,10 +1,5 @@ # Options to enable rust in automation builds. # Tell configure to use the tooltool rustc. -# Assume this is compiled with --enable-rpath so we don't -# have to set LD_LIBRARY_PATH. RUSTC="$topsrcdir/rustc/bin/rustc" CARGO="$topsrcdir/rustc/bin/cargo" - -# Enable rust in the build. -ac_add_options --enable-rust diff --git a/devtools/client/inspector/markup/views/markup-container.js b/devtools/client/inspector/markup/views/markup-container.js index f50cb3a98ae2..c128f9c0de47 100644 --- a/devtools/client/inspector/markup/views/markup-container.js +++ b/devtools/client/inspector/markup/views/markup-container.js @@ -211,10 +211,12 @@ MarkupContainer.prototype = { } if (this.showExpander) { + this.elt.classList.add("expandable"); this.expander.style.visibility = "visible"; // Update accessibility expanded state. this.tagLine.setAttribute("aria-expanded", this.expanded); } else { + this.elt.classList.remove("expandable"); this.expander.style.visibility = "hidden"; // No need for accessible expanded state indicator when expander is not // shown. diff --git a/devtools/client/netmonitor/components/filter-buttons.js b/devtools/client/netmonitor/components/filter-buttons.js index 26c9d0ca10eb..45b348e38d48 100644 --- a/devtools/client/netmonitor/components/filter-buttons.js +++ b/devtools/client/netmonitor/components/filter-buttons.js @@ -31,7 +31,7 @@ function FilterButtons({ return div({ id: "requests-menu-filter-buttons" }, buttons); } -FilterButtons.PropTypes = { +FilterButtons.propTypes = { state: PropTypes.object.isRequired, triggerFilterType: PropTypes.func.iRequired, }; diff --git a/devtools/client/netmonitor/details-view.js b/devtools/client/netmonitor/details-view.js index 77fa5a33d870..03c52ce9818b 100644 --- a/devtools/client/netmonitor/details-view.js +++ b/devtools/client/netmonitor/details-view.js @@ -29,6 +29,7 @@ const { const { createFactory } = require("devtools/client/shared/vendor/react"); const ReactDOM = require("devtools/client/shared/vendor/react-dom"); const Provider = createFactory(require("devtools/client/shared/vendor/react-redux").Provider); +const PreviewPanel = createFactory(require("./shared/components/preview-panel")); const SecurityPanel = createFactory(require("./shared/components/security-panel")); const TimingsPanel = createFactory(require("./shared/components/timings-panel")); @@ -93,6 +94,13 @@ DetailsView.prototype = { initialize: function (store) { dumpn("Initializing the DetailsView"); + this._previewPanelNode = $("#react-preview-tabpanel-hook"); + + ReactDOM.render(Provider( + { store }, + PreviewPanel() + ), this._previewPanelNode); + this._securityPanelNode = $("#react-security-tabpanel-hook"); ReactDOM.render(Provider( @@ -152,6 +160,7 @@ DetailsView.prototype = { */ destroy: function () { dumpn("Destroying the DetailsView"); + ReactDOM.unmountComponentAtNode(this._previewPanelNode); ReactDOM.unmountComponentAtNode(this._securityPanelNode); ReactDOM.unmountComponentAtNode(this._timingsPanelNode); this.sidebar.destroy(); @@ -263,10 +272,6 @@ DetailsView.prototype = { case 3: yield view._setResponseBody(src.url, src.responseContent); break; - // "Preview" - case 6: - yield view._setHtmlPreview(src.responseContent); - break; } viewState.updating[tab] = false; }).then(() => { @@ -697,30 +702,6 @@ DetailsView.prototype = { window.emit(EVENTS.RESPONSE_BODY_DISPLAYED); }), - /** - * Sets the preview for HTML responses shown in this view. - * - * @param object response - * The message received from the server. - * @return object - * A promise that is resolved when the html preview is rendered. - */ - _setHtmlPreview: Task.async(function* (response) { - if (!response) { - return promise.resolve(); - } - let { text } = response.content; - let responseBody = yield gNetwork.getString(text); - - // Always disable JS when previewing HTML responses. - let iframe = $("#response-preview"); - iframe.contentDocument.docShell.allowJavascript = false; - iframe.contentDocument.documentElement.innerHTML = responseBody; - - window.emit(EVENTS.RESPONSE_HTML_PREVIEW_DISPLAYED); - return undefined; - }), - _dataSrc: null, _headers: null, _cookies: null, diff --git a/devtools/client/netmonitor/events.js b/devtools/client/netmonitor/events.js index ce77365047de..e0a5eb98f90d 100644 --- a/devtools/client/netmonitor/events.js +++ b/devtools/client/netmonitor/events.js @@ -58,9 +58,6 @@ const EVENTS = { // When the response body is displayed in the UI. RESPONSE_BODY_DISPLAYED: "NetMonitor:ResponseBodyAvailable", - // When the html response preview is displayed in the UI. - RESPONSE_HTML_PREVIEW_DISPLAYED: "NetMonitor:ResponseHtmlPreviewAvailable", - // When the image response thumbnail is displayed in the UI. RESPONSE_IMAGE_THUMBNAIL_DISPLAYED: "NetMonitor:ResponseImageThumbnailAvailable", diff --git a/devtools/client/netmonitor/netmonitor.xul b/devtools/client/netmonitor/netmonitor.xul index 3d0f5ace3fb8..a16e26abde8d 100644 --- a/devtools/client/netmonitor/netmonitor.xul +++ b/devtools/client/netmonitor/netmonitor.xul @@ -272,9 +272,8 @@ - + diff --git a/devtools/client/netmonitor/requests-menu-view.js b/devtools/client/netmonitor/requests-menu-view.js index aa37d4704f61..dd74f2050c2a 100644 --- a/devtools/client/netmonitor/requests-menu-view.js +++ b/devtools/client/netmonitor/requests-menu-view.js @@ -210,15 +210,16 @@ RequestsMenuView.prototype = { const action = Actions.updateRequest(id, data, true); yield this.store.dispatch(action); - const { responseContent, requestPostData } = action.data; + let { responseContent, requestPostData } = action.data; - // Fetch response data if the response is an image (to display thumbnail) if (responseContent && responseContent.content) { let request = getRequestById(this.store.getState(), action.id); + let { text, encoding } = responseContent.content; if (request) { let { mimeType } = request; + + // Fetch response data if the response is an image (to display thumbnail) if (mimeType.includes("image/")) { - let { text, encoding } = responseContent.content; let responseBody = yield gNetwork.getString(text); const dataUri = formDataURI(mimeType, encoding, responseBody); yield this.store.dispatch(Actions.updateRequest( @@ -227,6 +228,16 @@ RequestsMenuView.prototype = { true )); window.emit(EVENTS.RESPONSE_IMAGE_THUMBNAIL_DISPLAYED); + // Fetch response text only if the response is html, but not all text/* + } else if (mimeType.includes("text/html") && typeof text !== "string") { + let responseBody = yield gNetwork.getString(text); + responseContent.content.text = responseBody; + responseContent = Object.assign({}, responseContent); + yield this.store.dispatch(Actions.updateRequest( + action.id, + { responseContent }, + true + )); } } } diff --git a/devtools/client/netmonitor/shared/components/moz.build b/devtools/client/netmonitor/shared/components/moz.build index 2c7ccfea5118..8d6644af7b7b 100644 --- a/devtools/client/netmonitor/shared/components/moz.build +++ b/devtools/client/netmonitor/shared/components/moz.build @@ -3,6 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. DevToolsModules( + 'preview-panel.js', 'security-panel.js', 'timings-panel.js', ) diff --git a/devtools/client/netmonitor/shared/components/preview-panel.js b/devtools/client/netmonitor/shared/components/preview-panel.js new file mode 100644 index 000000000000..a7e646572f8d --- /dev/null +++ b/devtools/client/netmonitor/shared/components/preview-panel.js @@ -0,0 +1,44 @@ +/* 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/. */ + +"use strict"; + +const { DOM, PropTypes } = require("devtools/client/shared/vendor/react"); +const { connect } = require("devtools/client/shared/vendor/react-redux"); +const { getSelectedRequest } = require("../../selectors/index"); + +const { iframe } = DOM; + +/* + * Preview panel component + * Display HTML content within a sandbox enabled iframe + */ +function PreviewPanel({ + srcDoc = "", +}) { + return iframe({ + id: "response-preview", + sandbox: "", + srcDoc, + }); +} + +PreviewPanel.displayName = "PreviewPanel"; + +PreviewPanel.propTypes = { + srcDoc: PropTypes.string, +}; + +module.exports = connect( + (state) => { + const selectedRequest = getSelectedRequest(state); + const htmlBody = selectedRequest && selectedRequest.responseContent ? + selectedRequest.responseContent.content.text : ""; + const srcDoc = typeof htmlBody === "string" ? htmlBody : ""; + + return { + srcDoc, + }; + } +)(PreviewPanel); diff --git a/devtools/client/netmonitor/test/browser_net_html-preview.js b/devtools/client/netmonitor/test/browser_net_html-preview.js index 351009de561a..ea0492a8d959 100644 --- a/devtools/client/netmonitor/test/browser_net_html-preview.js +++ b/devtools/client/netmonitor/test/browser_net_html-preview.js @@ -40,8 +40,9 @@ add_task(function* () { is($("#preview-tab").hidden, false, "The preview tab should be visible now."); - yield monitor.panelWin.once(EVENTS.RESPONSE_HTML_PREVIEW_DISPLAYED); let iframe = $("#response-preview"); + yield once(iframe, "DOMContentLoaded"); + ok(iframe, "There should be a response preview iframe available."); ok(iframe.contentDocument, diff --git a/devtools/client/themes/markup.css b/devtools/client/themes/markup.css index 577b74e5c48e..53f72620c7fb 100644 --- a/devtools/client/themes/markup.css +++ b/devtools/client/themes/markup.css @@ -204,6 +204,22 @@ ul.children + .tag-line::before { display: inline; } +.expandable.collapsed .close::before { + /* Display an ellipsis character in collapsed nodes that can be expanded. */ + content: "\2026"; + display: inline-block; + width: 12px; + height: 8px; + margin: 0 2px; + line-height: 3px; + color: var(--theme-body-color-inactive);; + border-radius: 3px; + border-style: solid; + border-width: 1px; + text-align: center; + vertical-align: middle; +} + /* Hide HTML void elements (img, hr, br, …) closing tag when the element is not * expanded (it can be if it has pseudo-elements attached) */ .child.collapsed > .tag-line .void-element .close { @@ -326,7 +342,8 @@ ul.children + .tag-line::before { .theme-selected ~ .editor .theme-fg-color4, .theme-selected ~ .editor .theme-fg-color5, .theme-selected ~ .editor .theme-fg-color6, -.theme-selected ~ .editor .theme-fg-color7 { +.theme-selected ~ .editor .theme-fg-color7, +.theme-selected ~ .editor .close::before { color: var(--theme-selection-color); } diff --git a/devtools/client/themes/netmonitor.css b/devtools/client/themes/netmonitor.css index aafb6b16ed63..a5745dda16ca 100644 --- a/devtools/client/themes/netmonitor.css +++ b/devtools/client/themes/netmonitor.css @@ -742,7 +742,9 @@ } #response-preview { + border: none; display: -moz-box; + -moz-box-orient: vertical; -moz-box-flex: 1; } @@ -1138,6 +1140,7 @@ * FIXME: normal html block element cannot fill outer XUL element * This workaround should be removed after sidebar is migrated to react */ +#react-preview-tabpanel-hook, #react-security-tabpanel-hook, #react-timings-tabpanel-hook { display: -moz-box; diff --git a/dom/base/ResponsiveImageSelector.cpp b/dom/base/ResponsiveImageSelector.cpp index ecdad41ac73e..43a5138faa45 100644 --- a/dom/base/ResponsiveImageSelector.cpp +++ b/dom/base/ResponsiveImageSelector.cpp @@ -12,7 +12,7 @@ #include "nsCSSParser.h" #include "nsCSSProps.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsRuleNode.h" #include "nsRuleData.h" diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index 4e8440daebaa..e705da898b7f 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -541,7 +541,6 @@ DOMInterfaces = { 'MediaList': { 'nativeType': 'nsMediaList', - 'headerFile': 'nsIMediaList.h', }, 'MediaKeys' : { diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index a63c2682ea2e..3bc1f607f847 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -1339,6 +1339,8 @@ HTMLInputElement::Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) co // We no longer have our original checked state. Set our // checked state on the clone. it->DoSetChecked(mChecked, false, true); + // Then tell DoneCreatingElement() not to overwrite: + it->mShouldInitChecked = false; } break; case VALUE_MODE_DEFAULT: diff --git a/dom/html/HTMLSourceElement.cpp b/dom/html/HTMLSourceElement.cpp index ffddf44ebbd3..ddcc6d70ff66 100644 --- a/dom/html/HTMLSourceElement.cpp +++ b/dom/html/HTMLSourceElement.cpp @@ -13,7 +13,7 @@ #include "nsGkAtoms.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsCSSParser.h" #include "nsHostObjectProtocolHandler.h" diff --git a/dom/ipc/tests/mochitest.ini b/dom/ipc/tests/mochitest.ini index cf2a20d5b813..acd6a595c114 100644 --- a/dom/ipc/tests/mochitest.ini +++ b/dom/ipc/tests/mochitest.ini @@ -17,6 +17,7 @@ skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf [test_CrashService_crash.html] skip-if = !(crashreporter && !e10s && (toolkit == 'gtk2' || toolkit == 'gtk3' || toolkit == 'cocoa' || toolkit == 'windows')) [test_temporaryfile_stream.html] +skip-if = !e10s support-files = blob_verify.sjs !/dom/canvas/test/captureStream_common.js diff --git a/dom/media/MediaData.cpp b/dom/media/MediaData.cpp index 0d771887965a..eae9981530b7 100644 --- a/dom/media/MediaData.cpp +++ b/dom/media/MediaData.cpp @@ -177,55 +177,24 @@ VideoData::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const return size; } -/* static */ -already_AddRefed -VideoData::ShallowCopyUpdateDuration(const VideoData* aOther, - int64_t aDuration) +void +VideoData::UpdateDuration(int64_t aDuration) { - RefPtr v = new VideoData(aOther->mOffset, - aOther->mTime, - aDuration, - aOther->mKeyframe, - aOther->mTimecode, - aOther->mDisplay, - aOther->mFrameID); - v->mImage = aOther->mImage; - return v.forget(); + MOZ_ASSERT(aDuration >= 0); + + mDuration = aDuration; } -/* static */ -already_AddRefed -VideoData::ShallowCopyUpdateTimestamp(const VideoData* aOther, - int64_t aTimestamp) +void +VideoData::UpdateTimestamp(int64_t aTimestamp) { - NS_ENSURE_TRUE(aOther, nullptr); - RefPtr v = new VideoData(aOther->mOffset, - aTimestamp, - aOther->GetEndTime() - aTimestamp, - aOther->mKeyframe, - aOther->mTimecode, - aOther->mDisplay, - aOther->mFrameID); - v->mImage = aOther->mImage; - return v.forget(); -} + MOZ_ASSERT(aTimestamp >= 0); -/* static */ -already_AddRefed -VideoData::ShallowCopyUpdateTimestampAndDuration(const VideoData* aOther, - int64_t aTimestamp, - int64_t aDuration) -{ - NS_ENSURE_TRUE(aOther, nullptr); - RefPtr v = new VideoData(aOther->mOffset, - aTimestamp, - aDuration, - aOther->mKeyframe, - aOther->mTimecode, - aOther->mDisplay, - aOther->mFrameID); - v->mImage = aOther->mImage; - return v.forget(); + int64_t updatedDuration = GetEndTime() - aTimestamp; + MOZ_ASSERT(updatedDuration >= 0); + + mTime = aTimestamp; + mDuration = updatedDuration; } /* static */ diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index 7bebad017a9d..98904e311afc 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -493,29 +493,6 @@ public: int64_t aTimecode, const IntRect& aPicture); - // Creates a new VideoData identical to aOther, but with a different - // specified duration. All data from aOther is copied into the new - // VideoData. The new VideoData's mImage field holds a reference to - // aOther's mImage, i.e. the Image is not copied. This function is useful - // in reader backends that can't determine the duration of a VideoData - // until the next frame is decoded, i.e. it's a way to change the const - // duration field on a VideoData. - static already_AddRefed ShallowCopyUpdateDuration(const VideoData* aOther, - int64_t aDuration); - - // Creates a new VideoData identical to aOther, but with a different - // specified timestamp. All data from aOther is copied into the new - // VideoData, as ShallowCopyUpdateDuration() does. - static already_AddRefed ShallowCopyUpdateTimestamp(const VideoData* aOther, - int64_t aTimestamp); - - // Creates a new VideoData identical to aOther, but with a different - // specified timestamp and duration. All data from aOther is copied - // into the new VideoData, as ShallowCopyUpdateDuration() does. - static already_AddRefed - ShallowCopyUpdateTimestampAndDuration(const VideoData* aOther, int64_t aTimestamp, - int64_t aDuration); - // Initialize PlanarYCbCrImage. Only When aCopyData is true, // video data is copied to PlanarYCbCrImage. static bool SetVideoDataToImage(PlanarYCbCrImage* aVideoImage, @@ -548,6 +525,9 @@ public: void MarkSentToCompositor(); bool IsSentToCompositor() { return mSentToCompositor; } + void UpdateDuration(int64_t aDuration); + void UpdateTimestamp(int64_t aTimestamp); + protected: ~VideoData(); diff --git a/dom/media/MediaDecoderReader.h b/dom/media/MediaDecoderReader.h index 9ce04a7058f8..aed78679db6b 100644 --- a/dom/media/MediaDecoderReader.h +++ b/dom/media/MediaDecoderReader.h @@ -70,7 +70,7 @@ public: MozPromise, MediaResult, IsExclusive>; using MediaDataPromise = MozPromise, MediaResult, IsExclusive>; - using SeekPromise = MozPromise; + using SeekPromise = MozPromise; // Note that, conceptually, WaitForData makes sense in a non-exclusive sense. // But in the current architecture it's only ever used exclusively (by MDSM), diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index 19a179dd4a28..1eac646ada99 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -1060,8 +1060,8 @@ private: [this] (media::TimeUnit aUnit) { OnSeekResolved(aUnit); }, - [this] (nsresult aResult) { - OnSeekRejected(aResult); + [this] (const MediaResult& aError) { + OnSeekRejected(aError); })); } @@ -1110,11 +1110,11 @@ private: } } - void OnSeekRejected(nsresult aResult) { + void OnSeekRejected(const MediaResult& aError) { mSeekRequest.Complete(); - MOZ_ASSERT(NS_FAILED(aResult), "Cancels should also disconnect mSeekRequest"); - OnSeekTaskRejected(aResult); + MOZ_ASSERT(NS_FAILED(aError), "Cancels should also disconnect mSeekRequest"); + OnSeekTaskRejected(aError); } void RequestAudioData() @@ -1242,10 +1242,8 @@ private: } else { if (target >= video->mTime && video->GetEndTime() >= target) { // The seek target lies inside this frame's time slice. Adjust the frame's - // start time to match the seek target. We do this by replacing the - // first frame with a shallow copy which has the new timestamp. - RefPtr temp = VideoData::ShallowCopyUpdateTimestamp(video.get(), target); - video = temp; + // start time to match the seek target. + video->UpdateTimestamp(target); } mFirstVideoFrameAfterSeek = nullptr; @@ -1292,7 +1290,7 @@ private: SeekCompleted(); } - void OnSeekTaskRejected(MediaResult aError) + void OnSeekTaskRejected(const MediaResult& aError) { if (mIsAudioQueueFinished) { AudioQueue().Finish(); diff --git a/dom/media/android/AndroidMediaReader.cpp b/dom/media/android/AndroidMediaReader.cpp index c5333f8345ca..c98f741b6c98 100644 --- a/dom/media/android/AndroidMediaReader.cpp +++ b/dom/media/android/AndroidMediaReader.cpp @@ -141,9 +141,8 @@ bool AndroidMediaReader::DecodeVideoFrame(bool &aKeyframeSkip, int64_t durationUs; mPlugin->GetDuration(mPlugin, &durationUs); durationUs = std::max(durationUs - mLastVideoFrame->mTime, 0); - RefPtr data = VideoData::ShallowCopyUpdateDuration(mLastVideoFrame, - durationUs); - mVideoQueue.Push(data); + mLastVideoFrame->UpdateDuration(durationUs); + mVideoQueue.Push(mLastVideoFrame); mLastVideoFrame = nullptr; } return false; @@ -261,7 +260,7 @@ bool AndroidMediaReader::DecodeVideoFrame(bool &aKeyframeSkip, // timestamp of the previous frame. We can then return the previously // decoded frame, and it will have a valid timestamp. int64_t duration = v->mTime - mLastVideoFrame->mTime; - mLastVideoFrame = VideoData::ShallowCopyUpdateDuration(mLastVideoFrame, duration); + mLastVideoFrame->UpdateDuration(duration); // We have the start time of the next frame, so we can push the previous // frame into the queue, except if the end time is below the threshold, diff --git a/editor/libeditor/HTMLStyleEditor.cpp b/editor/libeditor/HTMLStyleEditor.cpp index eddc4954732e..a6d3e2c8b5d8 100644 --- a/editor/libeditor/HTMLStyleEditor.cpp +++ b/editor/libeditor/HTMLStyleEditor.cpp @@ -1231,8 +1231,13 @@ HTMLEditor::RemoveInlinePropertyImpl(nsIAtom* aProperty, if (!cancel && !handled) { // Loop through the ranges in the selection uint32_t rangeCount = selection->RangeCount(); + // Since ranges might be modified by SplitStyleAboveRange, we need hold + // current ranges + AutoTArray, 8> arrayOfRanges; for (uint32_t rangeIdx = 0; rangeIdx < rangeCount; ++rangeIdx) { - OwningNonNull range = *selection->GetRangeAt(rangeIdx); + arrayOfRanges.AppendElement(*selection->GetRangeAt(rangeIdx)); + } + for (auto& range : arrayOfRanges) { if (aProperty == nsGkAtoms::name) { // Promote range if it starts or end in a named anchor and we want to // remove named anchors diff --git a/editor/libeditor/crashtests/1317704.html b/editor/libeditor/crashtests/1317704.html new file mode 100644 index 000000000000..64359c796bc7 --- /dev/null +++ b/editor/libeditor/crashtests/1317704.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + diff --git a/editor/libeditor/crashtests/crashtests.list b/editor/libeditor/crashtests/crashtests.list index c00bf09bb052..947fa801f9bb 100644 --- a/editor/libeditor/crashtests/crashtests.list +++ b/editor/libeditor/crashtests/crashtests.list @@ -69,4 +69,5 @@ load 1158651.html load 1244894.xhtml load 1264921.html load 1272490.html +load 1317704.html load 1317718.html diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp index 0f7e942c18ff..cf38bae12c8b 100644 --- a/gfx/layers/d3d9/CompositorD3D9.cpp +++ b/gfx/layers/d3d9/CompositorD3D9.cpp @@ -215,6 +215,7 @@ CompositorD3D9::SetRenderTarget(CompositingRenderTarget *aRenderTarget) { MOZ_ASSERT(aRenderTarget && mDeviceManager); RefPtr oldRT = mCurrentRT; + Unused << oldRT; mCurrentRT = static_cast(aRenderTarget); mCurrentRT->BindRenderTarget(device()); PrepareViewport(mCurrentRT->GetSize()); diff --git a/ipc/mscom/EnsureMTA.h b/ipc/mscom/EnsureMTA.h index d5ae2a7a5a04..4cf667038747 100644 --- a/ipc/mscom/EnsureMTA.h +++ b/ipc/mscom/EnsureMTA.h @@ -10,6 +10,7 @@ #include "MainThreadUtils.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" +#include "mozilla/Unused.h" #include "mozilla/mscom/COMApartmentRegion.h" #include "mozilla/mscom/Utils.h" #include "nsCOMPtr.h" @@ -33,6 +34,7 @@ public: MOZ_ASSERT(NS_IsMainThread()); nsCOMPtr thread = GetMTAThread(); MOZ_ASSERT(thread); + Unused << thread; } template diff --git a/ipc/mscom/WeakRef.cpp b/ipc/mscom/WeakRef.cpp index e44027059d7b..26fd0810feb4 100644 --- a/ipc/mscom/WeakRef.cpp +++ b/ipc/mscom/WeakRef.cpp @@ -40,7 +40,7 @@ WeakReferenceSupport::QueryInterface(REFIID riid, void** ppv) *ppv = nullptr; // Raise the refcount for stabilization purposes during aggregation - RefPtr kungFuDeathGrip(static_cast(this)); + RefPtr kungFuDeathGrip(this); if (riid == IID_IUnknown || riid == IID_IWeakReferenceSource) { punk = static_cast(this); diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py index 5962dd7ef5b7..08de8c372025 100755 --- a/js/src/devtools/automation/autospider.py +++ b/js/src/devtools/automation/autospider.py @@ -178,6 +178,14 @@ else: env.setdefault('CC', compiler) env.setdefault('CXX', cxx) +rust_dir = os.path.join(DIR.tooltool, 'rustc') +if os.path.exists(os.path.join(rust_dir, 'bin', 'rustc')): + env.setdefault('RUSTC', os.path.join(rust_dir, 'bin', 'rustc')) + env.setdefault('CARGO', os.path.join(rust_dir, 'bin', 'cargo')) +else: + env.setdefault('RUSTC', 'rustc') + env.setdefault('CARGO', 'cargo') + if platform.system() == 'Darwin': os.environ['SOURCE'] = DIR.source set_vars_from_script(os.path.join(DIR.scripts, 'macbuildenv.sh'), diff --git a/layout/style/CSSStyleSheet.cpp b/layout/style/CSSStyleSheet.cpp index 9cff273ee8ca..5888c163d556 100644 --- a/layout/style/CSSStyleSheet.cpp +++ b/layout/style/CSSStyleSheet.cpp @@ -17,7 +17,7 @@ #include "mozilla/css/GroupRule.h" #include "mozilla/css/ImportRule.h" #include "nsCSSRules.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsIDocument.h" #include "nsPresContext.h" #include "nsGkAtoms.h" diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 608255afed63..796eca4098dd 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -61,7 +61,7 @@ #include "nsXULPrototypeCache.h" #endif -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsIDOMStyleSheet.h" #include "nsError.h" diff --git a/layout/style/MediaQueryList.cpp b/layout/style/MediaQueryList.cpp index 347146f8ba39..65cf700ff7d1 100644 --- a/layout/style/MediaQueryList.cpp +++ b/layout/style/MediaQueryList.cpp @@ -8,7 +8,7 @@ #include "mozilla/dom/MediaQueryList.h" #include "nsPresContext.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsCSSParser.h" #include "nsIDocument.h" diff --git a/layout/style/RuleProcessorCache.h b/layout/style/RuleProcessorCache.h index 7eb808fc943c..d88ab0bbf473 100644 --- a/layout/style/RuleProcessorCache.h +++ b/layout/style/RuleProcessorCache.h @@ -15,7 +15,7 @@ #include "mozilla/StaticPtr.h" #include "nsCSSRuleProcessor.h" #include "nsExpirationTracker.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsIMemoryReporter.h" #include "nsTArray.h" diff --git a/layout/style/StyleSheet.cpp b/layout/style/StyleSheet.cpp index 578533ce0a9f..e676f7bccd39 100644 --- a/layout/style/StyleSheet.cpp +++ b/layout/style/StyleSheet.cpp @@ -13,7 +13,7 @@ #include "mozilla/CSSStyleSheet.h" #include "mozAutoDocUpdate.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsNullPrincipal.h" namespace mozilla { diff --git a/layout/style/StyleStructContext.h b/layout/style/StyleStructContext.h index f4b59972ec37..5f4247aa00ef 100644 --- a/layout/style/StyleStructContext.h +++ b/layout/style/StyleStructContext.h @@ -80,8 +80,8 @@ public: typedef mozilla::LookAndFeel LookAndFeel; nscolor DefaultColor() { - SERVO_DEFAULT(LookAndFeel::GetColor(LookAndFeel::eColorID_WindowForeground, - NS_RGB(0x00, 0x00, 0x00))); + // Workaround Bug 1323404 + SERVO_DEFAULT(NS_RGB(0x00, 0x00, 0x00)); return mPresContext->DefaultColor(); } diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index c0dc342c83f1..6ecff8370371 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -41,7 +41,7 @@ #include "nsNameSpaceManager.h" #include "nsXMLNameSpaceMap.h" #include "nsError.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsStyleUtil.h" #include "nsIPrincipal.h" #include "nsICSSUnprefixingService.h" diff --git a/layout/style/nsCSSRuleProcessor.cpp b/layout/style/nsCSSRuleProcessor.cpp index 4d56c00ac592..c80d6061d9e7 100644 --- a/layout/style/nsCSSRuleProcessor.cpp +++ b/layout/style/nsCSSRuleProcessor.cpp @@ -44,7 +44,7 @@ #include "nsAttrName.h" #include "nsTArray.h" #include "nsContentUtils.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsCSSRules.h" #include "nsStyleSet.h" #include "mozilla/dom/Element.h" diff --git a/layout/style/nsCSSRuleProcessor.h b/layout/style/nsCSSRuleProcessor.h index e207a71afea3..e31078382e65 100644 --- a/layout/style/nsCSSRuleProcessor.h +++ b/layout/style/nsCSSRuleProcessor.h @@ -19,7 +19,7 @@ #include "mozilla/SheetType.h" #include "mozilla/UniquePtr.h" #include "nsExpirationTracker.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "nsIStyleRuleProcessor.h" #include "nsRuleWalker.h" #include "nsTArray.h" diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp index 40185330c266..8b4bc85b08d7 100644 --- a/layout/style/nsCSSRules.cpp +++ b/layout/style/nsCSSRules.cpp @@ -21,7 +21,7 @@ #include "nsCOMPtr.h" #include "nsIDOMCSSStyleSheet.h" -#include "nsIMediaList.h" +#include "nsMediaList.h" #include "mozilla/dom/CSSRuleList.h" #include "nsIDocument.h" #include "nsPresContext.h" diff --git a/layout/style/nsIMediaList.h b/layout/style/nsMediaList.h similarity index 99% rename from layout/style/nsIMediaList.h rename to layout/style/nsMediaList.h index 43b631ae8c8a..07e205964503 100644 --- a/layout/style/nsIMediaList.h +++ b/layout/style/nsMediaList.h @@ -9,8 +9,8 @@ * @media rules */ -#ifndef nsIMediaList_h_ -#define nsIMediaList_h_ +#ifndef nsMediaList_h_ +#define nsMediaList_h_ #include "nsAutoPtr.h" #include "nsIDOMMediaList.h" @@ -315,4 +315,4 @@ protected: // changes mozilla::CSSStyleSheet* mStyleSheet; }; -#endif /* !defined(nsIMediaList_h_) */ +#endif /* !defined(nsMediaList_h_) */ diff --git a/mobile/android/base/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java b/mobile/android/base/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java index d2e7f28fa118..fc7f286952a2 100644 --- a/mobile/android/base/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java +++ b/mobile/android/base/java/org/mozilla/gecko/media/JellyBeanAsyncCodec.java @@ -233,6 +233,7 @@ final class JellyBeanAsyncCodec implements AsyncCodec { } else if (result == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED) { mOutputBuffers = mCodec.getOutputBuffers(); } else if (result == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED) { + mOutputBuffers = mCodec.getOutputBuffers(); mCallbackSender.notifyOutputFormat(mCodec.getOutputFormat()); } else if (result == MediaCodec.INFO_TRY_AGAIN_LATER) { // When input ended, keep polling remaining output buffer until EOS. diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd index f2e48aa79908..f7687cb43d21 100644 --- a/mobile/android/base/locales/en-US/android_strings.dtd +++ b/mobile/android/base/locales/en-US/android_strings.dtd @@ -540,7 +540,7 @@ size. --> - + - - %videocontrolsDTD; + +%videocontrolsDTD; ]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (this.type != "scrubber") - return ""; - - var currTime = this.thumb.timeLabel.getAttribute("value"); - var totalTime = this.durationValue; - - return this.scrubberNameFormat.replace(/#1/, currTime). - replace(/#2/, totalTime); - - - - - "&scrubberScale.nameFormat;" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-
- -
- - -
-
-
- - - - - " + (show ? "SHOW" : "HIDE")); - this.startFade(this.statusOverlay, show, immediate); - }, - - /* - * Set the initial state of the controls. The binding is normally created along - * with video element, but could be attached at any point (eg, if the video is - * removed from the document and then reinserted). Thus, some one-time events may - * have already fired, and so we'll need to explicitly check the initial state. - */ - setupInitialState : function() { - this.randomID = Math.random(); - this.videocontrols.randomID = this.randomID; - - this.setPlayButtonState(this.video.paused); - - this.setFullscreenButtonState(); - - var duration = Math.round(this.video.duration * 1000); // in ms - var currentTime = Math.round(this.video.currentTime * 1000); // in ms - this.log("Initial playback position is at " + currentTime + " of " + duration); - // It would be nice to retain maxCurrentTimeSeen, but it would be difficult - // to determine if the media source changed while we were detached. - this.initPositionDurationBox(); - this.maxCurrentTimeSeen = currentTime; - this.showPosition(currentTime, duration); - - // If we have metadata, check if this is a - - , which meant that the XBL machinery - // undefined the property when the element was unbound. The code in - // this file actually depends on this, so now that randomID is an - // expando, we need to make sure to explicitly delete it. - delete this.randomID; - ]]> - - - - - - - if (!this.isTouchControls) - this.Utils.onMouseInOut(event); - - - if (!this.isTouchControls) - this.Utils.onMouseInOut(event); - - - if (!this.isTouchControls) - this.Utils.onMouseMove(event); - - -
- - - - - - - - - -