diff --git a/Makefile.in b/Makefile.in index 75e8260c0584..8413ba3cfc9e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -202,6 +202,9 @@ else BUILDID = $(shell $(PYTHON) $(srcdir)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID) endif +MOZ_SOURCE_STAMP = $(shell hg -R $(srcdir) parent --template="{node|short}\n" 2>/dev/null) +export MOZ_SOURCE_STAMP + #XXX: this is a hack, since we don't want to clobber for MSVC # PGO support, but we can't do this test in client.mk ifneq ($(OS_ARCH)_$(GNU_CC), WINNT_) diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js index cd4d8c2fb1c9..61e90732303c 100644 --- a/accessible/tests/mochitest/common.js +++ b/accessible/tests/mochitest/common.js @@ -115,9 +115,9 @@ function addA11yLoadEvent(aFunc) if (state.value & STATE_BUSY) return waitForDocLoad(); - aFunc.call(); + window.setTimeout(aFunc, 150); }, - 200 + 0 ); } @@ -125,7 +125,7 @@ function addA11yLoadEvent(aFunc) } //////////////////////////////////////////////////////////////////////////////// -// Get DOM node/accesible helpers +// Helpers for getting DOM node/accessible /** * Return the DOM node by identifier (may be accessible, DOM node or ID). diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 0b70fef33825..347a0f36cb04 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -69,9 +69,9 @@ GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBX DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID) -SOURCE_STAMP := $(shell cd $(topsrcdir) ; hg identify . 2>/dev/null | cut -f1 -d' ') -ifdef SOURCE_STAMP -DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)" +MOZ_SOURCE_STAMP ?= $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null) +ifdef MOZ_SOURCE_STAMP +DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)" endif SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/") diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 20be64bd7478..1147acc098e9 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -148,11 +148,11 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m #navigator-toolbox[inFullscreen="true"] > #fullscr-toggler, #nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-icon { - display: -moz-box; + display: -moz-box; } #nav-bar[mode="text"] > #window-controls > toolbarbutton > .toolbarbutton-text { - display: none; + display: none; } /* ::::: Keyboard UI Panel ::::: */ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2001dc47558b..dcae21701ec0 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -440,6 +440,8 @@ const gPopupBlockerObserver = { if (gPrivateBrowsingUI.privateBrowsingEnabled) blockedPopupAllowSite.setAttribute("disabled", "true"); + else + blockedPopupAllowSite.removeAttribute("disabled"); var item = aEvent.target.lastChild; while (item && item.getAttribute("observes") != "blockedPopupsSeparator") { @@ -1062,8 +1064,6 @@ function BrowserStartup() { gURLBar.setAttribute("enablehistory", "false"); } - CombinedStopReload.wrap(); - allTabs.readPref(); setTimeout(delayedStartup, 0, isLoadingBlank, mustLoadSidebar); @@ -1388,8 +1388,6 @@ function BrowserShutdown() ctrlTab.uninit(); allTabs.uninit(); - CombinedStopReload.uninit(); - gGestureSupport.init(false); FullScreen.cleanup(); @@ -3321,8 +3319,6 @@ function BrowserCustomizeToolbar() if (splitter) splitter.parentNode.removeChild(splitter); - CombinedStopReload.unwrap(); - var customizeURL = "chrome://global/content/customizeToolbar.xul"; gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false); @@ -3393,8 +3389,6 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) { UpdateUrlbarSearchSplitterState(); - CombinedStopReload.wrap(); - gHomeButton.updatePersonalToolbarStyle(); // Update the urlbar @@ -3951,10 +3945,14 @@ var XULBrowserWindow = { onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) { const nsIWebProgressListener = Ci.nsIWebProgressListener; const nsIChannel = Ci.nsIChannel; - if (aStateFlags & nsIWebProgressListener.STATE_START && - aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) { + if (aStateFlags & nsIWebProgressListener.STATE_START) { + // This (thanks to the filter) is a network start or the first + // stray request (the first request outside of the document load), + // initialize the throbber and his friends. - if (aRequest && aWebProgress.DOMWindow == content) + // Call start document load listeners (only if this is a network load) + if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK && + aRequest && aWebProgress.DOMWindow == content) this.startDocumentLoad(aRequest); this.isBusy = true; @@ -3977,7 +3975,6 @@ var XULBrowserWindow = { // XXX: This needs to be based on window activity... this.stopCommand.removeAttribute("disabled"); - CombinedStopReload.switchToStop(); } } else if (aStateFlags & nsIWebProgressListener.STATE_STOP) { @@ -4045,7 +4042,6 @@ var XULBrowserWindow = { this.throbberElement.removeAttribute("busy"); this.stopCommand.setAttribute("disabled", "true"); - CombinedStopReload.switchToReload(aRequest instanceof Ci.nsIRequest); } } }, @@ -4320,105 +4316,7 @@ var XULBrowserWindow = { } catch (e) { } } -}; - -var CombinedStopReload = { - wrap: function () { - if (this.container) - return; - - var stop = document.getElementById("stop-button"); - if (!stop) - return; - - var reload = document.getElementById("reload-button"); - if (!reload) - return; - - this._reloadBeforeStop = (reload.nextSibling == stop); - if (!this._reloadBeforeStop && stop.nextSibling != reload) - return; - - this.container = document.createElement("deck"); - this.container.id = "stop-reload-container"; - stop.parentNode.replaceChild(this.container, stop); - this.container.appendChild(stop); - this.container.appendChild(reload); - this.stop = stop; - this.reload = reload; - this.container.selectedPanel = - XULBrowserWindow.stopCommand.getAttribute("disabled") == "true" - ? reload : stop; - stop.addEventListener("click", this, false); - }, - - handleEvent: function (event) { - // the only event we listen to is "click" on the stop button - if (event.button == 0 && - !this.stop.disabled) - this._stopClicked = true; - }, - - switchToStop: function () { - if (!this.container) - return; - - this._cancelTransition(); - this.container.selectedPanel = this.stop; - }, - - switchToReload: function (aDelay) { - if (!this.container) - return; - - if (!aDelay || this._stopClicked) { - this._stopClicked = false; - this._cancelTransition(); - this.container.selectedPanel = this.reload; - return; - } - - if (this._timer) - return; - - this._timer = setTimeout(function (self) { - self._timer = 0; - self.container.selectedPanel = self.reload; - }, 650, this); - }, - - _cancelTransition: function () { - if (this._timer) { - clearTimeout(this._timer); - this._timer = 0; - } - }, - - unwrap: function () { - if (!this.container) - return; - - var toolbar = this.container.parentNode; - if (this._reloadBeforeStop) { - toolbar.replaceChild(this.stop, this.container); - toolbar.insertBefore(this.reload, this.stop); - } else { - toolbar.replaceChild(this.reload, this.container); - toolbar.insertBefore(this.stop, this.reload); - } - this.uninit(); - }, - - uninit: function () { - this._cancelTransition(); - if (this.container) { - this.stop.removeEventListener("click", this, false); - this.container = null; - this.reload = null; - this.stop = null; - } - } -}; +} var TabsProgressListener = { onProgressChange: function (aBrowser, aWebProgress, aRequest, diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 06662d6bd061..00d9553f0923 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -296,10 +296,16 @@ style="visibility:hidden"/> - - - + + + + +