Bug 1624882 - Fix broken .spacer selector in dialog.js.
authorTim Nguyen <ntim.bugs@gmail.com>
Fri, 27 Mar 2020 14:06:57 +0000
changeset 520754 dd34f9158940be1b788738a16f72a579151b4505
parent 520753 20b1cf25be1bf0f6afce979a3276712a0182ff7e
child 520755 6502d0dbe2be97c97a18d84c08b9d7f478c76605
push id111296
push userntim.bugs@gmail.com
push dateFri, 27 Mar 2020 14:10:06 +0000
treeherderautoland@dd34f9158940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1624882
milestone76.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1624882 - Fix broken .spacer selector in dialog.js. Differential Revision: https://phabricator.services.mozilla.com/D68568
toolkit/content/widgets/dialog.js
--- a/toolkit/content/widgets/dialog.js
+++ b/toolkit/content/widgets/dialog.js
@@ -98,24 +98,24 @@
     get _markup() {
       let buttons = AppConstants.XP_UNIX
         ? `
       <hbox class="dialog-button-box">
         <button dlgtype="disclosure" hidden="true"/>
         <button dlgtype="help" hidden="true"/>
         <button dlgtype="extra2" hidden="true"/>
         <button dlgtype="extra1" hidden="true"/>
-        <spacer part="button-spacer" flex="1"/>
+        <spacer class="button-spacer" part="button-spacer" flex="1"/>
         <button dlgtype="cancel"/>
         <button dlgtype="accept"/>
       </hbox>`
         : `
       <hbox class="dialog-button-box" pack="end">
         <button dlgtype="extra2" hidden="true"/>
-        <spacer part="button-spacer" flex="1" hidden="true"/>
+        <spacer class="button-spacer" part="button-spacer" flex="1" hidden="true"/>
         <button dlgtype="accept"/>
         <button dlgtype="extra1" hidden="true"/>
         <button dlgtype="cancel"/>
         <button dlgtype="help" hidden="true"/>
         <button dlgtype="disclosure" hidden="true"/>
       </hbox>`;
 
       let key =
@@ -452,17 +452,17 @@
 
         // hide/show the buttons we want
         for (dlgtype in buttons) {
           buttons[dlgtype].hidden = !shown[dlgtype];
         }
 
         // show the spacer on Windows only when the extra2 button is present
         if (AppConstants.platform == "win") {
-          let spacer = this.shadowRoot.querySelector(".spacer");
+          let spacer = this.shadowRoot.querySelector(".button-spacer");
           spacer.removeAttribute("hidden");
           spacer.setAttribute("flex", shown.extra2 ? "1" : "0");
         }
       }
     }
 
     _setDefaultButton(aNewDefault) {
       // remove the default attribute from the previous default button, if any