diff options
Diffstat (limited to 'browser/base/content')
-rw-r--r-- | browser/base/content/aboutDialog.js | 21 | ||||
-rw-r--r-- | browser/base/content/aboutDialog.xul | 20 | ||||
-rw-r--r-- | browser/base/content/browser-media.js | 62 | ||||
-rw-r--r-- | browser/base/content/browser-menubar.inc | 6 | ||||
-rw-r--r-- | browser/base/content/browser-places.js | 4 | ||||
-rw-r--r-- | browser/base/content/browser-sets.inc | 4 | ||||
-rwxr-xr-x | browser/base/content/browser.js | 19 | ||||
-rw-r--r-- | browser/base/content/browser.xul | 6 | ||||
-rw-r--r-- | browser/base/content/newtab/customize.js | 17 | ||||
-rw-r--r-- | browser/base/content/newtab/newTab.xhtml | 11 | ||||
-rw-r--r-- | browser/base/content/tabbrowser.xml | 17 |
11 files changed, 68 insertions, 119 deletions
diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js index b024d2d52..f9571621f 100644 --- a/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js @@ -40,16 +40,23 @@ function init(aEvent) // Pref is unset } - // Include the build ID and display warning if this is an "a#" (nightly or aurora) build + // Include the build ID let versionField = document.getElementById("version"); let version = Services.appinfo.version; + let buildID = Services.appinfo.appBuildID; + let year = buildID.slice(0, 4); + let month = buildID.slice(4, 6); + let day = buildID.slice(6, 8); + let hour = buildID.slice(8, 10); + let minute = buildID.slice(10, 12); + if (Services.prefs.getBoolPref("general.useragent.appVersionIsBuildID")) { + versionField.textContent = `${year}.${month}.${day}`; + } else { + versionField.textContent = `v` + version + ` (${year}-${month}-${day})`; + } + + // Display warning if this is an "a#" (nightly or aurora) build if (/a\d+$/.test(version)) { - let buildID = Services.appinfo.appBuildID; - let year = buildID.slice(0, 4); - let month = buildID.slice(4, 6); - let day = buildID.slice(6, 8); - versionField.textContent += ` (${year}-${month}-${day})`; - document.getElementById("experimental").hidden = false; document.getElementById("communityDesc").hidden = true; } diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul index ef2804f31..5780e5ec1 100644 --- a/browser/base/content/aboutDialog.xul +++ b/browser/base/content/aboutDialog.xul @@ -45,7 +45,7 @@ <vbox id="leftBox" flex="1"/> <vbox id="rightBox" flex="1"> <hbox align="baseline"> -#expand <label id="version">__MOZ_APP_VERSION_DISPLAY__</label> +#expand <label id="version"></label> #ifndef NIGHTLY_BUILD <label id="releasenotes" class="text-link">&releaseNotes.link;</label> #endif @@ -120,20 +120,20 @@ <vbox id="experimental" hidden="true"> <description class="text-blurb" id="warningDesc"> &warningDesc.version; -#ifdef MOZ_TELEMETRY_ON_BY_DEFAULT - &warningDesc.telemetryDesc; -#endif - </description> - <description class="text-blurb" id="communityExperimentalDesc"> - &community.exp.start;<label class="text-link" href="http://www.mozilla.org/">&community.exp.mozillaLink;</label>&community.exp.middle;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.exp.creditsLink;</label>&community.exp.end; </description> </vbox> +#ifdef MC_PRIVATE_BUILD +<description class="text-blurb" id="communityDesc"> + This is a private build of Basilisk. If you did not manually build this copy from source yourself, then please download an official version from the <label class="text-link" href="http://www.basilisk-browser.org/">Basilisk website</label>. + </description> +#else <description class="text-blurb" id="communityDesc"> - &community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" useoriginprincipal="true" href="about:credits">&community.creditsLink;</label>&community.end3; + Basilisk is community software released by <label class="text-link" href="http://www.palemoon.org/">the Pale Moon team</label> and Mozilla developers. Learn <label class="text-link" useoriginprincipal="true" href="about:credits">who contributed</label> to this software. </description> <description class="text-blurb" id="contributeDesc"> - &helpus.start;<label class="text-link" href="https://sendto.mozilla.org/page/contribute/Give-Now?source=mozillaorg_default_footer&ref=firefox_about&utm_campaign=firefox_about&tm_source=firefox&tm_medium=referral&utm_content=20140929_FireFoxAbout">&helpus.donateLink;</label>&helpus.middle;<label class="text-link" href="http://www.mozilla.org/contribute/">&helpus.getInvolvedLink;</label>&helpus.end; + Want to help? Please consider <label class="text-link" href="https://www.palemoon.org/donations.shtml">donating</label> or get involved with our <label class="text-link" href="https://github.com/MoonchildProductions/UXP">development</label> of the Unified XUL Platform. </description> +#endif </vbox> </vbox> </hbox> @@ -141,7 +141,7 @@ <hbox pack="center"> <label class="text-link bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label> <label class="text-link bottom-link" useoriginprincipal="true" href="about:rights">&bottomLinks.rights;</label> - <label class="text-link bottom-link" href="https://www.mozilla.org/privacy/">&bottomLinks.privacy;</label> + <label class="text-link bottom-link" href="https://www.palemoon.org/privacy.shtml">&bottomLinks.privacy;</label> </hbox> <description id="trademark">&trademarkInfo.part1;</description> </vbox> diff --git a/browser/base/content/browser-media.js b/browser/base/content/browser-media.js index a013dbd8a..bd5c5b227 100644 --- a/browser/base/content/browser-media.js +++ b/browser/base/content/browser-media.js @@ -5,12 +5,16 @@ var gEMEHandler = { get uiEnabled() { +#ifdef MOZ_EME let emeUIEnabled = Services.prefs.getBoolPref("browser.eme.ui.enabled"); // Force-disable on WinXP: if (navigator.platform.toLowerCase().startsWith("win")) { emeUIEnabled = emeUIEnabled && parseFloat(Services.sysinfo.get("version")) >= 6; } return emeUIEnabled; +#else + return false; +#endif }, ensureEMEEnabled: function(browser, keySystem) { Services.prefs.setBoolPref("media.eme.enabled", true); @@ -41,11 +45,23 @@ var gEMEHandler = { } return true; }, - getLearnMoreLink: function(msgId) { - let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel"); + getEMEDisabledFragment: function(msgId) { + let mainMessage = gNavigatorBundle.getString("emeNotifications.drmContentDisabled.message"); + let [prefix, suffix] = mainMessage.split(/%(?:\$\d)?S/).map(s => document.createTextNode(s)); + let text = gNavigatorBundle.getString("emeNotifications.drmContentDisabled.learnMoreLabel"); let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL"); - return "<label class='text-link' href='" + baseURL + "drm-content'>" + - text + "</label>"; + let link = document.createElement("label"); + link.className = "text-link"; + link.setAttribute("href", baseURL + "drm-content"); + link.textContent = text; + + let fragment = document.createDocumentFragment(); + [prefix, link, suffix].forEach(n => fragment.appendChild(n)); + return fragment; + }, + getMessageWithBrandName: function(notificationId) { + let msgId = "emeNotifications." + notificationId + ".message"; + return gNavigatorBundle.getFormattedString(msgId, [this._brandShortName]); }, receiveMessage: function({target: browser, data: data}) { let parsedData; @@ -63,7 +79,8 @@ var gEMEHandler = { let notificationId; let buttonCallback; - let params = []; + // Notification message can be either a string or a DOM fragment. + let notificationMessage; switch (status) { case "available": case "cdm-created": @@ -78,17 +95,17 @@ var gEMEHandler = { case "cdm-disabled": notificationId = "drmContentDisabled"; buttonCallback = gEMEHandler.ensureEMEEnabled.bind(gEMEHandler, browser, keySystem) - params = [this.getLearnMoreLink(notificationId)]; + notificationMessage = this.getEMEDisabledFragment(); break; case "cdm-insufficient-version": notificationId = "drmContentCDMInsufficientVersion"; - params = [this._brandShortName]; + notificationMessage = this.getMessageWithBrandName(notificationId); break; case "cdm-not-installed": notificationId = "drmContentCDMInstalling"; - params = [this._brandShortName]; + notificationMessage = this.getMessageWithBrandName(notificationId); break; case "cdm-not-supported": @@ -100,44 +117,29 @@ var gEMEHandler = { return; } - this.showNotificationBar(browser, notificationId, keySystem, params, buttonCallback); - }, - showNotificationBar: function(browser, notificationId, keySystem, labelParams, callback) { + // Now actually create the notification + let box = gBrowser.getNotificationBox(browser); if (box.getNotificationWithValue(notificationId)) { return; } - let msgPrefix = "emeNotifications." + notificationId + "."; - let msgId = msgPrefix + "message"; - - let message = labelParams.length ? - gNavigatorBundle.getFormattedString(msgId, labelParams) : - gNavigatorBundle.getString(msgId); - let buttons = []; - if (callback) { + if (buttonCallback) { + let msgPrefix = "emeNotifications." + notificationId + "."; let btnLabelId = msgPrefix + "button.label"; let btnAccessKeyId = msgPrefix + "button.accesskey"; buttons.push({ label: gNavigatorBundle.getString(btnLabelId), accessKey: gNavigatorBundle.getString(btnAccessKeyId), - callback: callback + callback: buttonCallback }); } let iconURL = "chrome://browser/skin/drm-icon.svg#chains-black"; - // Do a little dance to get rich content into the notification: - let fragment = document.createDocumentFragment(); - let descriptionContainer = document.createElement("description"); - descriptionContainer.innerHTML = message; - while (descriptionContainer.childNodes.length) { - fragment.appendChild(descriptionContainer.childNodes[0]); - } - - box.appendNotification(fragment, notificationId, iconURL, box.PRIORITY_WARNING_MEDIUM, - buttons); + box.appendNotification(notificationMessage, notificationId, iconURL, + box.PRIORITY_WARNING_MEDIUM, buttons); }, showPopupNotificationForSuccess: function(browser, keySystem) { // We're playing EME content! Remove any "we can't play because..." messages. diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 3fc098755..41734711c 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -34,12 +34,6 @@ accesskey="&newPrivateWindow.accesskey;" command="Tools:PrivateBrowsing" key="key_privatebrowsing"/> -#ifdef E10S_TESTING_ONLY - <menuitem id="menu_newNonRemoteWindow" - label="&newNonRemoteWindow.label;" - hidden="true" - command="Tools:NonRemoteWindow"/> -#endif #ifdef MAC_NON_BROWSER_WINDOW <menuitem id="menu_openLocation" label="&openLocationCmd.label;" diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 14e90cde2..a447880be 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1555,6 +1555,10 @@ var BookmarkingUI = { // so kill current view and let popupshowing generate a new one. if (this.button._placesView) this.button._placesView.uninit(); + // ...and do the same for the menu bar. + let menubar = document.getElementById("bookmarksMenu"); + if (menubar && menubar._placesView) + menubar._placesView.uninit(); // We have to do the same thing for the "special" views underneath the // the bookmarks menu. diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc index a5a4ae8aa..0c753520f 100644 --- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -103,10 +103,6 @@ oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/> <command id="Tools:PrivateBrowsing" oncommand="OpenBrowserWindow({private: true});" reserved="true"/> -#ifdef E10S_TESTING_ONLY - <command id="Tools:NonRemoteWindow" - oncommand="OpenBrowserWindow({remote: false});"/> -#endif <command id="History:UndoCloseTab" oncommand="undoCloseTab();"/> <command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/> <command id="Social:SharePage" oncommand="SocialShare.sharePage();"/> diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 910dc4f68..d41e94ae6 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1217,9 +1217,6 @@ var gBrowserInit = { BrowserOffline.init(); IndexedDBPromptHelper.init(); - if (AppConstants.E10S_TESTING_ONLY) - gRemoteTabsUI.init(); - // Initialize the full zoom setting. // We do this before the session restore service gets initialized so we can // apply full zoom settings to tabs restored by the session restore service. @@ -1651,10 +1648,6 @@ if (AppConstants.platform == "macosx") { // initialize the sync UI gSyncUI.init(); - - if (AppConstants.E10S_TESTING_ONLY) { - gRemoteTabsUI.init(); - } }; gBrowserInit.nonBrowserWindowShutdown = function() { @@ -7835,16 +7828,6 @@ var TabContextMenu = { for (let menuItem of menuItems) menuItem.disabled = disabled; - if (AppConstants.E10S_TESTING_ONLY) { - menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-remote"); - for (let menuItem of menuItems) { - menuItem.hidden = !gMultiProcessBrowser; - if (menuItem.id == "context_openNonRemoteWindow") { - menuItem.disabled = !!parseInt(this.contextTab.getAttribute("usercontextid")); - } - } - } - disabled = gBrowser.visibleTabs.length == 1; menuItems = aPopupMenu.getElementsByAttribute("tbattr", "tabbrowser-multiple-visible"); for (let menuItem of menuItems) @@ -7913,7 +7896,7 @@ var TabContextMenu = { Object.defineProperty(this, "HUDService", { get: function HUDService_getter() { let devtools = Cu.import("resource://devtools/shared/Loader.jsm", {}).devtools; - return devtools.require("devtools/client/webconsole/hudservice"); + return devtools.require("devtools/client/webconsole/hudservice").HUDService; }, configurable: true, enumerable: true diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index be17fb0e2..ae531e167 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -98,12 +98,6 @@ accesskey="&moveToNewWindow.accesskey;" tbattr="tabbrowser-multiple" oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/> -#ifdef E10S_TESTING_ONLY - <menuitem id="context_openNonRemoteWindow" label="Open in new non-e10s window" - tbattr="tabbrowser-remote" - hidden="true" - oncommand="gBrowser.openNonRemoteWindow(TabContextMenu.contextTab);"/> -#endif <menuseparator id="context_sendTabToDevice_separator" hidden="true"/> <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;" accesskey="&sendTabToDevice.accesskey;" hidden="true"> diff --git a/browser/base/content/newtab/customize.js b/browser/base/content/newtab/customize.js index 28a52373c..39724fa91 100644 --- a/browser/base/content/newtab/customize.js +++ b/browser/base/content/newtab/customize.js @@ -25,7 +25,6 @@ var gCustomize = { this._nodes.button.addEventListener("click", e => this.showPanel(e)); this._nodes.blank.addEventListener("click", this); this._nodes.classic.addEventListener("click", this); - this._nodes.enhanced.addEventListener("click", this); this._nodes.learn.addEventListener("click", this); this.updateSelected(); @@ -87,11 +86,7 @@ var gCustomize = { sendAsyncMessage("NewTab:Customize", {enabled: false, enhanced: false}); break; case "newtab-customize-classic": - if (this._nodes.enhanced.getAttribute("selected")){ - sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: true}); - } else { - sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false}); - } + sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: false}); break; case "newtab-customize-enhanced": sendAsyncMessage("NewTab:Customize", {enabled: true, enhanced: !gAllPages.enhanced}); @@ -114,9 +109,9 @@ var gCustomize = { }, updateSelected: function() { - let {enabled, enhanced} = gAllPages; - let selected = enabled ? enhanced ? "enhanced" : "classic" : "blank"; - ["enhanced", "classic", "blank"].forEach(id => { + let {enabled} = gAllPages; + let selected = enabled ? "classic" : "blank"; + ["classic", "blank"].forEach(id => { let node = this._nodes[id]; if (id == selected) { node.setAttribute("selected", true); @@ -125,9 +120,5 @@ var gCustomize = { node.removeAttribute("selected"); } }); - if (selected == "enhanced") { - // If enhanced is selected, so is classic (since enhanced is a subitem of classic) - this._nodes.classic.setAttribute("selected", true); - } }, }; diff --git a/browser/base/content/newtab/newTab.xhtml b/browser/base/content/newtab/newTab.xhtml index 07fb0093e..eef51b4b2 100644 --- a/browser/base/content/newtab/newTab.xhtml +++ b/browser/base/content/newtab/newTab.xhtml @@ -33,15 +33,8 @@ <div id="newtab-customize-title" class="newtab-customize-panel-item"> <label>&newtab.customize.cog.title2;</label> </div> - - <div class="newtab-customize-complex-option"> - <div id="newtab-customize-classic" class="newtab-customize-panel-superitem newtab-customize-panel-item selectable"> - <label>&newtab.customize.classic;</label> - </div> - <div id="newtab-customize-enhanced" class="newtab-customize-panel-subitem"> - <label class="checkbox"></label> - <label>&newtab.customize.cog.enhanced;</label> - </div> + <div id="newtab-customize-classic" class="newtab-customize-panel-item selectable"> + <label>&newtab.customize.classic;</label> </div> <div id="newtab-customize-blank" class="newtab-customize-panel-item selectable"> <label>&newtab.customize.blank2;</label> diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 0cb0f3bd6..b27846835 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -3222,20 +3222,6 @@ </body> </method> - <!-- Opens a given tab to a non-remote window. --> - <method name="openNonRemoteWindow"> - <parameter name="aTab"/> - <body> - <![CDATA[ - if (!this.AppConstants.E10S_TESTING_ONLY) { - throw "This method is intended only for e10s testing!"; - } - let url = aTab.linkedBrowser.currentURI.spec; - return window.openDialog("chrome://browser/content/", "_blank", "chrome,all,dialog=no,non-remote", url); - ]]> - </body> - </method> - <method name="moveTabTo"> <parameter name="aTab"/> <parameter name="aIndex"/> @@ -4581,8 +4567,7 @@ label = this.mStringBundle.getString(stringID); } } else { - label = tab.getAttribute("label") + - (this.AppConstants.E10S_TESTING_ONLY && tab.linkedBrowser && tab.linkedBrowser.isRemoteBrowser ? " - e10s" : ""); + label = tab.getAttribute("label"); } event.target.setAttribute("label", label); ]]></body> |