Bug 1488807: Removing dialogheader binding; r=mkmelin
authorArshad Khan <arshdkhn1@gmail.com>
Thu, 06 Sep 2018 18:35:06 +0530
changeset 33300 5e8a03122a95a977451fc26cf14ceded41720fbf
parent 33299 f0ac78200614874a7157972a822b999a50dd557f
child 33301 205e5b8392186d7fe9c28f5f08c33703ea0a8f3a
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersmkmelin
bugs1488807
Bug 1488807: Removing dialogheader binding; r=mkmelin
common/bindings/generalBindings.xml
mail/themes/linux/mail/accountManage.css
mail/themes/osx/mail/accountManage.css
mail/themes/windows/mail/accountManage.css
mailnews/base/prefs/content/am-addressing.xul
mailnews/base/prefs/content/am-copies.xul
mailnews/base/prefs/content/am-junk.xul
mailnews/base/prefs/content/am-main.js
mailnews/base/prefs/content/am-main.xul
mailnews/base/prefs/content/am-offline.xul
mailnews/base/prefs/content/am-server.xul
mailnews/base/prefs/content/am-serverwithnoidentities.xul
mailnews/base/prefs/content/am-smtp.xul
mailnews/extensions/dsn/content/am-dsn.xul
mailnews/extensions/mdn/content/am-mdn.xul
mailnews/extensions/newsblog/content/am-newsblog.js
mailnews/extensions/newsblog/content/am-newsblog.xul
mailnews/extensions/smime/content/am-smime.xul
--- a/common/bindings/generalBindings.xml
+++ b/common/bindings/generalBindings.xml
@@ -34,23 +34,16 @@
                 onget="return this.getAttribute('image');"
                 onset="this.setAttribute('image',val); return val;"/>
       <property name="src"
                 onget="return this.getAttribute('src');"
                 onset="this.setAttribute('src',val); return val;"/>
     </implementation>
   </binding>
 
-  <binding id="dialogheader">
-    <content>
-      <xul:label class="dialogheader-title" xbl:inherits="value=title,crop" crop="right" flex="1"/>
-      <xul:label class="dialogheader-description" xbl:inherits="value=description"/>
-    </content>
-  </binding>
-
   <binding id="menu-vertical" display="xul:menu"
            extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
     <content>
       <children includes="observes|template|menupopup|panel|tooltip"/>
       <xul:hbox flex="1" align="center">
         <xul:vbox flex="1" align="center">
           <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,label,consumeanchor"/>
           <xul:label class="toolbarbutton-text" crop="right" flex="1"
--- a/mail/themes/linux/mail/accountManage.css
+++ b/mail/themes/linux/mail/accountManage.css
@@ -75,18 +75,17 @@ treechildren::-moz-tree-image(folderName
 }
 
 #archiveTree > treechildren {
   background-color: -moz-Field;
 }
 
 /* ::::: dialog header ::::: */
 
-dialogheader {
-  -moz-binding: url("chrome://messenger/content/generalBindings.xml#dialogheader");
+.dialogheader {
   margin: 0 5px 5px;
   border: 1px solid ThreeDDarkShadow;
   padding: 5px 8px;
   background-color: Highlight;
   color: HighlightText;
 }
 
 .dialogheader-title {
--- a/mail/themes/osx/mail/accountManage.css
+++ b/mail/themes/osx/mail/accountManage.css
@@ -20,17 +20,17 @@
 .fccReplyFollowsParent {
   margin-inline-start: 20px;
 }
 
 .signatureBox {
   font-family: -moz-fixed;
 }
 
-#am-main-title, dialogheader {
+#am-main-title, .dialogheader {
   display: none;
 }
 
 .dialog-button[dlgtype="help"] {
   display: none;
 }
 
 #accounttree {
@@ -86,24 +86,19 @@ description {
 }
 
 #archiveTree > treechildren {
   background-color: #FFFFFF;
 }
 
 /* ::::: dialog header ::::: */
 
-dialogheader {
-  -moz-binding: url("chrome://messenger/content/generalBindings.xml#dialogheader");
+.dialogheader {
   margin: 0 5px 5px;
   padding: 5px 8px;
 }
 
 .dialogheader-title {
   margin: 0 !important;
   font-size: larger;
   font-weight: bold;
   display: none;
 }
-
-.dialogheader-description {
-  font-weight: bold !important;
-}
--- a/mail/themes/windows/mail/accountManage.css
+++ b/mail/themes/windows/mail/accountManage.css
@@ -75,18 +75,17 @@ treechildren::-moz-tree-image(folderName
 }
 
 #archiveTree > treechildren {
   background-color: -moz-Field;
 }
 
 /* ::::: dialog header ::::: */
 
-dialogheader {
-  -moz-binding: url("chrome://messenger/content/generalBindings.xml#dialogheader");
+.dialogheader {
   margin: 0 5px 5px;
   border: 1px solid ThreeDDarkShadow;
   padding: 5px 8px;
   background-color: Highlight;
   color: HighlightText;
 }
 
 .dialogheader-title {
--- a/mailnews/base/prefs/content/am-addressing.xul
+++ b/mailnews/base/prefs/content/am-addressing.xul
@@ -14,12 +14,14 @@
       onload="onLoad();">
 
 
   <vbox flex="1" style="overflow: auto;">
     <script type="application/javascript" src="chrome://messenger/content/am-addressing.js"/>
     <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-prefs.js"/>
 
-    <dialogheader title="&addressing.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&addressing.label;"/>
+    </hbox>
 #include am-addressing.inc
   </vbox>
 </page>
--- a/mailnews/base/prefs/content/am-copies.xul
+++ b/mailnews/base/prefs/content/am-copies.xul
@@ -13,12 +13,14 @@
       title="&copyAndFolderTitle.label;"
       onload="parent.onPanelLoaded('am-copies.xul');">
 
   <vbox flex="1" style="overflow: auto;">
     <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-copies.js"/>
     <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
 
-    <dialogheader title="&copyAndFolderTitle.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&copyAndFolderTitle.label;"/>
+    </hbox>
 #include am-copies.inc
   </vbox>
 </page>
--- a/mailnews/base/prefs/content/am-junk.xul
+++ b/mailnews/base/prefs/content/am-junk.xul
@@ -24,17 +24,19 @@
 
   <vbox flex="1" style="overflow: auto;">
     <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-junk.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-prefs.js"/>
     <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
     <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 
-    <dialogheader title="&junkSettings.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&junkSettings.label;"/>
+    </hbox>
 
     <groupbox>
       <caption label="&junkClassification.label;"/>
 
       <label hidden="true"
              id="server.spamLevel"
              wsm_persist="true"
              pref="true"
--- a/mailnews/base/prefs/content/am-main.js
+++ b/mailnews/base/prefs/content/am-main.js
@@ -3,26 +3,26 @@
  * 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 gAccount;
 
 function onInit(aPageId, aServerId)
 {
   var accountName = document.getElementById("server.prettyName");
-  var title = document.getElementById("am-main-title");
+  var title = document.querySelector("#am-main-title .dialogheader-title");
   var defaultTitle = title.getAttribute("defaultTitle");
   var titleValue;
 
   if(accountName.value)
     titleValue = defaultTitle+" - <"+accountName.value+">";
   else
     titleValue = defaultTitle;
 
-  title.setAttribute("title",titleValue);
+  title.setAttribute("value", titleValue);
   document.title = titleValue;
 
   setupSignatureItems();
 }
 
 function onPreInit(account, accountValues)
 {
   gAccount = account;
--- a/mailnews/base/prefs/content/am-main.xul
+++ b/mailnews/base/prefs/content/am-main.xul
@@ -18,17 +18,19 @@
     <script type="application/javascript" src="chrome://messenger/content/am-identity-edit.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-main.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-prefs.js"/>
     <script type="application/javascript"
             src="chrome://messenger/content/amUtils.js"/>
 
     <broadcaster id="broadcaster_attachSignature"/>
 
-    <dialogheader id="am-main-title" defaultTitle="&accountTitle.label;"/>
+    <hbox id="am-main-title" class="dialogheader">
+      <label class="dialogheader-title" defaultTitle="&accountTitle.label;"/>
+    </hbox>
 
     <hbox align="center">
       <label value="&accountName.label;" control="server.prettyName"
              accesskey="&accountName.accesskey;"/>
       <textbox wsm_persist="true" size="30" id="server.prettyName"
                onblur="parent.setAccountLabel(gAccount.key, null, this.value);"
                prefstring="mail.server.%serverkey%.name"/>
     </hbox>
--- a/mailnews/base/prefs/content/am-offline.xul
+++ b/mailnews/base/prefs/content/am-offline.xul
@@ -17,17 +17,19 @@
     <script type="application/javascript" src="chrome://messenger/content/retention.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-offline.js"/>
 
     <label hidden="true" wsm_persist="true" id="server.type"/>
     <label id="imap.autoSyncMaxAgeDays" hidden="true"
            wsm_persist="true" preftype="int"
            prefstring="mail.server.%serverkey%.autosync_max_age_days"/>
 
-    <dialogheader id="headertitle"/>
+    <hbox id="headertitle" class="dialogheader">
+      <label class="dialogheader-title"/>
+    </hbox>
 
     <groupbox id="offline.titlebox" hidefor="movemail,pop3,none,rss">
       <caption label="&syncGroupTitle.label;"/>
 
     <checkbox hidefor="movemail,pop3,nntp,none"
               id="offline.folders" label="&allFoldersOffline2.label;"
               oncommand="toggleOffline()"
               accesskey="&allFoldersOffline2.accesskey;"/>
--- a/mailnews/base/prefs/content/am-server.xul
+++ b/mailnews/base/prefs/content/am-server.xul
@@ -31,17 +31,19 @@
     <label hidden="true"
            wsm_persist="true"
            preftype="string"
            prefattribute="value"
            prefstring="mail.server.%serverkey%.storeContractID"
            genericattr="true"
            id="server.storeContractID"/>
 
-    <dialogheader title="&serverSettings.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&serverSettings.label;"/>
+    </hbox>
 
     <grid>
       <columns>
         <column/>
         <column flex="1"/>
         <column/>
       </columns>
       <rows>
--- a/mailnews/base/prefs/content/am-serverwithnoidentities.xul
+++ b/mailnews/base/prefs/content/am-serverwithnoidentities.xul
@@ -13,17 +13,19 @@
 
 <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       title="&accountTitle.label;"
       onload="parent.onPanelLoaded('am-serverwithnoidentities.xul');">
 
   <script type="application/javascript" src="chrome://messenger/content/am-serverwithnoidentities.js"/>
   <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
 
-  <dialogheader title="&accountTitle.label;"/>
+  <hbox class="dialogheader">
+    <label class="dialogheader-title" value="&accountTitle.label;"/>
+  </hbox>
 
   <label hidden="true"
          wsm_persist="true"
          preftype="string"
          prefattribute="value"
          prefstring="mail.server.%serverkey%.storeContractID"
          genericattr="true"
          id="server.storeContractID"/>
--- a/mailnews/base/prefs/content/am-smtp.xul
+++ b/mailnews/base/prefs/content/am-smtp.xul
@@ -15,17 +15,19 @@
           src="chrome://messenger/content/amUtils.js"/>
   <script type="application/javascript"
           src="chrome://messenger/content/am-smtp.js"/>
 
   <stringbundle id="bundle_messenger"
                 src="chrome://messenger/locale/messenger.properties"/>
 
   <vbox flex="1" style="overflow: auto;">
-    <dialogheader title="&smtpServer.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&smtpServer.label;"/>
+    </hbox>
 
     <label control="smtpList">&smtpDescription.label;</label>
     <separator class="thin"/>
 
     <hbox flex="1">
       <richlistbox id="smtpList"
                    class="theme-listbox"
                    onselect="gSmtpServerListWindow.onSelectionChanged(event);"
--- a/mailnews/extensions/dsn/content/am-dsn.xul
+++ b/mailnews/extensions/dsn/content/am-dsn.xul
@@ -12,17 +12,19 @@
 
 <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       onload="parent.onPanelLoaded('am-dsn.xul');">
 
   <stringbundle id="bundle_smime" src="chrome://messenger/locale/am-dsn.properties"/>
   <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
   <script type="application/javascript" src="chrome://messenger/content/am-dsn.js"/>
 
-  <dialogheader title="&pane.title;"/>
+  <hbox class="dialogheader">
+    <label class="dialogheader-title" value="&pane.title;"/>
+  </hbox>
 
   <groupbox>
 
     <caption label="&pane.title;"/>
 
     <hbox id="prefChoices" align="center">
       <radiogroup id="identity.dsn_use_custom_prefs"
                   wsm_persist="true"
--- a/mailnews/extensions/mdn/content/am-mdn.xul
+++ b/mailnews/extensions/mdn/content/am-mdn.xul
@@ -15,17 +15,19 @@
       onload="parent.onPanelLoaded('am-mdn.xul');">
 
   <vbox flex="1" style="overflow: auto;">
     <stringbundle id="bundle_smime" src="chrome://messenger/locale/am-mdn.properties"/>
     <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
     <script type="application/javascript" src="chrome://messenger/content/amUtils.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-mdn.js"/>
 
-    <dialogheader title="&pane.title;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&pane.title;"/>
+    </hbox>
 
     <groupbox>
 
       <caption label="&pane.title;"/>
 
       <hbox id="prefChoices" align="center" flex="1">
         <radiogroup id="identity.use_custom_prefs" wsm_persist="true" genericattr="true"
                     preftype="bool" prefstring="mail.identity.%identitykey%.use_custom_prefs"
--- a/mailnews/extensions/newsblog/content/am-newsblog.js
+++ b/mailnews/extensions/newsblog/content/am-newsblog.js
@@ -5,27 +5,27 @@
 
 ChromeUtils.import("resource:///modules/FeedUtils.jsm");
 
 var gAccount, gUpdateEnabled, gUpdateValue, gBiffUnits,
     gAutotagEnable, gAutotagUsePrefix, gAutotagPrefix;
 
 function onInit(aPageId, aServerId) {
   var accountName = document.getElementById("server.prettyName");
-  var title = document.getElementById("am-newsblog-title");
+  var title = document.querySelector("#am-newsblog-title .dialogheader-title");
   var defaultTitle = title.getAttribute("defaultTitle");
 
   var titleValue;
   if (accountName.value) {
     titleValue = defaultTitle + " - <" + accountName.value + ">";
   } else {
     titleValue = defaultTitle;
   }
 
-  title.setAttribute("title", titleValue);
+  title.setAttribute("value", titleValue);
   document.title = titleValue;
 
   let optionsAcct = FeedUtils.getOptionsAcct(gAccount.incomingServer);
   document.getElementById("doBiff").checked = optionsAcct.doBiff;
 
   gUpdateEnabled = document.getElementById("updateEnabled");
   gUpdateValue = document.getElementById("updateValue");
   gBiffUnits = document.getElementById("biffUnits");
--- a/mailnews/extensions/newsblog/content/am-newsblog.xul
+++ b/mailnews/extensions/newsblog/content/am-newsblog.xul
@@ -30,17 +30,19 @@
           src="chrome://messenger-newsblog/content/newsblogOverlay.js"/>
   <script type="application/javascript"
           src="chrome://messenger/content/amUtils.js"/>
   <script type="application/javascript"
           src="chrome://messenger/content/am-prefs.js"/>
 
   <vbox flex="1" style="overflow: auto;">
 
-    <dialogheader id="am-newsblog-title" defaultTitle="&accountTitle.label;"/>
+    <hbox id="am-newsblog-title" class="dialogheader">
+      <label class="dialogheader-title" defaultTitle="&accountTitle.label;"/>
+    </hbox>
 
     <description class="secDesc">&accountSettingsDesc.label;</description>
 
     <hbox align="center">
       <label value="&accountName.label;"
              accesskey="&accountName.accesskey;"
              control="server.prettyName"/>
       <textbox id="server.prettyName"
--- a/mailnews/extensions/smime/content/am-smime.xul
+++ b/mailnews/extensions/smime/content/am-smime.xul
@@ -11,14 +11,16 @@
         class="color-dialog"
         onload="parent.onPanelLoaded('am-smime.xul');"
         ondialogaccept="smimeOnAcceptEditor();">
 
   <vbox flex="1" style="overflow: auto;">
     <script type="application/javascript" src="chrome://messenger/content/AccountManager.js"/>
     <script type="application/javascript" src="chrome://messenger/content/am-smime.js"/>
 
-    <dialogheader title="&securityTitle.label;"/>
+    <hbox class="dialogheader">
+      <label class="dialogheader-title" value="&securityTitle.label;"/>
+    </hbox>
 
 #include am-smime.inc
   </vbox>
 
 </page>