diff --git a/CLOBBER b/CLOBBER index 066f76de256f..85042f2ce43f 100644 --- a/CLOBBER +++ b/CLOBBER @@ -15,4 +15,4 @@ # # Note: The description below will be part of the error message shown to users. # -Bug 793928 - Move the promise library to a new location +Bug 755724 - Move browser application in a subdirectory diff --git a/browser/app-rules.mk b/browser/app-rules.mk new file mode 100644 index 000000000000..2c31653046fb --- /dev/null +++ b/browser/app-rules.mk @@ -0,0 +1 @@ +PURGECACHES_DIRS = $(DIST)/bin/browser diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in index 04a5386a715f..95bf1fb2c82f 100644 --- a/browser/app/Makefile.in +++ b/browser/app/Makefile.in @@ -102,6 +102,8 @@ RCFLAGS += -DMOZ_PHOENIX RCFLAGS += -DFIREFOX_ICO=\"$(DIST)/branding/firefox-os2.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document-os2.ico\" endif +PROGRAMS_DEST = $(DIST)/bin + include $(topsrcdir)/config/rules.mk ifeq ($(OS_ARCH),WINNT) #{ diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp index 584df54ac315..4b27a9732beb 100644 --- a/browser/app/nsBrowserApp.cpp +++ b/browser/app/nsBrowserApp.cpp @@ -178,6 +178,7 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory) } nsCOMPtr appDir; exeFile->GetParent(getter_AddRefs(appDir)); + appDir->Append(NS_LITERAL_STRING("browser")); SetStrongPtr(appData.directory, static_cast(appDir.get())); // xreDirectory already has a refcount from NS_NewLocalFile diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index b39ce4729c4c..34d6b5aa9ede 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -425,7 +425,6 @@ pref("browser.tabs.closeButtons", 1); // false return to the adjacent tab (old default) pref("browser.tabs.selectOwnerOnClose", true); -pref("browser.allTabs.previews", false); pref("browser.ctrlTab.previews", false); pref("browser.ctrlTab.recentlyUsedLimit", 7); diff --git a/browser/base/content/browser-tabPreviews.js b/browser/base/content/browser-tabPreviews.js index daa20bcfbbf5..5dc5867472b7 100644 --- a/browser/base/content/browser-tabPreviews.js +++ b/browser/base/content/browser-tabPreviews.js @@ -256,6 +256,7 @@ var ctrlTab = { var showAllLabel = gNavigatorBundle.getString("ctrlTab.showAll.label"); this.showAllButton.label = PluralForm.get(this.tabCount, showAllLabel).replace("#1", this.tabCount); + this.showAllButton.hidden = !allTabs.canOpen; }, updatePreview: function ctrlTab_updatePreview(aPreview, aTab) { @@ -362,8 +363,6 @@ var ctrlTab = { if (this.isOpen) return; - allTabs.close(); - document.addEventListener("keyup", this, true); this.updatePreviews(); @@ -525,6 +524,10 @@ var ctrlTab = { if (event.keyCode == event.DOM_VK_CONTROL) this.pick(); break; + case "popupshowing": + if (event.target.id == "menu_viewPopup") + document.getElementById("menu_showAllTabs").hidden = !allTabs.canOpen; + break; } }, @@ -543,6 +546,7 @@ var ctrlTab = { // If we're not running, hide the "Show All Tabs" menu item, // as Shift+Ctrl+Tab will be handled by the tab bar. document.getElementById("menu_showAllTabs").hidden = !enable; + document.getElementById("menu_viewPopup")[toggleEventListener]("popupshowing", this); // Also disable the to ensure Shift+Ctrl+Tab never triggers // Show All Tabs. @@ -556,497 +560,19 @@ var ctrlTab = { /** - * All Tabs panel + * All Tabs menu */ var allTabs = { - get panel () { - delete this.panel; - return this.panel = document.getElementById("allTabs-panel"); - }, - get filterField () { - delete this.filterField; - return this.filterField = document.getElementById("allTabs-filter"); - }, - get container () { - delete this.container; - return this.container = document.getElementById("allTabs-container"); - }, - get tabCloseButton () { - delete this.tabCloseButton; - return this.tabCloseButton = document.getElementById("allTabs-tab-close-button"); - }, get toolbarButton() document.getElementById("alltabs-button"), - get previews () this.container.getElementsByClassName("allTabs-preview"), - get isOpen () this.panel.state == "open" || this.panel.state == "showing", - - init: function allTabs_init() { - if (this._initiated) - return; - this._initiated = true; - - tabPreviews.init(); - - Array.forEach(gBrowser.tabs, function (tab) { - this._addPreview(tab); - }, this); - - gBrowser.tabContainer.addEventListener("TabOpen", this, false); - gBrowser.tabContainer.addEventListener("TabAttrModified", this, false); - gBrowser.tabContainer.addEventListener("TabMove", this, false); - gBrowser.tabContainer.addEventListener("TabClose", this, false); - }, - - uninit: function allTabs_uninit() { - if (!this._initiated) - return; - - gBrowser.tabContainer.removeEventListener("TabOpen", this, false); - gBrowser.tabContainer.removeEventListener("TabAttrModified", this, false); - gBrowser.tabContainer.removeEventListener("TabMove", this, false); - gBrowser.tabContainer.removeEventListener("TabClose", this, false); - - while (this.container.hasChildNodes()) - this.container.removeChild(this.container.firstChild); - - this._initiated = false; - }, - - prefName: "browser.allTabs.previews", - readPref: function allTabs_readPref() { - var allTabsButton = this.toolbarButton; - if (!allTabsButton) - return; - - if (gPrefService.getBoolPref(this.prefName)) { - allTabsButton.removeAttribute("type"); - allTabsButton.setAttribute("command", "Browser:ShowAllTabs"); - } else { - allTabsButton.setAttribute("type", "menu"); - allTabsButton.removeAttribute("command"); - allTabsButton.removeAttribute("oncommand"); - } - }, - observe: function (aSubject, aTopic, aPrefName) { - this.readPref(); - }, - - pick: function allTabs_pick(aPreview) { - if (!aPreview) - aPreview = this._firstVisiblePreview; - if (aPreview) - this.tabToSelect = aPreview._tab; - - this.close(); - }, - - closeTab: function allTabs_closeTab(event) { - this.filterField.focus(); - gBrowser.removeTab(event.currentTarget._targetPreview._tab); - }, - - filter: function allTabs_filter() { - if (this._currentFilter == this.filterField.value) - return; - - this._currentFilter = this.filterField.value; - - var filter = this._currentFilter.split(/\s+/g); - this._visible = 0; - Array.forEach(this.previews, function (preview) { - var tab = preview._tab; - var matches = 0; - if (filter.length && !tab.hidden) { - let tabstring = tab.linkedBrowser.currentURI.spec; - try { - tabstring = decodeURI(tabstring); - } catch (e) {} - tabstring = tab.label + " " + tab.label.toLocaleLowerCase() + " " + tabstring; - for (let i = 0; i < filter.length; i++) - matches += tabstring.contains(filter[i]); - } - if (matches < filter.length || tab.hidden) { - preview.hidden = true; - } - else { - this._visible++; - this._updatePreview(preview); - preview.hidden = false; - } - }, this); - - this._reflow(); - }, + get canOpen() isElementVisible(this.toolbarButton), open: function allTabs_open() { - var allTabsButton = this.toolbarButton; - if (allTabsButton && - allTabsButton.getAttribute("type") == "menu") { + if (this.canOpen) { // Without setTimeout, the menupopup won't stay open when invoking // "View > Show All Tabs" and the menu bar auto-hides. setTimeout(function () { - allTabsButton.open = true; + allTabs.toolbarButton.open = true; }, 0); - return; } - - this.init(); - - if (this.isOpen) - return; - - this._maxPanelHeight = Math.max(gBrowser.clientHeight, screen.availHeight / 2); - this._maxPanelWidth = Math.max(gBrowser.clientWidth, screen.availWidth / 2); - - this.filter(); - - tabPreviewPanelHelper.opening(this); - - this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_NO_CONSUME); - this.panel.openPopup(gBrowser, "overlap", 0, 0, false, true); - }, - - close: function allTabs_close() { - this.panel.hidePopup(); - }, - - setupGUI: function allTabs_setupGUI() { - this.filterField.focus(); - this.filterField.placeholder = this.filterField.tooltipText; - - this.panel.addEventListener("keypress", this, false); - this.panel.addEventListener("keypress", this, true); - this._browserCommandSet.addEventListener("command", this, false); - - // When the panel is open, a second click on the all tabs button should - // close the panel but not re-open it. - document.getElementById("Browser:ShowAllTabs").setAttribute("disabled", "true"); - }, - - suspendGUI: function allTabs_suspendGUI() { - this.filterField.placeholder = ""; - this.filterField.value = ""; - this._currentFilter = null; - - this._updateTabCloseButton(); - - this.panel.removeEventListener("keypress", this, false); - this.panel.removeEventListener("keypress", this, true); - this._browserCommandSet.removeEventListener("command", this, false); - - setTimeout(function () { - document.getElementById("Browser:ShowAllTabs").removeAttribute("disabled"); - }, 300); - }, - - handleEvent: function allTabs_handleEvent(event) { - if (event.type.startsWith("Tab")) { - var tab = event.target; - if (event.type != "TabOpen") - var preview = this._getPreview(tab); - } - switch (event.type) { - case "TabAttrModified": - // tab attribute modified (e.g. label, crop, busy, image) - if (!preview.hidden) - this._updatePreview(preview); - break; - case "TabOpen": - if (this.isOpen) - this.close(); - this._addPreview(tab); - break; - case "TabMove": - let siblingPreview = tab.nextSibling && - this._getPreview(tab.nextSibling); - if (siblingPreview) - siblingPreview.parentNode.insertBefore(preview, siblingPreview); - else - this.container.lastChild.appendChild(preview); - if (this.isOpen && !preview.hidden) { - this._reflow(); - preview.focus(); - } - break; - case "TabClose": - this._removePreview(preview); - break; - case "keypress": - this._onKeyPress(event); - break; - case "command": - if (event.target.id != "Browser:ShowAllTabs") { - // Close the panel when there's a browser command executing in the background. - this.close(); - } - break; - } - }, - - _visible: 0, - _currentFilter: null, - get _stack () { - delete this._stack; - return this._stack = document.getElementById("allTabs-stack"); - }, - get _browserCommandSet () { - delete this._browserCommandSet; - return this._browserCommandSet = document.getElementById("mainCommandSet"); - }, - get _previewLabelHeight () { - delete this._previewLabelHeight; - return this._previewLabelHeight = parseInt(getComputedStyle(this.previews[0], "").lineHeight); - }, - - get _visiblePreviews () - Array.filter(this.previews, function (preview) !preview.hidden), - - get _firstVisiblePreview () { - if (this._visible == 0) - return null; - var previews = this.previews; - for (let i = 0; i < previews.length; i++) { - if (!previews[i].hidden) - return previews[i]; - } - return null; - }, - - _reflow: function allTabs_reflow() { - this._updateTabCloseButton(); - - const CONTAINER_MAX_WIDTH = this._maxPanelWidth * .95; - const CONTAINER_MAX_HEIGHT = this._maxPanelHeight - 35; - // the size of the whole preview relative to the thumbnail - const REL_PREVIEW_THUMBNAIL = 1.2; - const REL_PREVIEW_HEIGHT_WIDTH = tabPreviews.height / tabPreviews.width; - const PREVIEW_MAX_WIDTH = tabPreviews.width * REL_PREVIEW_THUMBNAIL; - - var rows, previewHeight, previewWidth, outerHeight; - this._columns = Math.floor(CONTAINER_MAX_WIDTH / PREVIEW_MAX_WIDTH); - do { - rows = Math.ceil(this._visible / this._columns); - previewWidth = Math.min(PREVIEW_MAX_WIDTH, - Math.round(CONTAINER_MAX_WIDTH / this._columns)); - previewHeight = Math.round(previewWidth * REL_PREVIEW_HEIGHT_WIDTH); - outerHeight = previewHeight + this._previewLabelHeight; - } while (rows * outerHeight > CONTAINER_MAX_HEIGHT && ++this._columns); - - var outerWidth = previewWidth; - { - let innerWidth = Math.ceil(previewWidth / REL_PREVIEW_THUMBNAIL); - let innerHeight = Math.ceil(previewHeight / REL_PREVIEW_THUMBNAIL); - var canvasStyle = "max-width:" + innerWidth + "px;" + - "min-width:" + innerWidth + "px;" + - "max-height:" + innerHeight + "px;" + - "min-height:" + innerHeight + "px;"; - } - - var previews = Array.slice(this.previews); - - while (this.container.hasChildNodes()) - this.container.removeChild(this.container.firstChild); - for (let i = rows || 1; i > 0; i--) - this.container.appendChild(document.createElement("hbox")); - - var row = this.container.firstChild; - var colCount = 0; - previews.forEach(function (preview) { - if (!preview.hidden && - ++colCount > this._columns) { - row = row.nextSibling; - colCount = 1; - } - preview.setAttribute("minwidth", outerWidth); - preview.setAttribute("height", outerHeight); - preview.setAttribute("canvasstyle", canvasStyle); - preview.removeAttribute("closebuttonhover"); - row.appendChild(preview); - }, this); - - this._stack.width = this._maxPanelWidth; - this.container.width = Math.ceil(outerWidth * Math.min(this._columns, this._visible)); - this.container.left = Math.round((this._maxPanelWidth - this.container.width) / 2); - this.container.maxWidth = this._maxPanelWidth - this.container.left; - this.container.maxHeight = rows * outerHeight; - }, - - _addPreview: function allTabs_addPreview(aTab) { - var preview = document.createElement("button"); - preview.className = "allTabs-preview"; - preview._tab = aTab; - this.container.lastChild.appendChild(preview); - }, - - _removePreview: function allTabs_removePreview(aPreview) { - var updateUI = (this.isOpen && !aPreview.hidden); - aPreview._tab = null; - aPreview.parentNode.removeChild(aPreview); - if (updateUI) { - this._visible--; - this._reflow(); - this.filterField.focus(); - } - }, - - _getPreview: function allTabs_getPreview(aTab) { - var previews = this.previews; - for (let i = 0; i < previews.length; i++) - if (previews[i]._tab == aTab) - return previews[i]; - return null; - }, - - _updateTabCloseButton: function allTabs_updateTabCloseButton(event) { - if (event && event.target == this.tabCloseButton) - return; - - if (this.tabCloseButton._targetPreview) { - if (event && event.target == this.tabCloseButton._targetPreview) - return; - - this.tabCloseButton._targetPreview.removeAttribute("closebuttonhover"); - } - - if (event && - event.target.parentNode.parentNode == this.container && - (event.target._tab.previousSibling || event.target._tab.nextSibling)) { - let canvas = event.target.firstChild.getBoundingClientRect(); - let container = this.container.getBoundingClientRect(); - let tabCloseButton = this.tabCloseButton.getBoundingClientRect(); - let alignLeft = getComputedStyle(this.panel, "").direction == "rtl"; -#ifdef XP_MACOSX - alignLeft = !alignLeft; -#endif - this.tabCloseButton.left = canvas.left - - container.left + - parseInt(this.container.left) + - (alignLeft ? 0 : - canvas.width - tabCloseButton.width); - this.tabCloseButton.top = canvas.top - container.top; - this.tabCloseButton._targetPreview = event.target; - this.tabCloseButton.style.visibility = "visible"; - event.target.setAttribute("closebuttonhover", "true"); - } else { - this.tabCloseButton.style.visibility = "hidden"; - this.tabCloseButton.left = this.tabCloseButton.top = 0; - this.tabCloseButton._targetPreview = null; - } - }, - - _updatePreview: function allTabs_updatePreview(aPreview) { - aPreview.setAttribute("label", aPreview._tab.label); - aPreview.setAttribute("tooltiptext", aPreview._tab.label); - aPreview.setAttribute("crop", aPreview._tab.crop); - if (aPreview._tab.image) - aPreview.setAttribute("image", aPreview._tab.image); - else - aPreview.removeAttribute("image"); - - var thumbnail = tabPreviews.get(aPreview._tab); - if (aPreview.firstChild) { - if (aPreview.firstChild == thumbnail) - return; - aPreview.removeChild(aPreview.firstChild); - } - aPreview.appendChild(thumbnail); - }, - - _onKeyPress: function allTabs_onKeyPress(event) { - if (event.eventPhase == event.CAPTURING_PHASE) { - this._onCapturingKeyPress(event); - return; - } - - if (event.keyCode == event.DOM_VK_ESCAPE) { - this.close(); - event.preventDefault(); - event.stopPropagation(); - return; - } - - if (event.target == this.filterField) { - switch (event.keyCode) { - case event.DOM_VK_UP: - if (this._visible) { - let previews = this._visiblePreviews; - let columns = Math.min(previews.length, this._columns); - previews[Math.floor(previews.length / columns) * columns - 1].focus(); - event.preventDefault(); - event.stopPropagation(); - } - break; - case event.DOM_VK_DOWN: - if (this._visible) { - this._firstVisiblePreview.focus(); - event.preventDefault(); - event.stopPropagation(); - } - break; - } - } - }, - - _onCapturingKeyPress: function allTabs_onCapturingKeyPress(event) { - switch (event.keyCode) { - case event.DOM_VK_UP: - case event.DOM_VK_DOWN: - if (event.target != this.filterField) - this._advanceFocusVertically(event); - break; - case event.DOM_VK_RETURN: - if (event.target == this.filterField) { - this.filter(); - this.pick(); - event.preventDefault(); - event.stopPropagation(); - } - break; - } - }, - - _advanceFocusVertically: function allTabs_advanceFocusVertically(event) { - var preview = document.activeElement; - if (!preview || preview.parentNode.parentNode != this.container) - return; - - event.stopPropagation(); - - var up = (event.keyCode == event.DOM_VK_UP); - var previews = this._visiblePreviews; - - if (up && preview == previews[0]) { - this.filterField.focus(); - return; - } - - var i = previews.indexOf(preview); - var columns = Math.min(previews.length, this._columns); - var column = i % columns; - var row = Math.floor(i / columns); - - function newIndex() row * columns + column; - function outOfBounds() newIndex() >= previews.length; - - if (up) { - row--; - if (row < 0) { - let rows = Math.ceil(previews.length / columns); - row = rows - 1; - column--; - if (outOfBounds()) - row--; - } - } else { - row++; - if (outOfBounds()) { - if (column == columns - 1) { - this.filterField.focus(); - return; - } - row = 0; - column++; - } - } - previews[newIndex()].focus(); } }; diff --git a/browser/base/content/browser-tabPreviews.xml b/browser/base/content/browser-tabPreviews.xml index e957649e750f..f3f2ad1809bb 100644 --- a/browser/base/content/browser-tabPreviews.xml +++ b/browser/base/content/browser-tabPreviews.xml @@ -34,42 +34,4 @@ #endif - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index 3e6278c191be..fc422470552f 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -418,21 +418,17 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m display: none; } -/* ::::: Keyboard UI Panel ::::: */ -.KUI-panel-closebutton { - -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image"); -} +/* ::::: Ctrl-Tab Panel ::::: */ -:-moz-any(.ctrlTab-preview, .allTabs-preview) > html|img, -:-moz-any(.ctrlTab-preview, .allTabs-preview) > html|canvas { +.ctrlTab-preview > html|img, +.ctrlTab-preview > html|canvas { min-width: inherit; max-width: inherit; min-height: inherit; max-height: inherit; } -.ctrlTab-favicon-container, -.allTabs-favicon-container { +.ctrlTab-favicon-container { -moz-box-align: start; %ifdef XP_MACOSX -moz-box-pack: end; @@ -441,27 +437,15 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m %endif } -.ctrlTab-favicon, -.allTabs-favicon { +.ctrlTab-favicon { width: 16px; height: 16px; } -/* ::::: Ctrl-Tab Panel ::::: */ .ctrlTab-preview { -moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#ctrlTab-preview"); } -/* ::::: All Tabs Panel ::::: */ -.allTabs-preview { - -moz-binding: url("chrome://browser/content/browser-tabPreviews.xml#allTabs-preview"); -} - -#allTabs-tab-close-button { - -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-image"); - margin: 0; -} - /* notification anchors should only be visible when their associated notifications are */ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 7d87a4c81f06..fa4c3007694b 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1297,7 +1297,6 @@ var gBrowserInit = { // Misc. inits. CombinedStopReload.init(); - allTabs.readPref(); TabsOnTop.init(); BookmarksMenuButton.init(); gPrivateBrowsingUI.init(); @@ -1459,7 +1458,6 @@ var gBrowserInit = { ctrlTab.readPref(); gPrefService.addObserver(ctrlTab.prefName, ctrlTab, false); - gPrefService.addObserver(allTabs.prefName, allTabs, false); // Initialize the download manager some time after the app starts so that // auto-resume downloads begin (such as after crashing or quitting with @@ -1650,7 +1648,6 @@ var gBrowserInit = { // First clean up services initialized in gBrowserInit.onLoad (or those whose // uninit methods don't depend on the services having been initialized). - allTabs.uninit(); CombinedStopReload.uninit(); @@ -1690,7 +1687,6 @@ var gBrowserInit = { Win7Features.onCloseWindow(); gPrefService.removeObserver(ctrlTab.prefName, ctrlTab); - gPrefService.removeObserver(allTabs.prefName, allTabs); ctrlTab.uninit(); TabView.uninit(); gBrowserThumbnails.uninit(); @@ -3799,7 +3795,6 @@ function BrowserToolboxCustomizeChange(aType) { default: gHomeButton.updatePersonalToolbarStyle(); BookmarksMenuButton.customizeChange(); - allTabs.readPref(); } } diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 47154c725bcf..5488aebf66d4 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -396,29 +396,6 @@ - - diff --git a/browser/base/content/test/Makefile.in b/browser/base/content/test/Makefile.in index eb0dd889676a..df865094d6b9 100644 --- a/browser/base/content/test/Makefile.in +++ b/browser/base/content/test/Makefile.in @@ -72,7 +72,6 @@ _BROWSER_FILES = \ head.js \ browser_typeAheadFind.js \ browser_keywordSearch.js \ - browser_allTabsPanel.js \ browser_alltabslistener.js \ browser_bug304198.js \ title_test.svg \ diff --git a/browser/base/content/test/browser_allTabsPanel.js b/browser/base/content/test/browser_allTabsPanel.js deleted file mode 100644 index eb82c0d1ae00..000000000000 --- a/browser/base/content/test/browser_allTabsPanel.js +++ /dev/null @@ -1,162 +0,0 @@ -function test() { - waitForExplicitFinish(); - - Services.prefs.setBoolPref(allTabs.prefName, true); - registerCleanupFunction(function () { - Services.prefs.clearUserPref(allTabs.prefName); - }); - - allTabs.init(); - nextSequence(); -} - -var sequences = 3; -var chars = "ABCDEFGHI"; -var closedTabs; -var history; -var steps; -var whenOpen = [ - startSearch, - clearSearch, clearSearch, - closeTab, - moveTab, - closePanel, -]; -var whenClosed = [ - openPanel, openPanel, openPanel, openPanel, openPanel, openPanel, - closeTab, closeTab, closeTab, - moveTab, moveTab, moveTab, - selectTab, selectTab, - undoCloseTab, - openTab, -]; - -function rand(min, max) { - return min + Math.floor(Math.random() * (max - min + 1)); -} -function pickOne(array) { - return array[rand(0, array.length - 1)]; -} -function pickOneTab() { - var tab = pickOne(gBrowser.tabs); - return [tab, Array.indexOf(gBrowser.tabs, tab)]; -} -function nextSequence() { - while (gBrowser.browsers.length > 1) - gBrowser.removeCurrentTab(); - if (sequences-- <= 0) { - allTabs.close(); - gBrowser.addTab(); - gBrowser.removeCurrentTab(); - finish(); - return; - } - closedTabs = 0; - steps = rand(10, 20); - var initialTabs = ""; - while (gBrowser.browsers.length < rand(3, 20)) { - let tabChar = pickOne(chars); - initialTabs += tabChar; - gBrowser.addTab("data:text/plain," + tabChar); - } - history = [initialTabs]; - gBrowser.removeCurrentTab(); - next(); -} -function next() { - executeSoon(function () { - is(allTabs.previews.length, gBrowser.browsers.length, - history.join(", ")); - if (steps-- <= 0) { - nextSequence(); - return; - } - var step; - var rv; - do { - step = pickOne(allTabs.isOpen ? whenOpen : whenClosed); - info(step.name); - rv = step(); - } while (rv === false); - history.push(step.name + (rv !== true && rv !== undefined ? " " + rv : "")); - }); -} - -function openPanel() { - if (allTabs.isOpen) - return false; - allTabs.panel.addEventListener("popupshown", function () { - allTabs.panel.removeEventListener("popupshown", arguments.callee, false); - next(); - }, false); - allTabs.open(); - return true; -} - -function closePanel() { - allTabs.panel.addEventListener("popuphidden", function () { - allTabs.panel.removeEventListener("popuphidden", arguments.callee, false); - next(); - }, false); - allTabs.close(); -} - -function closeTab() { - if (gBrowser.browsers.length == 1) - return false; - var [tab, index] = pickOneTab(); - gBrowser.removeTab(tab); - closedTabs++; - next(); - return index; -} - -function startSearch() { - allTabs.filterField.value = pickOne(chars); - info(allTabs.filterField.value); - allTabs.filter(); - next(); - return allTabs.filterField.value; -} - -function clearSearch() { - if (!allTabs.filterField.value) - return false; - allTabs.filterField.value = ""; - allTabs.filter(); - next(); - return true; -} - -function undoCloseTab() { - if (!closedTabs) - return false; - window.undoCloseTab(0); - closedTabs--; - next(); - return true; -} - -function selectTab() { - var [tab, index] = pickOneTab(); - gBrowser.selectedTab = tab; - next(); - return index; -} - -function openTab() { - BrowserOpenTab(); - next(); -} - -function moveTab() { - if (gBrowser.browsers.length == 1) - return false; - var [tab, currentIndex] = pickOneTab(); - do { - var [, newIndex] = pickOneTab(); - } while (newIndex == currentIndex); - gBrowser.moveTabTo(tab, newIndex); - next(); - return currentIndex + "->" + newIndex; -} diff --git a/browser/base/content/test/browser_ctrlTab.js b/browser/base/content/test/browser_ctrlTab.js index 61937a5ffd0f..983d30679c46 100644 --- a/browser/base/content/test/browser_ctrlTab.js +++ b/browser/base/content/test/browser_ctrlTab.js @@ -9,7 +9,7 @@ function test() { ctrlTabTest([2] , 1, 0); ctrlTabTest([2, 3, 1], 2, 2); - ctrlTabTest([] , 5, 2); + ctrlTabTest([] , 4, 2); { let selectedIndex = gBrowser.tabContainer.selectedIndex; @@ -39,7 +39,7 @@ function test() { gBrowser.addTab(); checkTabs(3); - ctrlTabTest([2, 1, 0], 9, 1); + ctrlTabTest([2, 1, 0], 7, 1); gBrowser.addTab(); checkTabs(4); diff --git a/browser/components/dirprovider/tests/unit/xpcshell.ini b/browser/components/dirprovider/tests/unit/xpcshell.ini index dc6d591390e8..27afed6507b4 100644 --- a/browser/components/dirprovider/tests/unit/xpcshell.ini +++ b/browser/components/dirprovider/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_dirprovider.js tail = +firefox-appdir = browser [test_bookmark_pref.js] [test_keys.js] diff --git a/browser/components/downloads/test/unit/xpcshell.ini b/browser/components/downloads/test/unit/xpcshell.ini index e24cb6e0c3a5..924123c74223 100644 --- a/browser/components/downloads/test/unit/xpcshell.ini +++ b/browser/components/downloads/test/unit/xpcshell.ini @@ -1,5 +1,6 @@ [DEFAULT] head = head.js tail = +firefox-appdir = browser [test_DownloadsCommon.js] diff --git a/browser/components/feeds/test/unit/xpcshell.ini b/browser/components/feeds/test/unit/xpcshell.ini index ec16259754f9..abe786897506 100644 --- a/browser/components/feeds/test/unit/xpcshell.ini +++ b/browser/components/feeds/test/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_feeds.js tail = +firefox-appdir = browser [test_355473.js] [test_758990.js] diff --git a/browser/components/migration/tests/unit/xpcshell.ini b/browser/components/migration/tests/unit/xpcshell.ini index 2704bc2cfbc5..c08c2533f0fc 100644 --- a/browser/components/migration/tests/unit/xpcshell.ini +++ b/browser/components/migration/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_migration.js tail = +firefox-appdir = browser [test_IE_bookmarks.js] skip-if = os != "win" diff --git a/browser/components/places/tests/unit/xpcshell.ini b/browser/components/places/tests/unit/xpcshell.ini index 07ae83c55796..e8b2576f6636 100644 --- a/browser/components/places/tests/unit/xpcshell.ini +++ b/browser/components/places/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_bookmarks.js tail = +firefox-appdir = browser [test_421483.js] [test_browserGlue_corrupt.js] diff --git a/browser/components/sessionstore/test/unit/xpcshell.ini b/browser/components/sessionstore/test/unit/xpcshell.ini index 10cd5869f9c6..661c5d705c75 100644 --- a/browser/components/sessionstore/test/unit/xpcshell.ini +++ b/browser/components/sessionstore/test/unit/xpcshell.ini @@ -1,8 +1,9 @@ [DEFAULT] head = head.js tail = +firefox-appdir = browser [test_startup_nosession_sync.js] [test_startup_nosession_async.js] [test_startup_session_sync.js] -[test_startup_session_async.js] \ No newline at end of file +[test_startup_session_async.js] diff --git a/browser/components/shell/test/unit/xpcshell.ini b/browser/components/shell/test/unit/xpcshell.ini index 469a8444c05d..33804fd42179 100644 --- a/browser/components/shell/test/unit/xpcshell.ini +++ b/browser/components/shell/test/unit/xpcshell.ini @@ -1,5 +1,6 @@ [DEFAULT] head = tail = +firefox-appdir = browser [test_421977.js] diff --git a/browser/defs.mk b/browser/defs.mk new file mode 100644 index 000000000000..3eb73eb502f8 --- /dev/null +++ b/browser/defs.mk @@ -0,0 +1,2 @@ +DIST_SUBDIR=browser +XPI_ROOT_APPID=$(MOZ_APP_ID) diff --git a/browser/devtools/shared/test/unit/xpcshell.ini b/browser/devtools/shared/test/unit/xpcshell.ini index afc258a4f3d9..342274bedb6e 100644 --- a/browser/devtools/shared/test/unit/xpcshell.ini +++ b/browser/devtools/shared/test/unit/xpcshell.ini @@ -1,5 +1,6 @@ [DEFAULT] head = tail = +firefox-appdir = browser [test_undoStack.js] diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 93b7125642fd..3dffdcd7fa25 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -30,16 +30,18 @@ #endif [@AB_CD@] +@BINPATH@/browser/chrome/@AB_CD@@JAREXT@ +@BINPATH@/browser/chrome/@AB_CD@.manifest @BINPATH@/chrome/@AB_CD@@JAREXT@ @BINPATH@/chrome/@AB_CD@.manifest -@BINPATH@/defaults/profile/bookmarks.html -@BINPATH@/defaults/profile/chrome/* -@BINPATH@/defaults/profile/localstore.rdf -@BINPATH@/defaults/profile/mimeTypes.rdf +@BINPATH@/browser/defaults/profile/bookmarks.html +@BINPATH@/browser/defaults/profile/chrome/* +@BINPATH@/browser/defaults/profile/localstore.rdf +@BINPATH@/browser/defaults/profile/mimeTypes.rdf @BINPATH@/dictionaries/* @BINPATH@/hyphenation/* -@BINPATH@/@PREF_DIR@/firefox-l10n.js -@BINPATH@/searchplugins/* +@BINPATH@/browser/@PREF_DIR@/firefox-l10n.js +@BINPATH@/browser/searchplugins/* #ifdef XP_WIN32 @BINPATH@/uninstall/helper.exe #endif @@ -123,7 +125,7 @@ #else @BINPATH@/mozsqlt3@DLL_SUFFIX@ #endif -@BINPATH@/blocklist.xml +@BINPATH@/browser/blocklist.xml #ifdef XP_UNIX #ifndef XP_MACOSX @BINPATH@/run-mozilla.sh @@ -132,7 +134,7 @@ #endif ; [Components] -@BINPATH@/components/components.manifest +@BINPATH@/browser/components/components.manifest @BINPATH@/components/alerts.xpt #ifdef ACCESSIBILITY #ifdef XP_WIN32 @@ -145,8 +147,8 @@ @BINPATH@/components/appstartup.xpt @BINPATH@/components/autocomplete.xpt @BINPATH@/components/autoconfig.xpt -@BINPATH@/components/browsercompsbase.xpt -@BINPATH@/components/browser-feeds.xpt +@BINPATH@/browser/components/browsercompsbase.xpt +@BINPATH@/browser/components/browser-feeds.xpt @BINPATH@/components/caps.xpt @BINPATH@/components/chrome.xpt @BINPATH@/components/commandhandler.xpt @@ -223,7 +225,7 @@ @BINPATH@/components/filepicker.xpt #endif @BINPATH@/components/find.xpt -@BINPATH@/components/fuel.xpt +@BINPATH@/browser/components/fuel.xpt @BINPATH@/components/gfx.xpt @BINPATH@/components/html5.xpt @BINPATH@/components/htmlparser.xpt @@ -247,7 +249,7 @@ @BINPATH@/components/layout_xul.xpt @BINPATH@/components/locale.xpt @BINPATH@/components/lwbrk.xpt -@BINPATH@/components/migration.xpt +@BINPATH@/browser/components/migration.xpt @BINPATH@/components/mimetype.xpt @BINPATH@/components/mozfind.xpt @BINPATH@/components/necko_about.xpt @@ -282,12 +284,12 @@ @BINPATH@/components/rdf.xpt @BINPATH@/components/satchel.xpt @BINPATH@/components/saxparser.xpt -@BINPATH@/components/sessionstore.xpt +@BINPATH@/browser/components/sessionstore.xpt @BINPATH@/components/services-crypto-component.xpt #ifdef MOZ_SERVICES_CAPTIVEDETECT @BINPATH@/components/services-captivedetect.xpt #endif -@BINPATH@/components/shellservice.xpt +@BINPATH@/browser/components/shellservice.xpt @BINPATH@/components/shistory.xpt @BINPATH@/components/spellchecker.xpt @BINPATH@/components/storage.xpt @@ -332,24 +334,24 @@ @BINPATH@/components/BrowserElementParent.js @BINPATH@/components/FeedProcessor.manifest @BINPATH@/components/FeedProcessor.js -@BINPATH@/components/BrowserFeeds.manifest -@BINPATH@/components/FeedConverter.js -@BINPATH@/components/FeedWriter.js -@BINPATH@/components/fuelApplication.manifest -@BINPATH@/components/fuelApplication.js -@BINPATH@/components/WebContentConverter.js -@BINPATH@/components/BrowserComponents.manifest -@BINPATH@/components/nsBrowserContentHandler.js -@BINPATH@/components/nsBrowserGlue.js -@BINPATH@/components/nsSetDefaultBrowser.manifest -@BINPATH@/components/nsSetDefaultBrowser.js -@BINPATH@/components/BrowserDownloads.manifest -@BINPATH@/components/DownloadsStartup.js -@BINPATH@/components/DownloadsUI.js -@BINPATH@/components/BrowserPlaces.manifest -@BINPATH@/components/BrowserPageThumbs.manifest -@BINPATH@/components/nsPrivateBrowsingServiceObsolete.manifest -@BINPATH@/components/nsPrivateBrowsingServiceObsolete.js +@BINPATH@/browser/components/BrowserFeeds.manifest +@BINPATH@/browser/components/FeedConverter.js +@BINPATH@/browser/components/FeedWriter.js +@BINPATH@/browser/components/fuelApplication.manifest +@BINPATH@/browser/components/fuelApplication.js +@BINPATH@/browser/components/WebContentConverter.js +@BINPATH@/browser/components/BrowserComponents.manifest +@BINPATH@/browser/components/nsBrowserContentHandler.js +@BINPATH@/browser/components/nsBrowserGlue.js +@BINPATH@/browser/components/nsSetDefaultBrowser.manifest +@BINPATH@/browser/components/nsSetDefaultBrowser.js +@BINPATH@/browser/components/BrowserDownloads.manifest +@BINPATH@/browser/components/DownloadsStartup.js +@BINPATH@/browser/components/DownloadsUI.js +@BINPATH@/browser/components/BrowserPlaces.manifest +@BINPATH@/browser/components/BrowserPageThumbs.manifest +@BINPATH@/browser/components/nsPrivateBrowsingServiceObsolete.manifest +@BINPATH@/browser/components/nsPrivateBrowsingServiceObsolete.js @BINPATH@/components/SiteSpecificUserAgent.js @BINPATH@/components/SiteSpecificUserAgent.manifest @BINPATH@/components/toolkitsearch.manifest @@ -376,8 +378,8 @@ @BINPATH@/components/NetworkGeolocationProvider.js @BINPATH@/components/GPSDGeolocationProvider.manifest @BINPATH@/components/GPSDGeolocationProvider.js -@BINPATH@/components/nsSidebar.manifest -@BINPATH@/components/nsSidebar.js +@BINPATH@/browser/components/nsSidebar.manifest +@BINPATH@/browser/components/nsSidebar.js @BINPATH@/components/extensions.manifest @BINPATH@/components/addonManager.js @BINPATH@/components/amContentHandler.js @@ -391,15 +393,15 @@ @BINPATH@/components/nsUpdateTimerManager.manifest @BINPATH@/components/nsUpdateTimerManager.js @BINPATH@/components/pluginGlue.manifest -@BINPATH@/components/nsSessionStore.manifest -@BINPATH@/components/nsSessionStartup.js -@BINPATH@/components/nsSessionStore.js +@BINPATH@/browser/components/nsSessionStore.manifest +@BINPATH@/browser/components/nsSessionStartup.js +@BINPATH@/browser/components/nsSessionStore.js @BINPATH@/components/nsURLFormatter.manifest @BINPATH@/components/nsURLFormatter.js #ifndef XP_OS2 -@BINPATH@/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@ +@BINPATH@/browser/components/@DLL_PREFIX@browsercomps@DLL_SUFFIX@ #else -@BINPATH@/components/brwsrcmp@DLL_SUFFIX@ +@BINPATH@/browser/components/brwsrcmp@DLL_SUFFIX@ #endif @BINPATH@/components/txEXSLTRegExFunctions.manifest @BINPATH@/components/txEXSLTRegExFunctions.js @@ -409,10 +411,10 @@ @BINPATH@/components/nsPlacesAutoComplete.manifest @BINPATH@/components/nsPlacesAutoComplete.js @BINPATH@/components/nsPlacesExpiration.js -@BINPATH@/components/PlacesProtocolHandler.js +@BINPATH@/browser/components/PlacesProtocolHandler.js @BINPATH@/components/PlacesCategoriesStarter.js @BINPATH@/components/ColorAnalyzer.js -@BINPATH@/components/PageThumbsProtocol.js +@BINPATH@/browser/components/PageThumbsProtocol.js @BINPATH@/components/nsDefaultCLH.manifest @BINPATH@/components/nsDefaultCLH.js @BINPATH@/components/nsContentPrefService.manifest @@ -446,21 +448,30 @@ @BINPATH@/components/DOMWifiManager.js @BINPATH@/components/DOMWifiManager.manifest #endif -@BINPATH@/components/BrowserProfileMigrators.manifest -@BINPATH@/components/ProfileMigrator.js -@BINPATH@/components/ChromeProfileMigrator.js -@BINPATH@/components/FirefoxProfileMigrator.js +@BINPATH@/browser/components/BrowserProfileMigrators.manifest +@BINPATH@/browser/components/ProfileMigrator.js +@BINPATH@/browser/components/ChromeProfileMigrator.js +@BINPATH@/browser/components/FirefoxProfileMigrator.js #ifdef XP_WIN -@BINPATH@/components/IEProfileMigrator.js -@BINPATH@/components/SafariProfileMigrator.js +@BINPATH@/browser/components/IEProfileMigrator.js +@BINPATH@/browser/components/SafariProfileMigrator.js #endif #ifdef XP_MACOSX -@BINPATH@/components/SafariProfileMigrator.js +@BINPATH@/browser/components/SafariProfileMigrator.js @BINPATH@/components/libalerts.dylib #endif #ifdef MOZ_ENABLE_DBUS @BINPATH@/components/@DLL_PREFIX@dbusservice@DLL_SUFFIX@ #endif +#ifdef MOZ_ENABLE_GNOME_COMPONENT +@BINPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@ +#endif +#ifdef MOZ_ENABLE_GNOMEVFS +@BINPATH@/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@ +#endif +#if defined(XP_MACOSX) || defined(MOZ_ENABLE_DBUS) || defined(MOZ_ENABLE_GNOME_COMPONENT) || defined(MOZ_ENABLE_GNOMEVFS) +@BINPATH@/components/components.manifest +#endif @BINPATH@/components/nsINIProcessor.manifest @BINPATH@/components/nsINIProcessor.js @BINPATH@/components/nsPrompter.manifest @@ -519,6 +530,7 @@ #endif ; Modules +@BINPATH@/browser/modules/* @BINPATH@/modules/* ; Safe Browsing @@ -530,11 +542,6 @@ @BINPATH@/components/url-classifier.xpt #endif -; GNOME hooks -#ifdef MOZ_ENABLE_GNOME_COMPONENT -@BINPATH@/components/@DLL_PREFIX@mozgnome@DLL_SUFFIX@ -#endif - ; ANGLE GLES-on-D3D rendering library #ifdef MOZ_ANGLE_RENDERER @BINPATH@/libEGL.dll @@ -543,38 +550,42 @@ #endif ; [Browser Chrome Files] -@BINPATH@/chrome/browser@JAREXT@ -@BINPATH@/chrome/browser.manifest -@BINPATH@/chrome/pdfjs.manifest -@BINPATH@/chrome/pdfjs/* -@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf -@BINPATH@/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png +@BINPATH@/browser/chrome.manifest +@BINPATH@/browser/chrome/browser@JAREXT@ +@BINPATH@/browser/chrome/browser.manifest +@BINPATH@/browser/chrome/pdfjs.manifest +@BINPATH@/browser/chrome/pdfjs/* +@BINPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf +@BINPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png #ifdef SHIP_FEEDBACK -@BINPATH@/distribution/extensions/testpilot@labs.mozilla.com.xpi +@BINPATH@/browser/distribution/extensions/testpilot@labs.mozilla.com.xpi #endif @BINPATH@/chrome/toolkit@JAREXT@ @BINPATH@/chrome/toolkit.manifest #ifdef MOZ_GTK2 -@BINPATH@/chrome/icons/default/default16.png -@BINPATH@/chrome/icons/default/default32.png -@BINPATH@/chrome/icons/default/default48.png +@BINPATH@/browser/chrome/icons/default/default16.png +@BINPATH@/browser/chrome/icons/default/default32.png +@BINPATH@/browser/chrome/icons/default/default48.png #endif ; shell icons #ifdef XP_UNIX #ifndef XP_MACOSX -@BINPATH@/icons/*.png +; shell icons +@BINPATH@/browser/icons/*.png +; updater icon +@BINPATH@/icons/updater.png #endif #endif ; [Default Preferences] ; All the pref files must be part of base to prevent migration bugs -@BINPATH@/@PREF_DIR@/firefox.js -@BINPATH@/@PREF_DIR@/firefox-branding.js +@BINPATH@/browser/@PREF_DIR@/firefox.js +@BINPATH@/browser/@PREF_DIR@/firefox-branding.js @BINPATH@/greprefs.js @BINPATH@/defaults/autoconfig/platform.js @BINPATH@/defaults/autoconfig/prefcalls.js -@BINPATH@/defaults/profile/prefs.js +@BINPATH@/browser/defaults/profile/prefs.js #ifndef LIBXUL_SDK ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325) @@ -697,18 +708,12 @@ bin/libfreebl_32int64_3.so @BINPATH@/Throbber-small.gif #endif #endif -@BINPATH@/crashreporter-override.ini +@BINPATH@/browser/crashreporter-override.ini #ifdef MOZ_CRASHREPORTER_INJECTOR @BINPATH@/breakpadinjector.dll #endif #endif -; [Extensions] -; -#ifdef MOZ_ENABLE_GNOMEVFS -bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@ -#endif - ; [OS/2] #ifdef XP_OS2 @BINPATH@/MozSounds.cmd diff --git a/browser/locales/en-US/chrome/browser/browser.dtd b/browser/locales/en-US/chrome/browser/browser.dtd index 87d0d40db85e..600d2d70e484 100644 --- a/browser/locales/en-US/chrome/browser/browser.dtd +++ b/browser/locales/en-US/chrome/browser/browser.dtd @@ -585,7 +585,6 @@ just addresses the organization to follow, e.g. "This site is run by " --> - diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn index 45ec61de90ba..19e43e0d71d8 100644 --- a/browser/locales/jar.mn +++ b/browser/locales/jar.mn @@ -130,7 +130,7 @@ locale/pdfviewer/viewer.properties (%pdfviewer/viewer.properties) locale/pdfviewer/chrome.properties (%pdfviewer/chrome.properties) #ifdef MOZ_WEBAPP_RUNTIME -../webapprt/chrome/@AB_CD@.jar: +../../webapprt/chrome/@AB_CD@.jar: % locale webapprt @AB_CD@ %locale/webapprt/ locale/webapprt/webapp.dtd (%webapprt/webapp.dtd) locale/webapprt/webapp.properties (%webapprt/webapp.properties) diff --git a/browser/modules/test/unit/xpcshell.ini b/browser/modules/test/unit/xpcshell.ini index 2570d49e1ce2..2d1cccf73093 100644 --- a/browser/modules/test/unit/xpcshell.ini +++ b/browser/modules/test/unit/xpcshell.ini @@ -1,5 +1,6 @@ [DEFAULT] head = tail = +firefox-appdir = browser [test_newtab-migrate-v1.js] diff --git a/browser/themes/gnomestripe/KUI-close.png b/browser/themes/gnomestripe/KUI-close.png deleted file mode 100644 index 08eeb8183168..000000000000 Binary files a/browser/themes/gnomestripe/KUI-close.png and /dev/null differ diff --git a/browser/themes/gnomestripe/browser.css b/browser/themes/gnomestripe/browser.css index 6f7d95e44915..f1fc893b3f76 100644 --- a/browser/themes/gnomestripe/browser.css +++ b/browser/themes/gnomestripe/browser.css @@ -1773,16 +1773,11 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- margin-bottom: -2px; } -#alltabs-button > .toolbarbutton-icon { - list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png"); - margin: 2px 0 1px; -} - -#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker { +#alltabs-button > .toolbarbutton-menu-dropmarker { margin-bottom: -2px; } -#alltabs-button[type="menu"] > .toolbarbutton-icon { +#alltabs-button > .toolbarbutton-icon { display: none; } @@ -1836,20 +1831,9 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { display: -moz-box; /* display chevron icon in text mode */ } -/* ::::: Keyboard UI Panel ::::: */ +/* Ctrl-Tab */ -.KUI-panel-closebutton { - list-style-image: url(KUI-close.png); -} - -.KUI-panel-closebutton > .toolbarbutton-icon { - margin: 0; -} - -/* ::::: Ctrl-Tab and All Tabs Panels ::::: */ - -.ctrlTab-preview, -.allTabs-preview { +.ctrlTab-preview { -moz-appearance: toolbarbutton; } @@ -1858,22 +1842,17 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { } .ctrlTab-preview:focus .tabPreview-canvas, -.ctrlTab-preview:hover .tabPreview-canvas, -.allTabs-preview:focus .tabPreview-canvas, -.allTabs-preview:hover .tabPreview-canvas { +.ctrlTab-preview:hover .tabPreview-canvas { box-shadow: none; } -.ctrlTab-favicon[src], -.allTabs-favicon[src] { +.ctrlTab-favicon[src] { background-color: white; width: 20px; height: 20px; padding: 2px; } -/* Ctrl-Tab */ - #ctrlTab-panel { padding: 10px; } @@ -1889,25 +1868,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon { margin-top: 10px; } -/* All Tabs */ - -#allTabs-panel { - padding-bottom: 10px; -} - -#allTabs-meta { - padding: 5px; -} - -#allTabs-filter { - -moz-margin-start: 36px; - -moz-margin-end: 0; -} - -.allTabs-preview-label { - transform: translate(0, 2px); -} - /* Application button menu */ .splitmenu-menuitem { diff --git a/browser/themes/gnomestripe/jar.mn b/browser/themes/gnomestripe/jar.mn index 475dd4dcf56c..f68c6d2c6fe7 100644 --- a/browser/themes/gnomestripe/jar.mn +++ b/browser/themes/gnomestripe/jar.mn @@ -30,7 +30,6 @@ browser.jar: skin/classic/browser/identity-icons-https-ev.png skin/classic/browser/identity-icons-https-mixed-active.png skin/classic/browser/Info.png - skin/classic/browser/KUI-close.png skin/classic/browser/mixed-content-blocked-16.png skin/classic/browser/monitor.png skin/classic/browser/monitor_16-10.png @@ -100,7 +99,6 @@ browser.jar: skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css) skin/classic/browser/social/social.png (social/social.png) skin/classic/browser/social/chat-close.png (social/chat-close.png) - skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png) skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) skin/classic/browser/tabbrowser/loading.png (tabbrowser/loading.png) skin/classic/browser/tabbrowser/tab.png (tabbrowser/tab.png) diff --git a/browser/themes/gnomestripe/tabbrowser/alltabs.png b/browser/themes/gnomestripe/tabbrowser/alltabs.png deleted file mode 100644 index 2f1902519668..000000000000 Binary files a/browser/themes/gnomestripe/tabbrowser/alltabs.png and /dev/null differ diff --git a/browser/themes/pinstripe/KUI-close.png b/browser/themes/pinstripe/KUI-close.png deleted file mode 100644 index 08eeb8183168..000000000000 Binary files a/browser/themes/pinstripe/KUI-close.png and /dev/null differ diff --git a/browser/themes/pinstripe/browser.css b/browser/themes/pinstripe/browser.css index 0b98d099597c..9e355e0a2ee5 100644 --- a/browser/themes/pinstripe/browser.css +++ b/browser/themes/pinstripe/browser.css @@ -2763,7 +2763,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { -moz-image-region: rect(0, 34px, 20px, 17px); } -#TabsToolbar > #alltabs-button[type="menu"][open="true"]:not([disabled="true"]), +#TabsToolbar > #alltabs-button[open="true"]:not([disabled="true"]), #TabsToolbar > #alltabs-button:not([disabled="true"]):hover:active { -moz-image-region: rect(0, 51px, 20px, 34px); } @@ -2778,7 +2778,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { -moz-image-region: rect(0, 68px, 40px, 34px); } - #TabsToolbar > #alltabs-button[type="menu"][open="true"]:not([disabled="true"]), + #TabsToolbar > #alltabs-button[open="true"]:not([disabled="true"]), #TabsToolbar > #alltabs-button:not([disabled="true"]):hover:active { -moz-image-region: rect(0, 102px, 40px, 68px); } @@ -2788,7 +2788,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { } } -#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker { +#alltabs-button > .toolbarbutton-menu-dropmarker { display: none; } @@ -3267,25 +3267,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { -moz-window-shadow: none; } -.KUI-panel-closebutton { - list-style-image: url(KUI-close.png); - -moz-appearance: none; - border: none; - padding: 0; - width: 24px; - height: 24px; -} - -.KUI-panel-closebutton:not(:hover) { - opacity: .6; -} - -.KUI-panel-closebutton > .toolbarbutton-icon { - margin: 0; -} - -/* ::::: Ctrl-Tab and All Tabs Panels ::::: */ - /* Ctrl-Tab */ #ctrlTab-panel { @@ -3335,65 +3316,6 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker { margin-top: .5em; } -/* All Tabs */ - -#allTabs-panel { - padding-bottom: 10px; - -moz-appearance: none; - border: none; - background: -moz-dialog; - color: -moz-dialogText; -} - -#allTabs-meta { - margin: 10px; -} - -#allTabs-filter { - -moz-margin-start: 24px; - -moz-margin-end: 0; -} - -#allTabs-tab-close-button > .toolbarbutton-icon { - margin: 0; -} - -.allTabs-favicon[src] { - background-color: -moz-dialog; - width: 20px; - height: 20px; - padding-bottom: 4px; - -moz-padding-start: 4px; - border-bottom-left-radius: 4px; -} - -.allTabs-favicon[src]:-moz-locale-dir(rtl) { - border-bottom-left-radius: 0; - border-bottom-right-radius: 4px; -} - -.allTabs-preview:not(:focus) > * > .allTabs-favicon-container > .allTabs-favicon[src] { - width: 22px; - height: 22px; - padding-top: 2px; - -moz-padding-end: 2px; - margin-top: -2px; - -moz-margin-end: -2px; -} - -.allTabs-preview-inner > .tabPreview-canvas { - background-color: rgb(60%,60%,60%); - box-shadow: 0 0 1.5px ThreeDShadow; -} - -.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas { - opacity: .8; -} - -.allTabs-preview:focus > * > .allTabs-preview-inner { - box-shadow: @focusRingShadow@; -} - /* Add-on bar */ #addon-bar { diff --git a/browser/themes/pinstripe/jar.mn b/browser/themes/pinstripe/jar.mn index 8ec761cdac36..56c5f57a86dd 100644 --- a/browser/themes/pinstripe/jar.mn +++ b/browser/themes/pinstripe/jar.mn @@ -39,7 +39,6 @@ browser.jar: skin/classic/browser/Info.png skin/classic/browser/keyhole-circle.png skin/classic/browser/KUI-background.png - skin/classic/browser/KUI-close.png skin/classic/browser/menu-back.png skin/classic/browser/menu-forward.png skin/classic/browser/mixed-content-blocked-16.png diff --git a/browser/themes/winstripe/KUI-close.png b/browser/themes/winstripe/KUI-close.png deleted file mode 100644 index 08eeb8183168..000000000000 Binary files a/browser/themes/winstripe/KUI-close.png and /dev/null differ diff --git a/browser/themes/winstripe/browser-aero.css b/browser/themes/winstripe/browser-aero.css index dc77a53f3fe0..3f25904e8b4c 100644 --- a/browser/themes/winstripe/browser-aero.css +++ b/browser/themes/winstripe/browser-aero.css @@ -318,7 +318,6 @@ padding-right: 1px; } - #allTabs-panel, #ctrlTab-panel { background: transparent; -moz-appearance: -moz-win-glass; diff --git a/browser/themes/winstripe/browser.css b/browser/themes/winstripe/browser.css index 5ac41f090d18..0219bcba5ae2 100644 --- a/browser/themes/winstripe/browser.css +++ b/browser/themes/winstripe/browser.css @@ -2010,28 +2010,22 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action- } #alltabs-button { - list-style-image: url("chrome://browser/skin/tabbrowser/alltabs.png"); - -moz-image-region: rect(0, 14px, 16px, 0); -} - -#alltabs-button[type="menu"] { list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow.png"); - -moz-image-region: auto; } %ifdef WINSTRIPE_AERO -:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > #alltabs-button[type=menu]:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), -:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > toolbarpaletteitem > #alltabs-button[type=menu]:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), +:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > #alltabs-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), +:-moz-any(#TabsToolbar, #nav-bar[tabsontop=false], #toolbar-menubar) > toolbarpaletteitem > #alltabs-button:-moz-system-metric(windows-compositor):not(:-moz-lwtheme), %endif -#alltabs-button[type="menu"]:-moz-lwtheme-brighttext { +#alltabs-button:-moz-lwtheme-brighttext { list-style-image: url("chrome://browser/skin/toolbarbutton-dropdown-arrow-inverted.png"); } -#alltabs-button[type="menu"] > .toolbarbutton-icon { +#alltabs-button > .toolbarbutton-icon { margin: 0 2px; } -#alltabs-button[type="menu"] > .toolbarbutton-menu-dropmarker { +#alltabs-button > .toolbarbutton-menu-dropmarker { display: none; } @@ -2426,25 +2420,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { background-color: rgba(27%,27%,27%,.65); } -.KUI-panel-closebutton { - list-style-image: url(KUI-close.png); - -moz-appearance: none; - border: none; - padding: 0; - width: 24px; - height: 24px; -} - -.KUI-panel-closebutton:not(:hover) { - opacity: .6; -} - -.KUI-panel-closebutton > .toolbarbutton-icon { - margin: 0; -} - -/* ::::: Ctrl-Tab and All Tabs Panels ::::: */ - /* Ctrl-Tab */ #ctrlTab-panel { @@ -2495,60 +2470,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] { margin-top: .5em; } -/* All Tabs */ - -#allTabs-panel { - padding-bottom: 10px; - -moz-appearance: none; - border: none; - background: -moz-dialog; - color: -moz-dialogText; -} - -#allTabs-meta { - margin: 10px; -} - -#allTabs-filter { - -moz-margin-start: 24px; - -moz-margin-end: 0; -} - -#allTabs-tab-close-button > .toolbarbutton-icon { - margin: 0; -} - -.allTabs-favicon[src] { - background-color: -moz-dialog; - width: 22px; - height: 22px; - padding-top: 1px; - padding-bottom: 5px; - -moz-padding-start: 1px; - -moz-padding-end: 5px; - margin-top: -2px; - -moz-margin-start: -2px; - border-bottom-right-radius: 4px; -} - -.allTabs-favicon[src]:-moz-locale-dir(rtl) { - border-bottom-right-radius: 0; - border-bottom-left-radius: 4px; -} - -.allTabs-preview-inner > .tabPreview-canvas { - background-color: rgb(60%,60%,60%); - box-shadow: 0 0 1.5px ThreeDShadow; -} - -.allTabs-preview:not(:hover):not([closebuttonhover]) > html|canvas { - opacity: .8; -} - -.allTabs-preview:focus > * > .allTabs-preview-inner { - outline: 1px dotted -moz-dialogText; -} - /* Add-on bar */ #addon-bar { diff --git a/browser/themes/winstripe/jar.mn b/browser/themes/winstripe/jar.mn index 81bf6aef55b8..9cbfa6f578e8 100644 --- a/browser/themes/winstripe/jar.mn +++ b/browser/themes/winstripe/jar.mn @@ -35,7 +35,6 @@ browser.jar: skin/classic/browser/identity-icons-https-mixed-active.png skin/classic/browser/keyhole-forward-mask.svg skin/classic/browser/KUI-background.png - skin/classic/browser/KUI-close.png skin/classic/browser/livemark-folder.png skin/classic/browser/menu-back.png skin/classic/browser/menu-forward.png @@ -119,7 +118,6 @@ browser.jar: skin/classic/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css) skin/classic/browser/social/social.png (social/social.png) skin/classic/browser/social/chat-close.png (social/chat-close.png) - skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png) skin/classic/browser/tabbrowser/newtab.png (tabbrowser/newtab.png) skin/classic/browser/tabbrowser/newtab-inverted.png (tabbrowser/newtab-inverted.png) skin/classic/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) @@ -264,7 +262,6 @@ browser.jar: skin/classic/aero/browser/identity-icons-https-mixed-active.png skin/classic/aero/browser/keyhole-forward-mask.svg skin/classic/aero/browser/KUI-background.png - skin/classic/aero/browser/KUI-close.png skin/classic/aero/browser/livemark-folder.png (livemark-folder-aero.png) skin/classic/aero/browser/menu-back.png (menu-back-aero.png) skin/classic/aero/browser/menu-forward.png (menu-forward-aero.png) @@ -348,7 +345,6 @@ browser.jar: skin/classic/aero/browser/preferences/aboutPermissions.css (preferences/aboutPermissions.css) skin/classic/aero/browser/social/social.png (social/social.png) skin/classic/aero/browser/social/chat-close.png (social/chat-close.png) - skin/classic/aero/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png) skin/classic/aero/browser/tabbrowser/newtab.png (tabbrowser/newtab.png) skin/classic/aero/browser/tabbrowser/newtab-inverted.png (tabbrowser/newtab-inverted.png) skin/classic/aero/browser/tabbrowser/connecting.png (tabbrowser/connecting.png) diff --git a/browser/themes/winstripe/tabbrowser/alltabs.png b/browser/themes/winstripe/tabbrowser/alltabs.png deleted file mode 100644 index 172d425f803a..000000000000 Binary files a/browser/themes/winstripe/tabbrowser/alltabs.png and /dev/null differ diff --git a/config/rules.mk b/config/rules.mk index b48f5678edd2..161bf7148640 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1741,8 +1741,17 @@ CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \ libs export:: $(CHECK_FROZEN_VARIABLES) -default all:: - if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi +PURGECACHES_DIRS ?= $(DIST)/bin +ifdef MOZ_WEBAPP_RUNTIME +PURGECACHES_DIRS += $(DIST)/bin/webapprt +endif + +PURGECACHES_FILES = $(addsuffix /.purgecaches,$(PURGECACHES_DIRS)) + +default all:: $(PURGECACHES_FILES) + +$(PURGECACHES_FILES): + if test -d $(@D) ; then touch $@ ; fi .DEFAULT_GOAL ?= default diff --git a/dom/plugins/test/testplugin/nptest.cpp b/dom/plugins/test/testplugin/nptest.cpp index 0b2d8bd4ab72..9cb9a24a51cf 100644 --- a/dom/plugins/test/testplugin/nptest.cpp +++ b/dom/plugins/test/testplugin/nptest.cpp @@ -1389,7 +1389,11 @@ NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname) instanceData->fileBuf = malloc((int32_t)size + 1); char* buf = reinterpret_cast(instanceData->fileBuf); fseek(file, 0, SEEK_SET); - fread(instanceData->fileBuf, 1, size, file); + size_t sizeRead = fread(instanceData->fileBuf, 1, size, file); + if (sizeRead != size) { + printf("Unable to read data from file\n"); + instanceData->err << "Unable to read data from file " << fname; + } fclose(file); buf[size] = '\0'; instanceData->fileBufSize = (int32_t)size; diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index b48f5678edd2..161bf7148640 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -1741,8 +1741,17 @@ CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \ libs export:: $(CHECK_FROZEN_VARIABLES) -default all:: - if test -d $(DIST)/bin ; then touch $(DIST)/bin/.purgecaches ; fi +PURGECACHES_DIRS ?= $(DIST)/bin +ifdef MOZ_WEBAPP_RUNTIME +PURGECACHES_DIRS += $(DIST)/bin/webapprt +endif + +PURGECACHES_FILES = $(addsuffix /.purgecaches,$(PURGECACHES_DIRS)) + +default all:: $(PURGECACHES_FILES) + +$(PURGECACHES_FILES): + if test -d $(@D) ; then touch $@ ; fi .DEFAULT_GOAL ?= default diff --git a/services/common/tests/unit/xpcshell.ini b/services/common/tests/unit/xpcshell.ini index b5707d678e76..8fadd2b41853 100644 --- a/services/common/tests/unit/xpcshell.ini +++ b/services/common/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_global.js head_helpers.js head_http.js tail = +firefox-appdir = browser # Test load modules first so syntax failures are caught early. [test_load_modules.js] diff --git a/services/crypto/component/tests/unit/xpcshell.ini b/services/crypto/component/tests/unit/xpcshell.ini index 5b594f491592..83b615888230 100644 --- a/services/crypto/component/tests/unit/xpcshell.ini +++ b/services/crypto/component/tests/unit/xpcshell.ini @@ -1,5 +1,6 @@ [DEFAULT] head = tail = +firefox-appdir = browser [test_jpake.js] diff --git a/services/crypto/tests/unit/xpcshell.ini b/services/crypto/tests/unit/xpcshell.ini index 3455f13ba5af..2e4ebcaed4a0 100644 --- a/services/crypto/tests/unit/xpcshell.ini +++ b/services/crypto/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_helpers.js ../../../common/tests/unit/head_helpers.js tail = +firefox-appdir = browser [test_load_modules.js] diff --git a/services/sync/tests/unit/xpcshell.ini b/services/sync/tests/unit/xpcshell.ini index 21bb66847cd6..107a573aa7ed 100644 --- a/services/sync/tests/unit/xpcshell.ini +++ b/services/sync/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_appinfo.js ../../../common/tests/unit/head_helpers.js head_helpers.js head_http_server.js tail = +firefox-appdir = browser # The manifest is roughly ordered from low-level to high-level. When making # systemic sweeping changes, this makes it easier to identify errors closer to diff --git a/toolkit/components/downloads/test/unit/xpcshell.ini b/toolkit/components/downloads/test/unit/xpcshell.ini index 39272abd196c..ded33cfabe26 100644 --- a/toolkit/components/downloads/test/unit/xpcshell.ini +++ b/toolkit/components/downloads/test/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_download_manager.js tail = +firefox-appdir = browser [test_bug_382825.js] [test_bug_384744.js] diff --git a/toolkit/components/places/tests/autocomplete/xpcshell.ini b/toolkit/components/places/tests/autocomplete/xpcshell.ini index 220a62af6003..e2a7fc2da349 100644 --- a/toolkit/components/places/tests/autocomplete/xpcshell.ini +++ b/toolkit/components/places/tests/autocomplete/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_autocomplete.js tail = +firefox-appdir = browser [test_416211.js] [test_416214.js] diff --git a/toolkit/components/places/tests/unit/xpcshell.ini b/toolkit/components/places/tests/unit/xpcshell.ini index ab11f7d6b10c..c6cbd4c35ec5 100644 --- a/toolkit/components/places/tests/unit/xpcshell.ini +++ b/toolkit/components/places/tests/unit/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_bookmarks.js tail = +firefox-appdir = browser [test_000_frecency.js] [test_317472.js] diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.ini b/toolkit/components/search/tests/xpcshell/xpcshell.ini index 2bb5277729de..2b87abb5d278 100644 --- a/toolkit/components/search/tests/xpcshell/xpcshell.ini +++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_search.js tail = +firefox-appdir = browser [test_nodb.js] [test_nodb_pluschanges.js] diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini index 7c00adc12bdc..77049e2703c3 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini +++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini @@ -1,6 +1,7 @@ [DEFAULT] head = head_addons.js tail = +firefox-appdir = browser [test_AddonRepository.js] # Bug 676992: test consistently hangs on Android