Bug 1628873 - Merge EditorSmileyOverlay into EditorOverlay. r=frg DONTBUILD
authorIan Neal <iann_cvs@blueyonder.co.uk>
Thu, 09 Apr 2020 17:08:14 +0100
changeset 38088 4fc9cddb1dedf6b59112c0799d100860d62d775f
parent 38087 9b45aa35f1041089c57ba61b7b7061a5df7da9c5
child 38089 60f37dc61ea140c249866c86fa714eaffca01659
push id2595
push userclokep@gmail.com
push dateMon, 04 May 2020 19:02:04 +0000
treeherdercomm-beta@f53913797371 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg
bugs1628873
Bug 1628873 - Merge EditorSmileyOverlay into EditorOverlay. r=frg DONTBUILD
editor/ui/composer/content/editorOverlay.xhtml
editor/ui/composer/content/editorSmileyOverlay.xhtml
editor/ui/jar.mn
suite/mailnews/components/compose/content/messengercompose.xul
--- a/editor/ui/composer/content/editorOverlay.xhtml
+++ b/editor/ui/composer/content/editorOverlay.xhtml
@@ -1,14 +1,20 @@
 <?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://editor/locale/editorOverlay.dtd">
+<!DOCTYPE overlay [
+<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
+%editorOverlayDTD;
+<!ENTITY % editorSmileyOverlayDTD SYSTEM
+  "chrome://editor/locale/editorSmileyOverlay.dtd">
+%editorSmileyOverlayDTD;
+]>
 
 <overlay id="editorOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
 
 <script src="chrome://editor/content/editorUtilities.js"/>
 <script src="chrome://editor/content/ComposerCommands.js"/>
 
   <keyset id="editorKeys">
@@ -376,16 +382,86 @@
                     accesskey="&updateTOC.accesskey;"
                     oncommand="UpdateTOC()"/>
           <menuitem id="removeTOCMenuitem"
                     label="&removeTOC.label;"
                     accesskey="&removeTOC.accesskey;"
                     oncommand="RemoveTOC()"/>
         </menupopup>
       </menu>
+      <menu id="insertSmiley"
+            label="&insertSmiley.label;"
+            accesskey="&insertSmiley.accesskey;">
+        <menupopup id="smilyMenuPopup">
+          <menuitem class="smiley insert-smile menuitem-iconic"
+                    label="&smiley1Cmd.label;"
+                    accesskey="&smiley1Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-)');"/>
+          <menuitem class="smiley insert-frown menuitem-iconic"
+                    label="&smiley2Cmd.label;"
+                    accesskey="&smiley2Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-(');"/>
+          <menuitem class="smiley insert-wink menuitem-iconic"
+                    label="&smiley3Cmd.label;"
+                    accesskey="&smiley3Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ';-)');"/>
+          <menuitem class="smiley insert-tongue menuitem-iconic"
+                    label="&smiley4Cmd.label;"
+                    accesskey="&smiley4Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-P');"/>
+          <menuitem class="smiley insert-laughing menuitem-iconic"
+                    label="&smiley5Cmd.label;"
+                    accesskey="&smiley5Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-D');"/>
+          <menuitem class="smiley insert-embarrassed menuitem-iconic"
+                    label="&smiley6Cmd.label;"
+                    accesskey="&smiley6Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-[');"/>
+          <menuitem class="smiley insert-undecided menuitem-iconic"
+                    label="&smiley7Cmd.label;"
+                    accesskey="&smiley7Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-\\');"/>
+          <menuitem class="smiley insert-surprise menuitem-iconic"
+                    label="&smiley8Cmd.label;"
+                    accesskey="&smiley8Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', '=-O');"/>
+          <menuitem class="smiley insert-kiss menuitem-iconic"
+                    label="&smiley9Cmd.label;"
+                    accesskey="&smiley9Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-*');"/>
+          <menuitem class="smiley insert-yell menuitem-iconic"
+                    label="&smiley10Cmd.label;"
+                    accesskey="&smiley10Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', '>:o');"/>
+          <menuitem class="smiley insert-cool menuitem-iconic"
+                    label="&smiley11Cmd.label;"
+                    accesskey="&smiley11Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', '8-)');"/>
+          <menuitem class="smiley insert-money menuitem-iconic"
+                    label="&smiley12Cmd.label;"
+                    accesskey="&smiley12Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-$');"/>
+          <menuitem class="smiley insert-foot menuitem-iconic"
+                    label="&smiley13Cmd.label;"
+                    accesskey="&smiley13Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-!');"/>
+          <menuitem class="smiley insert-innocent menuitem-iconic"
+                    label="&smiley14Cmd.label;"
+                    accesskey="&smiley14Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', 'O:-)');"/>
+          <menuitem class="smiley insert-cry menuitem-iconic"
+                    label="&smiley15Cmd.label;"
+                    accesskey="&smiley15Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':\'(');"/>
+          <menuitem class="smiley insert-sealed menuitem-iconic"
+                    label="&smiley16Cmd.label;"
+                    accesskey="&smiley16Cmd.accesskey;"
+                    oncommand="doStatefulCommand('cmd_smiley', ':-X');"/>
+        </menupopup>
+      </menu>
       <menuseparator id="insertMenuSeparator"/>
       <menuitem id="insertBreakAll"
                 accesskey="&insertBreakAllCmd.accesskey;"
                 command="cmd_insertBreakAll"
                 label="&insertBreakAllCmd.label;"/>
     </menupopup>
   </menu>
 
@@ -1295,9 +1371,83 @@
   <toolbarbutton id="decreaseZIndexButton"
                  class="formatting-button"
                  tooltiptext="&layerSendToBack.tooltip;"
                  command="cmd_decreaseZIndex"/>
   <toolbarbutton id="increaseZIndexButton"
                  class="formatting-button"
                  tooltiptext="&layerBringToFront.tooltip;"
                  command="cmd_increaseZIndex"/>
+
+  <!-- smiley menu -->
+  <toolbarbutton id="smileButtonMenu"
+                 class="formatting-button"
+                 tooltiptext="&SmileButton.tooltip;"
+                 type="menu"
+                 observes="cmd_smiley">
+    <menupopup id="smilyPopup">
+      <menuitem class="smiley insert-smile menuitem-iconic"
+                label="&smiley1Cmd.label;"
+                tooltiptext="&smiley1Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-)');"/>
+      <menuitem class="smiley insert-frown menuitem-iconic"
+                label="&smiley2Cmd.label;"
+                tooltiptext="&smiley2Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-(');"/>
+      <menuitem class="smiley insert-wink menuitem-iconic"
+                label="&smiley3Cmd.label;"
+                tooltiptext="&smiley3Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ';-)');"/>
+      <menuitem class="smiley insert-tongue menuitem-iconic"
+                label="&smiley4Cmd.label;"
+                tooltiptext="&smiley4Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-P');"/>
+      <menuitem class="smiley insert-laughing menuitem-iconic"
+                label="&smiley5Cmd.label;"
+                tooltiptext="&smiley5Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-D');"/>
+      <menuitem class="smiley insert-embarrassed menuitem-iconic"
+                label="&smiley6Cmd.label;"
+                tooltiptext="&smiley6Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-[');"/>
+      <menuitem class="smiley insert-undecided menuitem-iconic"
+                label="&smiley7Cmd.label;"
+                tooltiptext="&smiley7Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-\\');"/>
+      <menuitem class="smiley insert-surprise menuitem-iconic"
+                label="&smiley8Cmd.label;"
+                tooltiptext="&smiley8Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', '=-O');"/>
+      <menuitem class="smiley insert-kiss menuitem-iconic"
+                label="&smiley9Cmd.label;"
+                tooltiptext="&smiley9Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-*');"/>
+      <menuitem class="smiley insert-yell menuitem-iconic"
+                label="&smiley10Cmd.label;"
+                tooltiptext="&smiley10Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', '>:o');"/>
+      <menuitem class="smiley insert-cool menuitem-iconic"
+                label="&smiley11Cmd.label;"
+                tooltiptext="&smiley11Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', '8-)');"/>
+      <menuitem class="smiley insert-money menuitem-iconic"
+                label="&smiley12Cmd.label;"
+                tooltiptext="&smiley12Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-$');"/>
+      <menuitem class="smiley insert-foot menuitem-iconic"
+                label="&smiley13Cmd.label;"
+                tooltiptext="&smiley13Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-!');"/>
+      <menuitem class="smiley insert-innocent menuitem-iconic"
+                label="&smiley14Cmd.label;"
+                tooltiptext="&smiley14Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', 'O:-)');"/>
+      <menuitem class="smiley insert-cry menuitem-iconic"
+                label="&smiley15Cmd.label;"
+                tooltiptext="&smiley15Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':\'(');"/>
+      <menuitem class="smiley insert-sealed menuitem-iconic"
+                label="&smiley16Cmd.label;"
+                tooltiptext="&smiley16Cmd.tooltip;"
+                oncommand="doStatefulCommand('cmd_smiley', ':-X');"/>
+    </menupopup>
+  </toolbarbutton>
 </overlay>
deleted file mode 100644
--- a/editor/ui/composer/content/editorSmileyOverlay.xhtml
+++ /dev/null
@@ -1,108 +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://editor/locale/editorSmileyOverlay.dtd">
-
-<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
-  <!-- smiley menu -->
-  <toolbarbutton id="smileButtonMenu"
-                 class="formatting-button"
-                 tooltiptext="&SmileButton.tooltip;"
-                 type="menu"
-                 observes="cmd_smiley">
-    <menupopup id="smilyPopup">
-      <menuitem class="smiley insert-smile menuitem-iconic"       label="&smiley1Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-)'  )"
-                tooltiptext="&smiley1Cmd.tooltip;"  />
-      <menuitem class="smiley insert-frown menuitem-iconic"       label="&smiley2Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-('  )"
-                tooltiptext="&smiley2Cmd.tooltip;"  />
-      <menuitem class="smiley insert-wink menuitem-iconic"        label="&smiley3Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ';-)'  )"
-                tooltiptext="&smiley3Cmd.tooltip;"  />
-      <menuitem class="smiley insert-tongue menuitem-iconic"      label="&smiley4Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-P'  )"
-                tooltiptext="&smiley4Cmd.tooltip;"  />
-      <menuitem class="smiley insert-laughing menuitem-iconic"    label="&smiley5Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-D'  )"
-                tooltiptext="&smiley5Cmd.tooltip;"  />
-      <menuitem class="smiley insert-embarrassed menuitem-iconic" label="&smiley6Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-['  )"
-                tooltiptext="&smiley6Cmd.tooltip;"  />
-      <menuitem class="smiley insert-undecided menuitem-iconic"   label="&smiley7Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-\\' )"
-                tooltiptext="&smiley7Cmd.tooltip;"  />
-      <menuitem class="smiley insert-surprise menuitem-iconic"   label="&smiley8Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', '=-O' )"
-                tooltiptext="&smiley8Cmd.tooltip;"  />
-      <menuitem class="smiley insert-kiss menuitem-iconic"   label="&smiley9Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-*' )"
-                tooltiptext="&smiley9Cmd.tooltip;"  />
-      <menuitem class="smiley insert-yell menuitem-iconic"   label="&smiley10Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', '>:o' )"
-                tooltiptext="&smiley10Cmd.tooltip;" />
-      <menuitem class="smiley insert-cool menuitem-iconic"   label="&smiley11Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', '8-)' )"
-                tooltiptext="&smiley11Cmd.tooltip;" />
-      <menuitem class="smiley insert-money menuitem-iconic"   label="&smiley12Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-$' )"
-                tooltiptext="&smiley12Cmd.tooltip;" />
-      <menuitem class="smiley insert-foot menuitem-iconic"   label="&smiley13Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-!' )"
-                tooltiptext="&smiley13Cmd.tooltip;" />
-      <menuitem class="smiley insert-innocent menuitem-iconic"   label="&smiley14Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', 'O:-)' )"
-                tooltiptext="&smiley14Cmd.tooltip;" />
-      <menuitem class="smiley insert-cry menuitem-iconic"   label="&smiley15Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':\'(' )"
-                tooltiptext="&smiley15Cmd.tooltip;" />
-      <menuitem class="smiley insert-sealed menuitem-iconic"   label="&smiley16Cmd.label;"
-                oncommand="doStatefulCommand('cmd_smiley', ':-X' )"
-                tooltiptext="&smiley16Cmd.tooltip;" />
-
-    </menupopup>
-  </toolbarbutton>
-
-  <menu id="insertMenu">
-    <menupopup id="insertMenuPopup">
-      <menu id="insertSmiley" label="&insertSmiley.label;" accesskey="&insertSmiley.accesskey;" insertbefore="insertMenuSeparator">
-        <menupopup id="smilyMenuPopup">
-          <menuitem class="smiley insert-smile menuitem-iconic"       label="&smiley1Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-)'  )" accesskey="&smiley1Cmd.accesskey;"/>
-          <menuitem class="smiley insert-frown menuitem-iconic"       label="&smiley2Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-('  )" accesskey="&smiley2Cmd.accesskey;"/>
-          <menuitem class="smiley insert-wink menuitem-iconic"        label="&smiley3Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ';-)'  )" accesskey="&smiley3Cmd.accesskey;"/>
-          <menuitem class="smiley insert-tongue menuitem-iconic"      label="&smiley4Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-P'  )" accesskey="&smiley4Cmd.accesskey;"/>
-          <menuitem class="smiley insert-laughing menuitem-iconic"    label="&smiley5Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-D'  )" accesskey="&smiley5Cmd.accesskey;"/>
-          <menuitem class="smiley insert-embarrassed menuitem-iconic" label="&smiley6Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-['  )" accesskey="&smiley6Cmd.accesskey;"/>
-          <menuitem class="smiley insert-undecided menuitem-iconic"   label="&smiley7Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-\\' )" accesskey="&smiley7Cmd.accesskey;"/>
-          <menuitem class="smiley insert-surprise menuitem-iconic"   label="&smiley8Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', '=-O' )" accesskey="&smiley8Cmd.accesskey;"/>
-          <menuitem class="smiley insert-kiss menuitem-iconic"   label="&smiley9Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-*' )" accesskey="&smiley9Cmd.accesskey;"/>
-          <menuitem class="smiley insert-yell menuitem-iconic"   label="&smiley10Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', '>:o' )" accesskey="&smiley10Cmd.accesskey;"/>
-          <menuitem class="smiley insert-cool menuitem-iconic"   label="&smiley11Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', '8-)' )" accesskey="&smiley11Cmd.accesskey;"/>
-          <menuitem class="smiley insert-money menuitem-iconic"   label="&smiley12Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-$' )" accesskey="&smiley12Cmd.accesskey;"/>
-          <menuitem class="smiley insert-foot menuitem-iconic"   label="&smiley13Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-!' )" accesskey="&smiley13Cmd.accesskey;"/>
-          <menuitem class="smiley insert-innocent menuitem-iconic"   label="&smiley14Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', 'O:-)' )" accesskey="&smiley14Cmd.accesskey;"/>
-          <menuitem class="smiley insert-cry menuitem-iconic"   label="&smiley15Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':\'(' )" accesskey="&smiley15Cmd.accesskey;"/>
-          <menuitem class="smiley insert-sealed menuitem-iconic"   label="&smiley16Cmd.label;"
-                    oncommand="doStatefulCommand('cmd_smiley', ':-X' )" accesskey="&smiley16Cmd.accesskey;"/>
-        </menupopup>
-      </menu>
-    </menupopup>
-  </menu>
-</overlay>
--- a/editor/ui/jar.mn
+++ b/editor/ui/jar.mn
@@ -76,17 +76,16 @@ comm.jar:
       content/editor/EdAEHTMLAttributes.js                     (dialogs/content/EdAEHTMLAttributes.js)
       content/editor/EdAEJSEAttributes.js                      (dialogs/content/EdAEJSEAttributes.js)
       content/editor/EdAEAttributes.js                         (dialogs/content/EdAEAttributes.js)
       content/editor/EdConvertToTable.xhtml                    (dialogs/content/EdConvertToTable.xhtml)
       content/editor/EdConvertToTable.js                       (dialogs/content/EdConvertToTable.js)
 #ifdef MOZ_SUITE
       content/editor/editor.xhtml                              (composer/content/editor.xhtml)
       content/editor/editingOverlay.js                         (composer/content/editingOverlay.js)
-      content/editor/editorSmileyOverlay.xhtml                 (composer/content/editorSmileyOverlay.xhtml)
       content/editor/editorApplicationOverlay.js               (composer/content/editorApplicationOverlay.js)
       content/editor/publishprefs.js                           (composer/content/publishprefs.js)
       content/editor/EditorContextMenu.js                      (composer/content/EditorContextMenu.js)
       content/editor/EditorContextMenuOverlay.xhtml            (composer/content/EditorContextMenuOverlay.xhtml)
       content/editor/EditorAllTags.css                         (composer/content/EditorAllTags.css)
       content/editor/editorNavigatorOverlay.xhtml              (composer/content/editorNavigatorOverlay.xhtml)
       content/editor/editorMailOverlay.xhtml                   (composer/content/editorMailOverlay.xhtml)
       content/editor/editorTasksOverlay.xhtml                  (composer/content/editorTasksOverlay.xhtml)
--- a/suite/mailnews/components/compose/content/messengercompose.xul
+++ b/suite/mailnews/components/compose/content/messengercompose.xul
@@ -10,17 +10,16 @@
 
 <?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://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/mailOverlay.xul"?>
 
 <!DOCTYPE window [
 <!ENTITY % messengercomposeDTD SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd" >
 %messengercomposeDTD;
 <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd" >
 %messengerDTD;