Bug 1492522 - Port Bug 1465219: Replace MenuBoxObject with XULElement subclass. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Wed, 19 Sep 2018 20:41:50 +0200
changeset 33188 91c8e34b5a1003a80f57c8936695b8281983fa31
parent 33187 316140574f95c815bf62e64aedfa27294e877272
child 33189 ca9d4cde9481d4d89454c785ea3af152692e9076
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1492522, 1465219
Bug 1492522 - Port Bug 1465219: Replace MenuBoxObject with XULElement subclass. rs=bustage-fix
common/bindings/datetimepicker.xml
common/bindings/menulist.xml
mail/base/content/mailWidgets.xml
--- a/common/bindings/datetimepicker.xml
+++ b/common/bindings/datetimepicker.xml
@@ -1273,18 +1273,18 @@
         var grid = document.getAnonymousElementByAttribute(this, "anonid", "grid");
         this.attachedControl = grid;
         grid.attachedControl = this;
         grid._setValueNoSync(this._dateValue);
       </constructor>
       <property name="open" onget="return this.hasAttribute('open');">
         <setter>
           <![CDATA[
-            if (this.boxObject instanceof MenuBoxObject)
-              this.boxObject.openMenu(val);
+            if (this.hasMenu())
+              this.openMenu(val);
             return val;
           ]]>
         </setter>
       </property>
       <property name="displayedMonth">
         <getter>
           return document.getAnonymousElementByAttribute(this, "anonid", "grid").displayedMonth;
         </getter>
--- a/common/bindings/menulist.xml
+++ b/common/bindings/menulist.xml
@@ -172,21 +172,21 @@
 
       <handler event="popupshowing"><![CDATA[
           // editable menulists elements aren't in the focus order,
           // so when the popup opens we need to force the focus to the inputField
           if (event.target.parentNode == this) {
               if (document.commandDispatcher.focusedElement != this.inputField)
                   this.inputField.focus();
 
-              this.menuBoxObject.activeChild = null;
+              this.activeChild = null;
               if (this.selectedItem)
                   // Not ready for auto-setting the active child in hierarchies yet.
                   // For now, only do this when the outermost menupopup opens.
-                  this.menuBoxObject.activeChild = this.mSelectedInternal;
+                  this.activeChild = this.mSelectedInternal;
           }
       ]]></handler>
 
       <handler event="keypress"><![CDATA[
           // open popup if key is up arrow, down arrow, or F4
           if (!event.ctrlKey && !event.shiftKey) {
               if (event.keyCode == KeyEvent.DOM_VK_UP ||
                   event.keyCode == KeyEvent.DOM_VK_DOWN ||
--- a/mail/base/content/mailWidgets.xml
+++ b/mail/base/content/mailWidgets.xml
@@ -2187,17 +2187,17 @@
             }
           ]]>
         </body>
       </method>
       <method name="onBlurMenuList">
         <parameter name="event"/>
         <body>
           <![CDATA[
-            this.boxObject.openMenu(false);
+            this.openMenu(false);
           ]]>
         </body>
       </method>
       <field name="onKeyPressMenuList" readonly="true">
         <![CDATA[
           ({
             self: this,
             tree: this.tree,