Browse Source

comm update mirroring bugzilla

Frank-Rainer Grahl 4 months ago
parent
commit
348ad92813

+ 63 - 0
comm-release/patches/1070492-composer-findbar-v3-25319.patch

@@ -0,0 +1,63 @@
+# HG changeset patch
+# User Nuno Silva <nunojsg@gmail.com>
+# Date 1717178614 -7200
+# Parent  74c11e1aadedfe7e85424c29b6e98dd8417a9af9
+Bug 1070492- Show findbar in Composer source view. r=IanN a=IanN
+
+ - Move the findbar so that it is on top of ContentWindowDeck (and can
+   thus be shown for both editors)
+
+ - When changing between views, attach the findbar to the editor used
+   in the current view mode.
+
+diff --git a/suite/editor/base/content/editor.js b/suite/editor/base/content/editor.js
+--- a/suite/editor/base/content/editor.js
++++ b/suite/editor/base/content/editor.js
+@@ -1804,16 +1804,23 @@ function SetEditMode(mode)
+     case kDisplayModeSource:
+       inlineSpellCheckItem.setAttribute("disabled", true);
+       goSetCommandEnabled("cmd_pasteQuote", false);
+       break;
+     default:
+       inlineSpellCheckItem.setAttribute('disabled', !InlineSpellCheckerUI.canSpellCheck);
+       break;
+   }
++  if ((mode == kDisplayModeSource) || (previousMode == kDisplayModeSource)) {
++    // switch findbar editor
++    let findbar = document.getElementById("FindToolbar");
++    let editorBrowserId = (mode == kDisplayModeSource) ?
++      "content-source" : "content-frame";
++    findbar.browser = document.getElementById(editorBrowserId);
++  }
+ }
+ 
+ function CancelHTMLSource()
+ {
+   // Don't convert source text back into the DOM document
+   gSourceTextEditor.resetModificationCount();
+   SetDisplayMode(gPreviousNonSourceDisplayMode);
+ }
+diff --git a/suite/editor/base/content/editor.xul b/suite/editor/base/content/editor.xul
+--- a/suite/editor/base/content/editor.xul
++++ b/suite/editor/base/content/editor.xul
+@@ -336,19 +336,19 @@
+ 
+ <!-- sidebar/toolbar/content/status -->
+ <hbox id="sidebar-parent" flex="1">
+   <!-- From sidebarOverlay.xul -->
+   <vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
+   <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
+ 
+   <vbox id="appcontent" flex="1">
++    <findbar id="FindToolbar" browserid="content-frame"/>
+     <deck id="ContentWindowDeck" selectedIndex="0" flex="1">
+       <vbox>
+-        <findbar id="FindToolbar" browserid="content-frame"/>
+         <editor editortype="html"
+                 type="content"
+                 primary="true"
+                 id="content-frame"
+                 onclick="EditorClick(event);"
+                 ondblclick="EditorDblClick(event);"
+                 context="contentAreaContextMenu"
+                 flex="1"

+ 161 - 0
comm-release/patches/1437393-fontsasync-format-25319.patch

@@ -0,0 +1,161 @@
+# HG changeset patch
+# User Frank-Rainer Grahl <frgrahl@gmx.net>
+# Date 1717784005 -7200
+# Parent  5b694f62d1fbdab4f6a442b7da0885e1837ed628
+Bug 1437393 - Add missing brackets around one liners. r=IanN a= IanN
+
+Also make sure statements are confined to 80 columns. Only the prefs are not.
+
+diff --git a/suite/components/pref/content/pref-fonts.js b/suite/components/pref/content/pref-fonts.js
+--- a/suite/components/pref/content/pref-fonts.js
++++ b/suite/components/pref/content/pref-fonts.js
+@@ -1,43 +1,45 @@
+-/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ /* 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/. */
++ * 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/. */
+ 
+ var gFontsDialog = {
+   _disabled: false,
+   _enumerator: null,
+   get enumerator() {
+     if (!this._enumerator) {
+       this._enumerator = Cc["@mozilla.org/gfx/fontenumerator;1"]
+                            .createInstance(Ci.nsIFontEnumerator);
+     }
+     return this._enumerator;
+   },
+ 
+   _allFonts: null,
+   async buildFontList(aLanguage, aFontType, aMenuList) {
+     // Reset the list
+-    while (aMenuList.hasChildNodes())
++    while (aMenuList.hasChildNodes()) {
+       aMenuList.firstChild.remove();
++    }
+ 
+     let defaultFont = null;
+     // Load Font Lists
+-    let fonts = await this.enumerator.EnumerateFontsAsync(aLanguage, aFontType);
++    let fonts = await this.enumerator.EnumerateFontsAsync(aLanguage,
++                                                          aFontType);
+     if (fonts.length > 0) {
+       defaultFont = this.enumerator.getDefaultFont(aLanguage, aFontType);
+     } else {
+       fonts = await this.enumerator.EnumerateFontsAsync(aLanguage, "");
+       if (fonts.length > 0)
+         defaultFont = this.enumerator.getDefaultFont(aLanguage, "");
+     }
+ 
+-    if (!this._allFonts)
++    if (!this._allFonts) {
+       this._allFonts = await this.enumerator.EnumerateAllFontsAsync({});
++    }
+ 
+     // Build the UI for the Default Font and Fonts for this CSS type.
+     const popup = document.createElement("menupopup");
+     let separator;
+     let menuitem;
+     if (fonts.length > 0) {
+       const bundlePrefs = document.getElementById("bundle_prefutilities");
+       let defaultLabel = defaultFont ?
+@@ -89,29 +91,29 @@ var gFontsDialog = {
+     // - there is no setting
+     // - the font selected by the user is no longer present (e.g. deleted from
+     //   fonts folder)
+     const preference = document.getElementById(aElement.getAttribute("preference"));
+     if (preference.value) {
+       let fontItems = aElement.getElementsByAttribute("value", preference.value);
+ 
+       // There is a setting that actually is in the list. Respect it.
+-      if (fontItems.length)
++      if (fontItems.length) {
+         return undefined;
++      }
+     }
+ 
+     // Otherwise, use "default" font of current system which is computed
+     // with "font.name-list.*".  If "font.name.*" is empty string, it means
+     // "default".  So, return empty string in this case.
+     return "";
+   },
+ 
+   _selectLanguageGroupPromise: Promise.resolve(),
+ 
+-
+   _selectLanguageGroup(aLanguageGroup) {
+     this._selectLanguageGroupPromise = (async () => {
+       // Avoid overlapping language group selections by awaiting the resolution
+       // of the previous one. We do this because this function is re-entrant,
+       // as inserting <preference> elements into the DOM sometimes triggers a
+       // call back into this function. And since this function is also
+       // asynchronous, that call can enter this function before the previous
+       // run has completed, which would corrupt the font menulists. Awaiting
+@@ -139,55 +141,60 @@ var gFontsDialog = {
+         if (!preference) {
+           preference = document.createElement("preference");
+           preference.id = name;
+           preference.setAttribute("name", name);
+           preference.setAttribute("type", prefs[i].type);
+           preferences.appendChild(preference);
+         }
+ 
+-        if (!prefs[i].element)
++        if (!prefs[i].element) {
+           continue;
++        }
+ 
+         var element = document.getElementById(prefs[i].element);
+         if (element) {
+           element.setAttribute("preference", preference.id);
+ 
+           if (prefs[i].fonttype) {
+             // Set an empty label so it does not jump when items are added.
+             element.setAttribute("label", "");
+-            await this.buildFontList(aLanguageGroup, prefs[i].fonttype, element);
++            await this.buildFontList(aLanguageGroup, prefs[i].fonttype,
++                                     element);
+           }
+ 
+           // Unless the panel is locked, make sure these elements are not
+           // disabled just in case they were in the last language group.
+           element.disabled = this._disabled;
+           preference.setElementValue(element);
+         }
+       }
+     })().catch(Cu.reportError);
+   },
+ 
+   readFontLanguageGroup() {
+-    this._disabled = document.getElementById("browser.display.languageList").locked;
++    this._disabled = document.getElementById("browser.display.languageList")
++                             .locked;
+     var languagePref = document.getElementById("font.language.group");
+-    if (this._disabled)
++    if (this._disabled) {
+       languagePref.disabled = true;
++    }
+     this._selectLanguageGroup(languagePref.value);
+     return undefined;
+   },
+ 
+   readFontPref(aElement, aDefaultValue) {
+     // Check to see if preference value exists,
+     // if not return given default value.
+     var preference = document.getElementById(aElement.getAttribute("preference"));
+     return preference.value || aDefaultValue;
+   },
+ 
+   readUseDocumentFonts() {
+-    var preference = document.getElementById("browser.display.use_document_fonts");
++    var preference =
++      document.getElementById("browser.display.use_document_fonts");
+     return preference.value == 1;
+   },
+ 
+   writeUseDocumentFonts(aUseDocumentFonts) {
+     return aUseDocumentFonts.checked ? 1 : 0;
+   },
+ };

+ 2 - 0
comm-release/patches/series

@@ -2157,3 +2157,5 @@ TOP-1872623-cancelbookmark-25319.patch
 1437393-fontsasync-25319.patch
 1896174-checkbox-25319.patch
 1433388-60a1.patch
+1070492-composer-findbar-v3-25319.patch
+1437393-fontsasync-format-25319.patch