From 095a1cda92031e3dc514183e9be9f02006557a80 Mon Sep 17 00:00:00 2001 From: Alexander Surkov Date: Sun, 17 Mar 2019 19:36:03 +0000 Subject: [PATCH] Bug 1494846 - kill wizard-header binding, r=paolo Differential Revision: https://phabricator.services.mozilla.com/D23391 --HG-- extra : moz-landing-system : lando --- toolkit/content/widgets/wizard.xml | 62 +++++++++++----------- toolkit/content/xul.css | 4 -- toolkit/mozapps/update/content/updates.xml | 2 +- 3 files changed, 33 insertions(+), 35 deletions(-) diff --git a/toolkit/content/widgets/wizard.xml b/toolkit/content/widgets/wizard.xml index fdb64254330c..337dda5639ba 100644 --- a/toolkit/content/widgets/wizard.xml +++ b/toolkit/content/widgets/wizard.xml @@ -176,6 +176,30 @@ // get anonymous content references this._wizardHeader = document.getAnonymousElementByAttribute(this, "anonid", "Header"); + + this._wizardHeader.appendChild( + MozXULElement.parseXULToFragment(/Mac/.test(navigator.platform) ? + ` + + + + + + + + + ` : + ` + + + + ` + ) + ); + this._wizardButtons = document.getAnonymousElementByAttribute(this, "anonid", "Buttons"); this._deck = document.getAnonymousElementByAttribute(this, "anonid", "Deck"); @@ -390,8 +414,14 @@ label = this._bundle.formatStringFromName("default-last-title", [this.title], 1); } } - this._wizardHeader.setAttribute("label", label); - this._wizardHeader.setAttribute("description", this.currentPage.getAttribute("description")); + this._wizardHeader. + querySelector(".wizard-header-label").textContent = label; + let headerDescEl = + this._wizardHeader.querySelector(".wizard-header-description"); + if (headerDescEl) { + headerDescEl.textContent = + this.currentPage.getAttribute("description"); + } ]]> @@ -443,22 +473,6 @@ #ifdef XP_MACOSX - - - - - - - - - - - - - - - - @@ -490,18 +504,6 @@ #else - - - - - - - - - - - - diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css index 60c0c1472ffc..59c55e10e113 100644 --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css @@ -677,10 +677,6 @@ wizardpage { overflow: auto; } -.wizard-header { - -moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-header"); -} - .wizard-buttons { -moz-binding: url("chrome://global/content/bindings/wizard.xml#wizard-buttons"); } diff --git a/toolkit/mozapps/update/content/updates.xml b/toolkit/mozapps/update/content/updates.xml index 6f6f8e0ffd42..cc9e76908384 100644 --- a/toolkit/mozapps/update/content/updates.xml +++ b/toolkit/mozapps/update/content/updates.xml @@ -8,7 +8,7 @@ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xbl="http://www.mozilla.org/xbl"> - +