Bug 1494846 - kill wizard-header binding, r=paolo

Differential Revision: https://phabricator.services.mozilla.com/D23391

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexander Surkov 2019-03-17 19:36:03 +00:00
Родитель 745b296ad4
Коммит 095a1cda92
3 изменённых файлов: 33 добавлений и 35 удалений

Просмотреть файл

@ -176,6 +176,30 @@
// get anonymous content references
this._wizardHeader = document.getAnonymousElementByAttribute(this, "anonid", "Header");
this._wizardHeader.appendChild(
MozXULElement.parseXULToFragment(/Mac/.test(navigator.platform) ?
`<stack class="wizard-header-stack" flex="1">
<vbox class="wizard-header-box-1">
<vbox class="wizard-header-box-text">
<label class="wizard-header-label"/>
</vbox>
</vbox>
<hbox class="wizard-header-box-icon">
<spacer flex="1"/>
<image class="wizard-header-icon"/>
</hbox>
</stack>` :
`<hbox class="wizard-header-box-1" flex="1">
<vbox class="wizard-header-box-text" flex="1">
<label class="wizard-header-label"/>
<label class="wizard-header-description"/>
</vbox>
<image class="wizard-header-icon"/>
</hbox>`
)
);
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");
}
]]></body>
</method>
@ -443,22 +473,6 @@
</binding>
#ifdef XP_MACOSX
<binding id="wizard-header">
<content>
<xul:stack class="wizard-header-stack" flex="1">
<xul:vbox class="wizard-header-box-1">
<xul:vbox class="wizard-header-box-text">
<xul:label class="wizard-header-label" xbl:inherits="xbl:text=label"/>
</xul:vbox>
</xul:vbox>
<xul:hbox class="wizard-header-box-icon">
<xul:spacer flex="1"/>
<xul:image class="wizard-header-icon" xbl:inherits="src=iconsrc"/>
</xul:hbox>
</xul:stack>
</content>
</binding>
<binding id="wizard-buttons">
<content>
<xul:vbox flex="1">
@ -490,18 +504,6 @@
#else
<binding id="wizard-header">
<content>
<xul:hbox class="wizard-header-box-1" flex="1">
<xul:vbox class="wizard-header-box-text" flex="1">
<xul:label class="wizard-header-label" xbl:inherits="xbl:text=label"/>
<xul:label class="wizard-header-description" xbl:inherits="xbl:text=description"/>
</xul:vbox>
<xul:image class="wizard-header-icon" xbl:inherits="src=iconsrc"/>
</xul:hbox>
</content>
</binding>
<binding id="wizard-buttons">
<content>
<xul:vbox class="wizard-buttons-box-1" flex="1">

Просмотреть файл

@ -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");
}

Просмотреть файл

@ -8,7 +8,7 @@
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="updateheader" extends="chrome://global/content/bindings/wizard.xml#wizard-header">
<binding id="updateheader">
<content>
<xul:hbox class="wizard-header update-header" flex="1">
<xul:vbox class="wizard-header-box-1">