diff options
Diffstat (limited to 'toolkit/content')
-rw-r--r-- | toolkit/content/about.js | 23 | ||||
-rw-r--r-- | toolkit/content/about.xhtml | 3 | ||||
-rw-r--r-- | toolkit/content/aboutSupport.js | 119 | ||||
-rw-r--r-- | toolkit/content/aboutSupport.xhtml | 67 | ||||
-rw-r--r-- | toolkit/content/browser-child.js | 26 | ||||
-rw-r--r-- | toolkit/content/jar.mn | 9 | ||||
-rw-r--r-- | toolkit/content/license.html | 7 | ||||
-rw-r--r-- | toolkit/content/logopage.xhtml | 36 | ||||
-rw-r--r-- | toolkit/content/memoriam.xhtml | 76 | ||||
-rw-r--r-- | toolkit/content/mozilla.css | 36 | ||||
-rw-r--r-- | toolkit/content/mozilla.xhtml | 35 | ||||
-rw-r--r-- | toolkit/content/plugins.html | 5 | ||||
-rw-r--r-- | toolkit/content/widgets/findbar.xml | 58 | ||||
-rw-r--r-- | toolkit/content/widgets/menulist.xml | 18 |
14 files changed, 264 insertions, 254 deletions
diff --git a/toolkit/content/about.js b/toolkit/content/about.js index ae467d07a..c27916c10 100644 --- a/toolkit/content/about.js +++ b/toolkit/content/about.js @@ -5,14 +5,24 @@ // get release notes and vendor URL from prefs var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"] .getService(Components.interfaces.nsIURLFormatter); -var releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL"); +var releaseNotesURL; +try { + releaseNotesURL = formatter.formatURLPref("app.releaseNotesURL"); +} catch(e) { + releaseNotesURL = "about:blank"; +} if (releaseNotesURL != "about:blank") { var relnotes = document.getElementById("releaseNotesURL"); relnotes.setAttribute("href", releaseNotesURL); relnotes.parentNode.removeAttribute("hidden"); } -var vendorURL = formatter.formatURLPref("app.vendorURL"); +var vendorURL; +try { + vendorURL = formatter.formatURLPref("app.vendorURL"); +} catch(e) { + vendorURL = "about:blank"; +} if (vendorURL != "about:blank") { var vendor = document.getElementById("vendorURL"); vendor.setAttribute("href", vendorURL); @@ -25,8 +35,15 @@ var versionNum = Components.classes["@mozilla.org/xre/app-info;1"] var version = document.getElementById("version"); version.textContent += " " + versionNum; +// insert the buildid of the XUL application +var BuildIDVal = Components.classes["@mozilla.org/xre/app-info;1"] + .getService(Components.interfaces.nsIXULAppInfo) + .appBuildID; +var buildID = document.getElementById("buildID"); +buildID.textContent += " " + BuildIDVal.slice(0,-6); + // append user agent var ua = navigator.userAgent; if (ua) { - document.getElementById("buildID").textContent += " " + ua; + document.getElementById("userAgent").textContent += " " + ua; } diff --git a/toolkit/content/about.xhtml b/toolkit/content/about.xhtml index d5245928f..1f57ddcc3 100644 --- a/toolkit/content/about.xhtml +++ b/toolkit/content/about.xhtml @@ -24,7 +24,6 @@ <div id="aboutLogoContainer"> <a id="vendorURL"> <img src="about:logo" alt="&brandShortName;"/> - <p id="version">&about.version;</p> </a> </div> @@ -33,7 +32,9 @@ <li>&about.license.beforeTheLink;<a href="about:license">&about.license.linkTitle;</a>&about.license.afterTheLink;</li> <li hidden="true">&about.relnotes.beforeTheLink;<a id="releaseNotesURL">&about.relnotes.linkTitle;</a>&about.relnotes.afterTheLink;</li> <li>&about.buildconfig.beforeTheLink;<a href="about:buildconfig">&about.buildconfig.linkTitle;</a>&about.buildconfig.afterTheLink;</li> + <li id="version">&about.version;</li> <li id="buildID">&about.buildIdentifier;</li> + <li id="userAgent">&about.userAgent;</li> <script type="application/javascript" src="chrome://global/content/about.js"/> </ul> diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 5daf6d189..e9087dfcb 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -75,69 +75,7 @@ var snapshotFormatters = { }, crashes: function crashes(data) { - if (!AppConstants.MOZ_CRASHREPORTER) - return; - - let strings = stringBundle(); - let daysRange = Troubleshoot.kMaxCrashAge / (24 * 60 * 60 * 1000); - $("crashes-title").textContent = - PluralForm.get(daysRange, strings.GetStringFromName("crashesTitle")) - .replace("#1", daysRange); - let reportURL; - try { - reportURL = Services.prefs.getCharPref("breakpad.reportURL"); - // Ignore any non http/https urls - if (!/^https?:/i.test(reportURL)) - reportURL = null; - } - catch (e) { } - if (!reportURL) { - $("crashes-noConfig").style.display = "block"; - $("crashes-noConfig").classList.remove("no-copy"); - return; - } - $("crashes-allReports").style.display = "block"; - $("crashes-allReports").classList.remove("no-copy"); - - if (data.pending > 0) { - $("crashes-allReportsWithPending").textContent = - PluralForm.get(data.pending, strings.GetStringFromName("pendingReports")) - .replace("#1", data.pending); - } - - let dateNow = new Date(); - $.append($("crashes-tbody"), data.submitted.map(function (crash) { - let date = new Date(crash.date); - let timePassed = dateNow - date; - let formattedDate; - if (timePassed >= 24 * 60 * 60 * 1000) - { - let daysPassed = Math.round(timePassed / (24 * 60 * 60 * 1000)); - let daysPassedString = strings.GetStringFromName("crashesTimeDays"); - formattedDate = PluralForm.get(daysPassed, daysPassedString) - .replace("#1", daysPassed); - } - else if (timePassed >= 60 * 60 * 1000) - { - let hoursPassed = Math.round(timePassed / (60 * 60 * 1000)); - let hoursPassedString = strings.GetStringFromName("crashesTimeHours"); - formattedDate = PluralForm.get(hoursPassed, hoursPassedString) - .replace("#1", hoursPassed); - } - else - { - let minutesPassed = Math.max(Math.round(timePassed / (60 * 1000)), 1); - let minutesPassedString = strings.GetStringFromName("crashesTimeMinutes"); - formattedDate = PluralForm.get(minutesPassed, minutesPassedString) - .replace("#1", minutesPassed); - } - return $.new("tr", [ - $.new("td", [ - $.new("a", crash.id, null, {href : reportURL + crash.id}) - ]), - $.new("td", formattedDate) - ]); - })); + return; }, extensions: function extensions(data) { @@ -151,22 +89,6 @@ var snapshotFormatters = { })); }, - experiments: function experiments(data) { - $.append($("experiments-tbody"), data.map(function (experiment) { - return $.new("tr", [ - $.new("td", experiment.name), - $.new("td", experiment.id), - $.new("td", experiment.description), - $.new("td", experiment.active), - $.new("td", experiment.endDate), - $.new("td", [ - $.new("a", experiment.detailURL, null, {href : experiment.detailURL, }) - ]), - $.new("td", experiment.branch), - ]); - })); - }, - modifiedPreferences: function modifiedPreferences(data) { $.append($("prefs-tbody"), sortedArrayFromObject(data).map( function ([name, value]) { @@ -793,7 +715,8 @@ Serializer.prototype = { let hasText = false; for (let child of elem.childNodes) { if (child.nodeType == Node.TEXT_NODE) { - let text = this._nodeText(child); + let text = this._nodeText( + child, (child.classList && child.classList.contains("endline"))); this._appendText(text); hasText = hasText || !!text.trim(); } @@ -820,7 +743,7 @@ Serializer.prototype = { } }, - _startNewLine: function (lines) { + _startNewLine: function () { let currLine = this._currentLine; if (currLine) { // The current line is not empty. Trim it. @@ -832,7 +755,7 @@ Serializer.prototype = { this._lines.push(""); }, - _appendText: function (text, lines) { + _appendText: function (text) { this._currentLine += text; }, @@ -855,7 +778,8 @@ Serializer.prototype = { let col = tableHeadingCols[i]; if (col.localName != "th" || col.classList.contains("title-column")) break; - colHeadings[i] = this._nodeText(col).trim(); + colHeadings[i] = this._nodeText( + col, (col.classList && col.classList.contains("endline"))).trim(); } } let hasColHeadings = Object.keys(colHeadings).length > 0; @@ -882,7 +806,10 @@ Serializer.prototype = { let text = ""; if (colHeadings[j]) text += colHeadings[j] + ": "; - text += this._nodeText(children[j]).trim(); + text += this._nodeText( + children[j], + (children[j].classList && + children[j].classList.contains("endline"))).trim(); this._appendText(text); this._startNewLine(); } @@ -898,7 +825,10 @@ Serializer.prototype = { if (this._ignoreElement(trs[i])) continue; let children = trs[i].querySelectorAll("th,td"); - let rowHeading = this._nodeText(children[0]).trim(); + let rowHeading = this._nodeText( + children[0], + (children[0].classList && + children[0].classList.contains("endline"))).trim(); if (children[0].classList.contains("title-column")) { if (!this._isHiddenSubHeading(children[0])) this._appendText(rowHeading); @@ -912,7 +842,10 @@ Serializer.prototype = { // queued up from querySelectorAll earlier. this._appendText(rowHeading + ": "); } else { - this._appendText(rowHeading + ": " + this._nodeText(children[1]).trim()); + this._appendText(rowHeading + ": " + this._nodeText( + children[1], + (children[1].classList && + children[1].classList.contains("endline"))).trim()); } } this._startNewLine(); @@ -924,8 +857,16 @@ Serializer.prototype = { return elem.classList.contains("no-copy"); }, - _nodeText: function (node) { - return node.textContent.replace(/\s+/g, " "); + _nodeText: function (node, endline) { + let whiteChars = /\s+/g + let whiteCharsButNoEndline = /(?!\n)[\s]+/g; + let _node = node.cloneNode(true); + if (_node.firstElementChild && + (_node.firstElementChild.nodeName.toLowerCase() == "button")) { + _node.removeChild(_node.firstElementChild); + } + return _node.textContent.replace( + endline ? whiteCharsButNoEndline : whiteChars, " "); }, }; @@ -997,7 +938,7 @@ function setupEventListeners() { PlacesDBUtils.checkAndFixDatabase(function(aLog) { let msg = aLog.join("\n"); $("verify-place-result").style.display = "block"; - $("verify-place-result").classList.remove("no-copy"); + $("verify-place-result-parent").classList.remove("no-copy"); $("verify-place-result").textContent = msg; }); }); diff --git a/toolkit/content/aboutSupport.xhtml b/toolkit/content/aboutSupport.xhtml index e2885c8b8..9574365a3 100644 --- a/toolkit/content/aboutSupport.xhtml +++ b/toolkit/content/aboutSupport.xhtml @@ -253,34 +253,6 @@ </table> <!-- - - - - - - - - - - - - - - - - - - - - --> -#ifdef MOZ_CRASHREPORTER - - <h2 class="major-section" id="crashes-title"> - &aboutSupport.crashes.title; - </h2> - - <table id="crashes-table"> - <thead> - <tr> - <th> - &aboutSupport.crashes.id; - </th> - <th> - &aboutSupport.crashes.sendDate; - </th> - </tr> - </thead> - <tbody id="crashes-tbody"> - </tbody> - </table> - <p id="crashes-allReports" class="hidden no-copy"> - <a href="about:crashes" id="crashes-allReportsWithPending" class="block">&aboutSupport.crashes.allReports;</a> - </p> - <p id="crashes-noConfig" class="hidden no-copy">&aboutSupport.crashes.noConfig;</p> - -#endif - <!-- - - - - - - - - - - - - - - - - - - - - --> - <h2 class="major-section"> &aboutSupport.extensionsTitle; </h2> @@ -435,16 +407,16 @@ </h2> <table> - <tr class="no-copy"> + <tr id="verify-place-result-parent" class="no-copy"> <th class="column"> &aboutSupport.placeDatabaseIntegrity; </th> - <td> + <td class="endline"> <button id="verify-place-integrity-button"> &aboutSupport.placeDatabaseVerifyIntegrity; </button> - <pre id="verify-place-result" class="hidden no-copy"></pre> + <pre id="verify-place-result" class="hidden"></pre> </td> </tr> </table> @@ -504,39 +476,6 @@ </table> - <h2 class="major-section"> - &aboutSupport.experimentsTitle; - </h2> - - <table> - <thead> - <tr> - <th> - &aboutSupport.experimentName; - </th> - <th> - &aboutSupport.experimentId; - </th> - <th> - &aboutSupport.experimentDescription; - </th> - <th> - &aboutSupport.experimentActive; - </th> - <th> - &aboutSupport.experimentEndDate; - </th> - <th> - &aboutSupport.experimentHomepage; - </th> - <th> - &aboutSupport.experimentBranch; - </th> - </tr> - </thead> - <tbody id="experiments-tbody"> - </tbody> - </table> <!-- - - - - - - - - - - - - - - - - - - - - --> #if defined(MOZ_SANDBOX) diff --git a/toolkit/content/browser-child.js b/toolkit/content/browser-child.js index c819e3db6..7d0fe18c5 100644 --- a/toolkit/content/browser-child.js +++ b/toolkit/content/browser-child.js @@ -17,12 +17,6 @@ Cu.import("resource://gre/modules/Timer.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PageThumbUtils", "resource://gre/modules/PageThumbUtils.jsm"); -if (AppConstants.MOZ_CRASHREPORTER) { - XPCOMUtils.defineLazyServiceGetter(this, "CrashReporter", - "@mozilla.org/xre/app-info;1", - "nsICrashReporter"); -} - function makeInputStream(aString) { let stream = Cc["@mozilla.org/io/string-input-stream;1"]. createInstance(Ci.nsISupportsCString); @@ -174,15 +168,6 @@ var WebProgressListener = { json.principal = content.document.nodePrincipal; json.synthetic = content.document.mozSyntheticDocument; json.inLoadURI = WebNavigation.inLoadURI; - - if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) { - let uri = aLocationURI.clone(); - try { - // If the current URI contains a username/password, remove it. - uri.userPass = ""; - } catch (ex) { /* Ignore failures on about: URIs. */ } - CrashReporter.annotateCrashReport("URL", uri.spec); - } } this._send("Content:LocationChange", json, objects); @@ -310,17 +295,6 @@ var WebNavigation = { }, loadURI: function(uri, flags, referrer, referrerPolicy, postData, headers, baseURI) { - if (AppConstants.MOZ_CRASHREPORTER && CrashReporter.enabled) { - let annotation = uri; - try { - let url = Services.io.newURI(uri, null, null); - // If the current URI contains a username/password, remove it. - url.userPass = ""; - annotation = url.spec; - } catch (ex) { /* Ignore failures to parse and failures - on about: URIs. */ } - CrashReporter.annotateCrashReport("URL", annotation); - } if (referrer) referrer = Services.io.newURI(referrer, null, null); if (postData) diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 0a0f0253b..851c72250 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -12,7 +12,7 @@ toolkit.jar: content/global/about.xhtml content/global/aboutAbout.js content/global/aboutAbout.xhtml -#ifdef MOZILLA_OFFICIAL +#ifdef MC_OFFICIAL content/global/aboutRights.xhtml #else content/global/aboutRights.xhtml (aboutRights-unbranded.xhtml) @@ -28,7 +28,7 @@ toolkit.jar: content/global/aboutwebrtc/aboutWebrtc.css (aboutwebrtc/aboutWebrtc.css) content/global/aboutwebrtc/aboutWebrtc.js (aboutwebrtc/aboutWebrtc.js) content/global/aboutwebrtc/aboutWebrtc.html (aboutwebrtc/aboutWebrtc.html) - content/global/aboutSupport.js +* content/global/aboutSupport.js * content/global/aboutSupport.xhtml content/global/aboutTelemetry.js content/global/aboutTelemetry.xhtml @@ -54,7 +54,12 @@ toolkit.jar: #endif content/global/filepicker.properties content/global/globalOverlay.js + content/global/memoriam.xhtml +* content/global/mozilla.css content/global/mozilla.xhtml +#ifdef MOZ_PHOENIX + content/global/logopage.xhtml +#endif content/global/process-content.js content/global/resetProfile.css content/global/resetProfile.js diff --git a/toolkit/content/license.html b/toolkit/content/license.html index 99ee42fde..45889a191 100644 --- a/toolkit/content/license.html +++ b/toolkit/content/license.html @@ -87,7 +87,7 @@ <li><a href="about:license#dtoa">dtoa License</a></li> <li><a href="about:license#hunspell-nl">Dutch Spellchecking Dictionary License</a></li> #if defined(XP_WIN) || defined(XP_LINUX) - <li><a href="about:license#emojione">EmojiOne License</a></li> + <li><a href="about:license#twemoji">Twemoji License</a></li> #endif <li><a href="about:license#hunspell-ee">Estonian Spellchecking Dictionary License</a></li> <li><a href="about:license#expat">Expat License</a></li> @@ -2911,14 +2911,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <hr> #if defined(XP_WIN) || defined(XP_LINUX) - <h1><a id="emojione"></a>EmojiOne License</h1> + <h1><a id="twemoji"></a>Twemoji License</h1> <p>This license applies to the emoji art contained within the bundled emoji font file.</p> <pre> -Copyright (c) 2016 Ranks.com Inc. -Copyright (c) 2014 Twitter, Inc and other contributors. +Copyright (c) 2018 Twitter, Inc and other contributors. Creative Commons Attribution 4.0 International (CC BY 4.0) diff --git a/toolkit/content/logopage.xhtml b/toolkit/content/logopage.xhtml new file mode 100644 index 000000000..bcf1da0f0 --- /dev/null +++ b/toolkit/content/logopage.xhtml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [ +]> + +<!-- 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/. --> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title></title> + <style type="text/css"> + body { + background: Menu; + color: MenuText; + } + + img { + text-align: center; + position: absolute; + margin: auto; + top: 0; + right: 0; + bottom: 0; + left: 0; + opacity: 0.2; + } + </style> +</head> + +<body> + <img src="about:logo" alt=""/> +</body> +</html> diff --git a/toolkit/content/memoriam.xhtml b/toolkit/content/memoriam.xhtml new file mode 100644 index 000000000..f1a1b474d --- /dev/null +++ b/toolkit/content/memoriam.xhtml @@ -0,0 +1,76 @@ +<!DOCTYPE html +[ + <!ENTITY % directionDTD SYSTEM "chrome://global/locale/global.dtd" > + %directionDTD; + <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd"> + %brandDTD; +]> + +<!-- 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/. --> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta charset='utf-8' /> + <title>Mozilla: In Memoriam</title> + +<style> +html { + background: maroon radial-gradient( circle, #a01010 0%, #800000 80%) center center / cover no-repeat; + color: white; + font-style: italic; + text-rendering: optimizeLegibility; + min-height: 100%; +} + +#moztext { + margin-top: 15%; + font-size: 1.1em; + font-family: serif; + text-align: center; + line-height: 1.5; +} + +#from { + font-size: 1.0em; + font-family: serif; + text-align: right; +} + +em { + font-size: 1.3em; + line-height: 0; +} + +a { + text-decoration: none; + color: white; +} +</style> +</head> + +<body dir="&locale.dir;"> + +<section> + <p id="moztext"> + <h1>Mozilla: In Memoriam</h1> + <br/> + Dedicated to the tireless developers who have come and gone.<br/> + To those who have put their heart and soul into Mozilla products.<br/> + To those who have seen their good intentions and hard work squandered.<br/> + To those who really cared about the user, and cared about usability.<br/> + To those who truly understood us and desired freedom, but were unheard.<br/> + To those who knew that change is inevitable, but loss of vision is not.<br/> + To those who were forced to give up the good fight.<br/> + <br/> + <em>Thank you.</em> &brandFullName; would not have been possible without you.<br/> + <br/> + </p> + + <p id="from"> + </p> +</section> + +</body> +</html>
\ No newline at end of file diff --git a/toolkit/content/mozilla.css b/toolkit/content/mozilla.css new file mode 100644 index 000000000..d5eae6415 --- /dev/null +++ b/toolkit/content/mozilla.css @@ -0,0 +1,36 @@ +html { +%ifdef MC_PALEMOON + background: #333399 radial-gradient( circle at 75% 25%, #6666b0 0%, #333399 40%, #111177 80%) center center / cover no-repeat; +%else + background: maroon radial-gradient( circle, #a01010 0%, #800000 80%) center center / cover no-repeat; +%endif + + color: white; + font-style: italic; + text-rendering: optimizeLegibility; + min-height: 100%; +} + +#moztext { + margin-top: 15%; + font-size: 1.1em; + font-family: serif; + text-align: center; + line-height: 1.5; +} + +#from { + font-size: 1.95em; + font-family: serif; + text-align: right; +} + +em { + font-size: 1.3em; + line-height: 0; +} + +a { + text-decoration: none; + color: white; +}
\ No newline at end of file diff --git a/toolkit/content/mozilla.xhtml b/toolkit/content/mozilla.xhtml index 2acfc9f5d..8c79b5ff9 100644 --- a/toolkit/content/mozilla.xhtml +++ b/toolkit/content/mozilla.xhtml @@ -15,39 +15,8 @@ <meta charset='utf-8' /> <title>&chronicles.title.55.2;</title> -<style> -html { - background: maroon radial-gradient( circle, #a01010 0%, #800000 80%) center center / cover no-repeat; - color: white; - font-style: italic; - text-rendering: optimizeLegibility; - min-height: 100%; -} - -#moztext { - margin-top: 15%; - font-size: 1.1em; - font-family: serif; - text-align: center; - line-height: 1.5; -} - -#from { - font-size: 1.95em; - font-family: serif; - text-align: right; -} - -em { - font-size: 1.3em; - line-height: 0; -} - -a { - text-decoration: none; - color: white; -} -</style> + <link rel="stylesheet" href="chrome://global/content/mozilla.css" + type="text/css"/> </head> <body dir="&locale.dir;"> diff --git a/toolkit/content/plugins.html b/toolkit/content/plugins.html index 84cbba596..d389f52dd 100644 --- a/toolkit/content/plugins.html +++ b/toolkit/content/plugins.html @@ -10,6 +10,7 @@ "use strict"; Components.utils.import("resource://gre/modules/Services.jsm"); + Components.utils.import("resource://gre/modules/AddonManager.jsm"); var Ci = Components.interfaces; var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Ci.nsIStringBundleService); @@ -57,7 +58,7 @@ */ navigator.plugins.refresh(false); - addMessageListener("PluginList", function({ data: aPlugins }) { + AddonManager.getAddonsByTypes(["plugin"], function (aPlugins) { var fragment = document.createDocumentFragment(); // "Installed plugins" @@ -209,8 +210,6 @@ document.getElementById("outside").appendChild(fragment); }); - - sendAsyncMessage("RequestPlugins"); </script> </div> </body> diff --git a/toolkit/content/widgets/findbar.xml b/toolkit/content/widgets/findbar.xml index f90d41227..b92fb1d05 100644 --- a/toolkit/content/widgets/findbar.xml +++ b/toolkit/content/widgets/findbar.xml @@ -162,21 +162,29 @@ <content hidden="true"> <xul:hbox anonid="findbar-container" class="findbar-container" flex="1" align="center"> <xul:hbox anonid="findbar-textbox-wrapper" align="stretch"> + <xul:toolbarbutton anonid="find-closebutton" + class="findbar-closebutton close-icon" + tooltiptext="&findCloseButton.tooltip;" + oncommand="close();"/> <xul:textbox anonid="findbar-textbox" class="findbar-textbox findbar-find-fast" xbl:inherits="flash"/> - <xul:toolbarbutton anonid="find-previous" - class="findbar-find-previous tabbable" - tooltiptext="&previous.tooltip;" - oncommand="onFindAgainCommand(true);" - disabled="true" - xbl:inherits="accesskey=findpreviousaccesskey"/> - <xul:toolbarbutton anonid="find-next" + <xul:toolbarbutton anonid="find-next" class="findbar-find-next tabbable" + label="&next.label;" + accesskey="&next.accesskey;" tooltiptext="&next.tooltip;" oncommand="onFindAgainCommand(false);" disabled="true" xbl:inherits="accesskey=findnextaccesskey"/> + <xul:toolbarbutton anonid="find-previous" + class="findbar-find-previous tabbable" + label="&previous.label;" + accesskey="&previous.accesskey;" + tooltiptext="&previous.tooltip;" + oncommand="onFindAgainCommand(true);" + disabled="true" + xbl:inherits="accesskey=findpreviousaccesskey"/> </xul:hbox> <xul:toolbarbutton anonid="highlight" class="findbar-highlight findbar-button tabbable" @@ -186,22 +194,22 @@ oncommand="toggleHighlight(this.checked);" type="checkbox" xbl:inherits="accesskey=highlightaccesskey"/> - <xul:toolbarbutton anonid="find-case-sensitive" - class="findbar-case-sensitive findbar-button tabbable" - label="&caseSensitive.label;" - accesskey="&caseSensitive.accesskey;" - tooltiptext="&caseSensitive.tooltiptext;" - oncommand="_setCaseSensitivity(this.checked ? 1 : 0);" - type="checkbox" - xbl:inherits="accesskey=matchcaseaccesskey"/> - <xul:toolbarbutton anonid="find-entire-word" - class="findbar-entire-word findbar-button tabbable" - label="&entireWord.label;" - accesskey="&entireWord.accesskey;" - tooltiptext="&entireWord.tooltiptext;" - oncommand="toggleEntireWord(this.checked);" - type="checkbox" - xbl:inherits="accesskey=entirewordaccesskey"/> + <xul:checkbox anonid="find-case-sensitive" + class="findbar-case-sensitive findbar-button tabbable" + label="&caseSensitive.label;" + accesskey="&caseSensitive.accesskey;" + tooltiptext="&caseSensitive.tooltiptext;" + oncommand="_setCaseSensitivity(this.checked ? 1 : 0);" + type="checkbox" + xbl:inherits="accesskey=matchcaseaccesskey"/> + <xul:checkbox anonid="find-entire-word" + class="findbar-entire-word findbar-button tabbable" + label="&entireWord.label;" + accesskey="&entireWord.accesskey;" + tooltiptext="&entireWord.tooltiptext;" + oncommand="toggleEntireWord(this.checked);" + type="checkbox" + xbl:inherits="accesskey=entirewordaccesskey"/> <xul:label anonid="match-case-status" class="findbar-find-fast"/> <xul:label anonid="entire-word-status" class="findbar-find-fast"/> <xul:label anonid="found-matches" class="findbar-find-fast found-matches" hidden="true"/> @@ -212,10 +220,6 @@ <!-- Do not use value, first child is used because it provides a11y with text change events --> </xul:description> </xul:hbox> - <xul:toolbarbutton anonid="find-closebutton" - class="findbar-closebutton close-icon" - tooltiptext="&findCloseButton.tooltip;" - oncommand="close();"/> </content> <implementation implements="nsIMessageListener, nsIEditActionListener"> diff --git a/toolkit/content/widgets/menulist.xml b/toolkit/content/widgets/menulist.xml index ccdf3bd26..96c011809 100644 --- a/toolkit/content/widgets/menulist.xml +++ b/toolkit/content/widgets/menulist.xml @@ -129,8 +129,22 @@ <property name="label" readonly="true" onget="return this.getAttribute('label');"/> <property name="description" onset="this.setAttribute('description',val); return val;" onget="return this.getAttribute('description');"/> - <property name="editable" onset="this.setAttribute('editable',val); return val;" - onget="return this.getAttribute('editable') == 'true';"/> + + <property name="editable" onget="return this.getAttribute('editable') == 'true';"> + <setter> + <![CDATA[ + if (!val && this.editable) { + // If we were focused and transition from editable to not editable, + // focus the parent menulist so that the focus does not get stuck. + if (this.inputField == document.activeElement) + window.setTimeout(() => this.focus(), 0); + } + + this.setAttribute("editable", val); + return val; + ]]> + </setter> + </property> <property name="open" onset="this.menuBoxObject.openMenu(val); return val;" |