Bug 1444634 - Replace all addressbook overlays with inlining and pre-processing. r=jorgk
authorRichard Marti <richard.marti@gmail.com>
Sun, 11 Mar 2018 17:04:21 +0100
changeset 31273 56248d8b301e719523527385d279bd860b5432ed
parent 31272 12da106483e8d95e2cf956d92384296ce6ea9554
child 31274 3cc1812a10b418c8aac85feb001e332cb56892c9
push id383
push userclokep@gmail.com
push dateMon, 07 May 2018 21:52:48 +0000
reviewersjorgk
bugs1444634
Bug 1444634 - Replace all addressbook overlays with inlining and pre-processing. r=jorgk
mail/base/content/ABSearchDialog.xul
mail/components/addrbook/content/abCard.inc
mail/components/addrbook/content/abCard.js
mail/components/addrbook/content/abCardOverlay.js
mail/components/addrbook/content/abCardOverlay.xul
mail/components/addrbook/content/abCardView.js
mail/components/addrbook/content/abCardViewOverlay.js
mail/components/addrbook/content/abContactsPanel.xul
mail/components/addrbook/content/abEditCardDialog.xul
mail/components/addrbook/content/abNewCardDialog.xul
mail/components/addrbook/content/addressbook.xul
mail/components/addrbook/jar.mn
mail/locales/en-US/chrome/messenger/addressbook/abCard.dtd
mail/locales/en-US/chrome/messenger/addressbook/abCardOverlay.dtd
mail/locales/en-US/chrome/messenger/addressbook/abResultsPane.dtd
mail/locales/en-US/chrome/messenger/addressbook/abResultsPaneOverlay.dtd
mail/locales/jar.mn
mailnews/jar.mn
--- a/mail/base/content/ABSearchDialog.xul
+++ b/mail/base/content/ABSearchDialog.xul
@@ -5,18 +5,18 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://messenger/skin/searchDialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/addressbook/abResultsPane.css" type="text/css"?>
 
 <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
 
 <!DOCTYPE window [
-  <!ENTITY % abResultsPaneOverlayDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPaneOverlay.dtd">
-  %abResultsPaneOverlayDTD;
+  <!ENTITY % abResultsPaneDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPane.dtd">
+  %abResultsPaneDTD;
   <!ENTITY % SearchDialogDTD SYSTEM "chrome://messenger/locale/SearchDialog.dtd">
   %SearchDialogDTD;
   <!ENTITY % searchTermDTD SYSTEM "chrome://messenger/locale/searchTermOverlay.dtd">
   %searchTermDTD;
 ]>
 
 <window id="searchAddressBookWindow"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
rename from mail/components/addrbook/content/abCardOverlay.xul
rename to mail/components/addrbook/content/abCard.inc
--- a/mail/components/addrbook/content/abCardOverlay.xul
+++ b/mail/components/addrbook/content/abCard.inc
@@ -1,27 +1,11 @@
-<?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/. -->
-
-<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
-<?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://messenger/locale/addressbook/abCardOverlay.dtd">
-
-<overlay id="editcardOverlay"
-         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<stringbundleset id="stringbundleset">
-  <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
-</stringbundleset>
-
-<script type="application/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
-<script type="application/javascript" src="chrome://messenger/content/addressbook/abCardOverlay.js"/>
+# 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/.
 
 <vbox id="editcard">
   <tabbox>
     <tabs id="abTabs">
       <tab id="contactTabButton" label="&Contact.tab;"
            accesskey="&Contact.accesskey;"/>
       <tab id="homeTabButton" label="&Home.tab;" accesskey="&Home.accesskey;"/>
       <tab id="workTabButton" label="&Work.tab;" accesskey="&Work.accesskey;"/>
@@ -486,9 +470,8 @@
                 </hbox>
               </vbox>
           </radiogroup>
         </groupbox>
       </hbox>
     </tabpanels>
   </tabbox>
 </vbox>
-</overlay>
rename from mail/components/addrbook/content/abCardOverlay.js
rename to mail/components/addrbook/content/abCard.js
rename from mail/components/addrbook/content/abCardViewOverlay.js
rename to mail/components/addrbook/content/abCardView.js
--- a/mail/components/addrbook/content/abContactsPanel.xul
+++ b/mail/components/addrbook/content/abContactsPanel.xul
@@ -3,18 +3,18 @@
 <!-- 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/. -->
 
 <?xml-stylesheet href="chrome://messenger/skin/searchBox.css" type="text/css"?>
 <?xml-stylesheet href="chrome://messenger/skin/addressbook/abContactsPanel.css" type="text/css"?>
 
 <!DOCTYPE page [
-<!ENTITY % abResultsPaneOverlayDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPaneOverlay.dtd" >
-%abResultsPaneOverlayDTD;
+<!ENTITY % abResultsPaneDTD SYSTEM "chrome://messenger/locale/addressbook/abResultsPane.dtd" >
+%abResultsPaneDTD;
 <!ENTITY % abContactsPanelDTD SYSTEM "chrome://messenger/locale/addressbook/abContactsPanel.dtd" >
 %abContactsPanelDTD;
 ]>
 
 <page id="abContactsPanel"
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="AbPanelLoad();"
       onunload="AbPanelUnload();"
copy from mailnews/addrbook/content/abEditCardDialog.xul
copy to mail/components/addrbook/content/abEditCardDialog.xul
--- a/mailnews/addrbook/content/abEditCardDialog.xul
+++ b/mail/components/addrbook/content/abEditCardDialog.xul
@@ -1,17 +1,26 @@
-<?xml version="1.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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
 
-<?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
+<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abCard.dtd">
 
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   id="abcardWindow"
   onload="OnLoadEditCard()"
   ondialogaccept="return EditCardOKButton();">
 
-  <stringbundleset id="stringbundleset"/>
-  <vbox id="editcard"/>
+  <stringbundleset id="stringbundleset">
+    <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
+  </stringbundleset>
+
+  <script type="application/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
+  <script type="application/javascript" src="chrome://messenger/content/addressbook/abCard.js"/>
+
+#include abCard.inc
+
 </dialog>
copy from mailnews/addrbook/content/abNewCardDialog.xul
copy to mail/components/addrbook/content/abNewCardDialog.xul
--- a/mailnews/addrbook/content/abNewCardDialog.xul
+++ b/mail/components/addrbook/content/abNewCardDialog.xul
@@ -1,34 +1,41 @@
-<?xml version="1.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/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/skin/addressbook/cardDialog.css" type="text/css"?>
+<?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
 
-<?xul-overlay href="chrome://messenger/content/addressbook/abCardOverlay.xul"?>
-
-<!DOCTYPE dialog SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
+<!DOCTYPE dialog [
+  <!ENTITY % newCardDTD SYSTEM "chrome://messenger/locale/addressbook/abNewCardDialog.dtd">
+  %newCardDTD;
+  <!ENTITY % abCardDTD SYSTEM "chrome://messenger/locale/addressbook/abCard.dtd">
+  %abCardDTD;
+]>
 
 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
     id="abcardWindow"
     windowtype="mailnews:newcarddialog"
     onload="OnLoadNewCard()"
     ondialogaccept="return NewCardOKButton();">
 
-  <stringbundleset id="stringbundleset"/>
+  <stringbundleset id="stringbundleset">
+    <stringbundle id="bundle_addressBook" src="chrome://messenger/locale/addressbook/addressBook.properties"/>
+  </stringbundleset>
+
+  <script type="application/javascript" src="chrome://messenger/content/addressbook/abCommon.js"/>
+  <script type="application/javascript" src="chrome://messenger/content/addressbook/abCard.js"/>
 
   <hbox align="center">
-
     <label id="abPopupLabel" control="abPopup" value="&chooseAddressBook.label;" accesskey="&chooseAddressBook.accesskey;"/>
-
     <menulist id="abPopup">
       <menupopup id="abPopup-menupopup" class="addrbooksPopup" writable="true"/>
     </menulist>
-
   </hbox>
 
   <spacer style="height:1em"/>
 
-  <vbox id="editcard"/>
+#include abCard.inc
 
 </dialog>
--- a/mail/components/addrbook/content/addressbook.xul
+++ b/mail/components/addrbook/content/addressbook.xul
@@ -53,17 +53,17 @@
 <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
 <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>
 <script type="application/javascript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
 <script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
 #ifdef XP_MACOSX
 <script type="application/javascript" src="chrome://global/content/macWindowMenu.js"/>
 #endif
 <script type="application/javascript" src="chrome://messenger/content/addressbook/abResultsPane.js"/>
-<script type="application/javascript" src="chrome://messenger/content/addressbook/abCardViewOverlay.js"/>
+<script type="application/javascript" src="chrome://messenger/content/addressbook/abCardView.js"/>
 <script type="application/javascript" src="chrome://messenger/content/toolbarIconColor.js"/>
 
 <commandset id="addressBook">
   <commandset id="CommandUpdate_AddressBook"
               commandupdater="true"
               events="focus,addrbook-select"
               oncommandupdate="CommandUpdate_AddressBook()"/>
   <commandset id="selectEditMenuItems"
--- a/mail/components/addrbook/jar.mn
+++ b/mail/components/addrbook/jar.mn
@@ -1,16 +1,17 @@
 # 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/.
 
 messenger.jar:
-    content/messenger/addressbook/abCardViewOverlay.js          (content/abCardViewOverlay.js)
+    content/messenger/addressbook/abCardView.js                 (content/abCardView.js)
     content/messenger/addressbook/addressbook.js                (content/addressbook.js)
 *   content/messenger/addressbook/addressbook.xul               (content/addressbook.xul)
     content/messenger/addressbook/abCommon.js                   (content/abCommon.js)
-    content/messenger/addressbook/abCardOverlay.js              (content/abCardOverlay.js)
-    content/messenger/addressbook/abCardOverlay.xul             (content/abCardOverlay.xul)
+    content/messenger/addressbook/abCard.js                     (content/abCard.js)
+*   content/messenger/addressbook/abEditCardDialog.xul          (content/abEditCardDialog.xul)
     content/messenger/addressbook/abEditListDialog.xul          (content/abEditListDialog.xul)
     content/messenger/addressbook/abMailListDialog.xul          (content/abMailListDialog.xul)
+*   content/messenger/addressbook/abNewCardDialog.xul           (content/abNewCardDialog.xul)
     content/messenger/addressbook/abContactsPanel.xul           (content/abContactsPanel.xul)
     content/messenger/addressbook/abContactsPanel.js            (content/abContactsPanel.js)
     content/messenger/addressbook/abTrees.js                    (content/abTrees.js)
rename from mail/locales/en-US/chrome/messenger/addressbook/abCardOverlay.dtd
rename to mail/locales/en-US/chrome/messenger/addressbook/abCard.dtd
rename from mail/locales/en-US/chrome/messenger/addressbook/abResultsPaneOverlay.dtd
rename to mail/locales/en-US/chrome/messenger/addressbook/abResultsPane.dtd
--- a/mail/locales/jar.mn
+++ b/mail/locales/jar.mn
@@ -126,18 +126,18 @@
   locale/@AB_CD@/messenger/safeMode.dtd                                 (%chrome/messenger/safeMode.dtd)
   locale/@AB_CD@/messenger/taskbar.properties                           (%chrome/messenger/taskbar.properties)
   locale/@AB_CD@/messenger/junkLog.dtd                                  (%chrome/messenger/junkLog.dtd)
   locale/@AB_CD@/messenger/msgPrintEngine.dtd                           (%chrome/messenger/msgPrintEngine.dtd)
   locale/@AB_CD@/messenger/addressbook/abMainWindow.dtd                 (%chrome/messenger/addressbook/abMainWindow.dtd)
   locale/@AB_CD@/messenger/addressbook/abNewCardDialog.dtd              (%chrome/messenger/addressbook/abNewCardDialog.dtd)
   locale/@AB_CD@/messenger/addressbook/abContactsPanel.dtd              (%chrome/messenger/addressbook/abContactsPanel.dtd)
   locale/@AB_CD@/messenger/addressbook/abAddressBookNameDialog.dtd      (%chrome/messenger/addressbook/abAddressBookNameDialog.dtd)
-  locale/@AB_CD@/messenger/addressbook/abCardOverlay.dtd                (%chrome/messenger/addressbook/abCardOverlay.dtd)
-  locale/@AB_CD@/messenger/addressbook/abResultsPaneOverlay.dtd         (%chrome/messenger/addressbook/abResultsPaneOverlay.dtd)
+  locale/@AB_CD@/messenger/addressbook/abCard.dtd                       (%chrome/messenger/addressbook/abCard.dtd)
+  locale/@AB_CD@/messenger/addressbook/abResultsPane.dtd                (%chrome/messenger/addressbook/abResultsPane.dtd)
   locale/@AB_CD@/messenger/addressbook/abMailListDialog.dtd             (%chrome/messenger/addressbook/abMailListDialog.dtd)
   locale/@AB_CD@/messenger/addressbook/addressBook.properties           (%chrome/messenger/addressbook/addressBook.properties)
   locale/@AB_CD@/messenger/addressbook/ldapAutoCompErrs.properties      (%chrome/messenger/addressbook/ldapAutoCompErrs.properties)
   locale/@AB_CD@/messenger/addressbook/pref-directory.dtd               (%chrome/messenger/addressbook/pref-directory.dtd)
   locale/@AB_CD@/messenger/addressbook/pref-directory-add.dtd           (%chrome/messenger/addressbook/pref-directory-add.dtd)
   locale/@AB_CD@/messenger/addressbook/replicationProgress.properties   (%chrome/messenger/addressbook/replicationProgress.properties)
   locale/@AB_CD@/messenger/cloudfile/addAccountDialog.dtd               (%chrome/messenger/cloudfile/addAccountDialog.dtd)
   locale/@AB_CD@/messenger/cloudfile/management.dtd                     (%chrome/messenger/cloudfile/management.dtd)
--- a/mailnews/jar.mn
+++ b/mailnews/jar.mn
@@ -4,19 +4,21 @@
 
 messenger.jar:
     content/messenger/addressbook/pref-directory-add.js                        (addrbook/prefs/content/pref-directory-add.js)
     content/messenger/addressbook/pref-directory-add.xul                       (addrbook/prefs/content/pref-directory-add.xul)
     content/messenger/addressbook/pref-editdirectories.js                      (addrbook/prefs/content/pref-editdirectories.js)
     content/messenger/addressbook/pref-editdirectories.xul                     (addrbook/prefs/content/pref-editdirectories.xul)
     content/messenger/addressbook/abAddressBookNameDialog.js                   (addrbook/content/abAddressBookNameDialog.js)
     content/messenger/addressbook/abAddressBookNameDialog.xul                  (addrbook/content/abAddressBookNameDialog.xul)
+#ifndef MOZ_THUNDERBIRD
     content/messenger/addressbook/abEditCardDialog.xul                         (addrbook/content/abEditCardDialog.xul)
     content/messenger/addressbook/abNewCardDialog.xul                          (addrbook/content/abNewCardDialog.xul)
     content/messenger/addressbook/abResultsPaneOverlay.xul                     (addrbook/content/abResultsPaneOverlay.xul)
+#endif
     content/messenger/addressbook/abResultsPane.js                             (addrbook/content/abResultsPane.js)
     content/messenger/addressbook/addrbookWidgets.xml                          (addrbook/content/addrbookWidgets.xml)
     content/messenger/addressbook/abDragDrop.js                                (addrbook/content/abDragDrop.js)
     content/messenger/addressbook/abMailListDialog.js                          (addrbook/content/abMailListDialog.js)
     content/messagebody/addressbook/print.css                                  (addrbook/content/print.css)
 *   content/messenger/AccountManager.xul                                       (base/prefs/content/AccountManager.xul)
     content/messenger/AccountManager.js                                        (base/prefs/content/AccountManager.js)
     content/messenger/am-main.xul                                              (base/prefs/content/am-main.xul)