Bug 1541006 - Remove single use overlays from compose window. r=frg
authorIan Neal <iann_cvs@blueyonder.co.uk>
Sun, 14 Apr 2019 13:59:08 +0200
changeset 26336 0696198c7fa8d9b6157113e1ddabd6162fc444e2
parent 26335 bddc7eeb6720ddcaf31bdafc85d47166d0414a5a
child 26337 38970ece368e7f1c76b511c18d92b0ffc62942f0
push id15791
push userfrgrahl@gmx.net
push dateSun, 14 Apr 2019 11:59:38 +0000
treeherdercomm-central@0696198c7fa8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1541006
Bug 1541006 - Remove single use overlays from compose window. r=frg
suite/locales/en-US/chrome/mailnews/compose/messengercompose.dtd
suite/locales/jar.mn
suite/mailnews/components/compose/content/addressingWidgetOverlay.xul
suite/mailnews/components/compose/content/mailComposeExtrasOverlay.xul
suite/mailnews/components/compose/content/messengercompose.xul
suite/mailnews/components/compose/jar.mn
--- a/suite/locales/en-US/chrome/mailnews/compose/messengercompose.dtd
+++ b/suite/locales/en-US/chrome/mailnews/compose/messengercompose.dtd
@@ -2,17 +2,23 @@
    - 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/. -->
 
 <!--LOCALIZATION NOTE messengercompose.dtd Main UI for message composition -->
 <!ENTITY msgComposeWindow.title "Compose: (no subject)">
 
 <!ENTITY fromAddr.label "From:">
 <!ENTITY fromAddr.accesskey "r">
-<!ENTITY subject.label  "Subject:">
+<!ENTITY toAddr.label "To:">
+<!ENTITY ccAddr.label "Cc:">
+<!ENTITY bccAddr.label "Bcc:">
+<!ENTITY replyAddr.label "Reply-To:">
+<!ENTITY newsgroupsAddr.label "Newsgroup:">
+<!ENTITY followupAddr.label "Followup-To:">
+<!ENTITY subject.label "Subject:">
 <!ENTITY subject.accesskey "S">
 <!ENTITY attachments.label "Attachments:">
 <!ENTITY attachments.accesskey "c">
 
 <!-- menu items:  the . means that the menu item isn't implemented yet -->
 
 <!-- File menu items -->
 <!ENTITY saveCmd.label "Save">
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -275,17 +275,16 @@
   locale/@AB_CD@/messenger/mailPrefsOverlay.dtd                             (%chrome/mailnews/pref/mailPrefsOverlay.dtd)
   locale/@AB_CD@/messenger/mailTasksOverlay.dtd                             (%chrome/mailnews/mailTasksOverlay.dtd)
   locale/@AB_CD@/messenger/mailViewList.dtd                                 (%chrome/mailnews/mailViewList.dtd)
   locale/@AB_CD@/messenger/mailViewSetup.dtd                                (%chrome/mailnews/mailViewSetup.dtd)
   locale/@AB_CD@/messenger/mailviews.properties                             (%chrome/mailnews/mailviews.properties)
   locale/@AB_CD@/messenger/markByDate.dtd                                   (%chrome/mailnews/markByDate.dtd)
   locale/@AB_CD@/messenger/messenger.dtd                                    (%chrome/mailnews/messenger.dtd)
   locale/@AB_CD@/messenger/messenger.properties                             (%chrome/mailnews/messenger.properties)
-  locale/@AB_CD@/messenger/messengercompose/addressingWidgetOverlay.dtd     (%chrome/mailnews/compose/addressingWidgetOverlay.dtd)
   locale/@AB_CD@/messenger/messengercompose/askSendFormat.dtd               (%chrome/mailnews/compose/askSendFormat.dtd)
   locale/@AB_CD@/messenger/messengercompose/askSendFormat.properties        (%chrome/mailnews/compose/askSendFormat.properties)
   locale/@AB_CD@/messenger/messengercompose/composeMsgs.properties          (%chrome/mailnews/compose/composeMsgs.properties)
   locale/@AB_CD@/messenger/messengercompose/mailComposeEditorOverlay.dtd    (%chrome/mailnews/compose/mailComposeEditorOverlay.dtd)
   locale/@AB_CD@/messenger/messengercompose/messengercompose.dtd            (%chrome/mailnews/compose/messengercompose.dtd)
   locale/@AB_CD@/messenger/messengercompose/pref-composing_messages.dtd     (%chrome/mailnews/pref/pref-composing_messages.dtd)
   locale/@AB_CD@/messenger/messengercompose/pref-formatting.dtd             (%chrome/mailnews/pref/pref-formatting.dtd)
   locale/@AB_CD@/messenger/messengercompose/sendProgress.dtd                (%chrome/mailnews/compose/sendProgress.dtd)
deleted file mode 100644
--- a/suite/mailnews/components/compose/content/addressingWidgetOverlay.xul
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/messengercompose/addressingWidgetOverlay.dtd">
-
-
-<overlay xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>
-<script type="application/javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
-
-  <!-- Addressing Widget -->
-  <listbox id="addressingWidget" seltype="multiple" rows="4"
-    onkeydown="awKeyDown(event, this)"
-    onclick="awClickEmptySpace(event.originalTarget, true)"
-    ondragover="DragAddressOverTargetControl(event);"
-    ondrop="DropAddressOverTargetControl(event);">
-
-    <listcols>
-      <listcol id="typecol-addressingWidget"/>
-      <listcol id="textcol-addressingWidget" flex="1"/>
-    </listcols>
-
-    <listitem class="addressingWidgetItem" allowevents="true">
-      <listcell class="addressingWidgetCell" align="stretch">
-        <menulist id="addressCol1#1" disableonsend="true"
-                  class="aw-menulist menulist-compact" flex="1"
-                  onkeypress="awMenulistKeyPress(event, this)"
-                  oncommand="gContentChanged=true; awSetAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
-          <menupopup>
-            <menuitem value="addr_to" label="&toAddr.label;"/>
-            <menuitem value="addr_cc" label="&ccAddr.label;"/>
-            <menuitem value="addr_bcc" label="&bccAddr.label;"/>
-            <menuitem value="addr_reply" label="&replyAddr.label;"/>
-            <menuitem value="addr_newsgroups" label="&newsgroupsAddr.label;"/>
-            <menuitem value="addr_followup" label="&followupAddr.label;"/>
-          </menupopup>
-        </menulist>
-      </listcell>
-
-      <listcell class="addressingWidgetCell">
-        <textbox id="addressCol2#1" class="plain textbox-addressingWidget uri-element"
-                 aria-labelledby="addressCol1#1"
-                 type="autocomplete" flex="1" maxrows="4"
-                 newlines="replacewithcommas"
-                 autocompletesearch="mydomain addrbook ldap news" timeout="300"
-                 autocompletesearchparam="{}"
-                 completedefaultindex="true" forcecomplete="true"
-                 minresultsforpopup="2" ignoreblurwhilesearching="true"
-                 ontextentered="awRecipientTextCommand(eventParam, this)"
-                 onerrorcommand="awRecipientErrorCommand(eventParam, this)"
-                 oninput="gContentChanged=true; setupAutocomplete();" disableonsend="true"
-                 onkeypress="awRecipientKeyPress(event, this)"
-                 onkeydown="awRecipientKeyDown(event, this)">
-          <image class="person-icon" onclick="this.parentNode.select();"/>
-        </textbox>
-      </listcell>
-    </listitem>
-
-  </listbox>
-
-</overlay>
deleted file mode 100644
--- a/suite/mailnews/components/compose/content/mailComposeExtrasOverlay.xul
+++ /dev/null
@@ -1,12 +0,0 @@
-<!-- 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/. -->
-
-<overlay
-  xmlns:nc="http://home.netscape.com/NC-rdf#"
-  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<!-- plug in your mail compose window extras here.
-     see http://www.mozilla.org/mailnews/arch/composewindowextras.html -->
-
-</overlay>
--- a/suite/mailnews/components/compose/content/messengercompose.xul
+++ b/suite/mailnews/components/compose/content/messengercompose.xul
@@ -8,22 +8,20 @@
 <?xml-stylesheet href="chrome://editor/skin/editorFormatToolbar.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/addressingWidget.css" type="text/css"?>
 
 <?xul-overlay href="chrome://communicator/content/charsetOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/messengercompose/msgComposeContextOverlay.xul"?>
-<?xul-overlay href="chrome://messenger/content/messengercompose/addressingWidgetOverlay.xul"?>
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 <?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>
 <?xul-overlay href="chrome://editor/content/editorSmileyOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/messengercompose/mailComposeOverlay.xul"?>
-<?xul-overlay href="chrome://messenger/content/messengercompose/mailComposeExtrasOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/mailOverlay.xul"?>
 <?xul-overlay href="chrome://messenger/content/platformMailnewsOverlay.xul"?>
 
 <!DOCTYPE window [
 <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
 %messengercomposeDTD;
 <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
 %messengerDTD;
@@ -63,19 +61,21 @@
 
   <script type="application/javascript" src="chrome://communicator/content/contentAreaClick.js"/>
   <script type="application/javascript" src="chrome://global/content/printUtils.js"/>
   <script type="application/javascript" src="chrome://messenger/content/accountUtils.js"/>
   <script type="application/javascript" src="chrome://messenger/content/widgetglue.js"/>
   <script type="application/javascript" src="chrome://messenger/content/mail-offline.js"/>
   <script type="application/javascript" src="chrome://editor/content/editor.js"/>
   <script type="application/javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
+  <script type="application/javascript" src="chrome://messenger/content/messengercompose/addressingWidgetOverlay.js"/>
 
   <!-- drag and drop -->
   <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
+  <script type="application/javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
 
   <commandset id="composeCommands">
     <commandset id="msgComposeCommandUpdate"
                 commandupdater="true"
                 events="focus"
                 oncommandupdate="CommandUpdate_MsgCompose()"/>
 
     <commandset id="editorCommands"/>
@@ -558,17 +558,70 @@
             <menulist id="msgIdentity"
                       editable="true"
                       disableautoselect="true"
                       flex="1"
                       oncommand="LoadIdentity(false);">
               <menupopup id="msgIdentityPopup"/>
             </menulist>
           </hbox>
-          <listbox id="addressingWidget" flex="1"/>
+          <!-- Addressing Widget -->
+          <listbox id="addressingWidget" flex="1"
+                   seltype="multiple" rows="4"
+                   onkeydown="awKeyDown(event, this);"
+                   onclick="awClickEmptySpace(event.originalTarget, true);"
+                   ondragover="DragAddressOverTargetControl(event);"
+                   ondrop="DropAddressOverTargetControl(event);">
+
+            <listcols>
+              <listcol id="typecol-addressingWidget"/>
+              <listcol id="textcol-addressingWidget" flex="1"/>
+            </listcols>
+
+            <listitem class="addressingWidgetItem" allowevents="true">
+              <listcell class="addressingWidgetCell" align="stretch">
+                <menulist id="addressCol1#1" disableonsend="true"
+                          class="aw-menulist menulist-compact" flex="1"
+                          onkeypress="awMenulistKeyPress(event, this);"
+                          oncommand="gContentChanged=true; awSetAutoComplete(this.id.slice(this.id.lastIndexOf('#') + 1));">
+                  <menupopup>
+                    <menuitem value="addr_to" label="&toAddr.label;"/>
+                    <menuitem value="addr_cc" label="&ccAddr.label;"/>
+                    <menuitem value="addr_bcc" label="&bccAddr.label;"/>
+                    <menuitem value="addr_reply" label="&replyAddr.label;"/>
+                    <menuitem value="addr_newsgroups"
+                              label="&newsgroupsAddr.label;"/>
+                    <menuitem value="addr_followup"
+                              label="&followupAddr.label;"/>
+                  </menupopup>
+                </menulist>
+              </listcell>
+
+              <listcell class="addressingWidgetCell">
+                <textbox id="addressCol2#1"
+                         class="plain textbox-addressingWidget uri-element"
+                         aria-labelledby="addressCol1#1"
+                         type="autocomplete" flex="1" maxrows="4"
+                         newlines="replacewithcommas"
+                         autocompletesearch="mydomain addrbook ldap news"
+                         timeout="300" autocompletesearchparam="{}"
+                         completedefaultindex="true" forcecomplete="true"
+                         minresultsforpopup="2" ignoreblurwhilesearching="true"
+                         ontextentered="awRecipientTextCommand(eventParam, this);"
+                         onerrorcommand="awRecipientErrorCommand(eventParam, this);"
+                         oninput="gContentChanged=true; setupAutocomplete();"
+                         disableonsend="true"
+                         onkeypress="awRecipientKeyPress(event, this);"
+                         onkeydown="awRecipientKeyDown(event, this);">
+                  <image class="person-icon"
+                         onclick="this.parentNode.select();"/>
+                </textbox>
+              </listcell>
+            </listitem>
+          </listbox>
           <hbox align="center">
             <label value="&subject.label;" accesskey="&subject.accesskey;" control="msgSubject"/>
             <textbox id="msgSubject" flex="1" class="toolbar" disableonsend="true"
                      oninput="gContentChanged=true;SetComposeWindowTitle();"
                      onkeypress="subjectKeyPress(event);" />
           </hbox>
         </vbox>
         <splitter id="attachmentbucket-sizer" collapse="after"/>
--- a/suite/mailnews/components/compose/jar.mn
+++ b/suite/mailnews/components/compose/jar.mn
@@ -7,10 +7,8 @@ messenger.jar:
     content/messenger/messengercompose/pref-composing_messages.js              (content/prefs/pref-composing_messages.js)
     content/messenger/messengercompose/pref-formatting.xul                     (content/prefs/pref-formatting.xul)
     content/messenger/messengercompose/pref-formatting.js                      (content/prefs/pref-formatting.js)
     content/messenger/messengercompose/messengercompose.xul                    (content/messengercompose.xul)
     content/messenger/messengercompose/mailComposeOverlay.xul                  (content/mailComposeOverlay.xul)
     content/messenger/messengercompose/msgComposeContextOverlay.xul            (content/msgComposeContextOverlay.xul)
     content/messenger/messengercompose/MsgComposeCommands.js                   (content/MsgComposeCommands.js)
     content/messenger/messengercompose/addressingWidgetOverlay.js              (content/addressingWidgetOverlay.js)
-    content/messenger/messengercompose/addressingWidgetOverlay.xul             (content/addressingWidgetOverlay.xul)
-    content/messenger/messengercompose/mailComposeExtrasOverlay.xul            (content/mailComposeExtrasOverlay.xul)