Bug 1542844 - All wizards displays [Done] button from the point where they open on OS X, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D26734
This commit is contained in:
@@ -90,7 +90,7 @@ MozElements.MozElementMixin = Base => class MozElement extends Base {
|
||||
* based on the static `inheritedAttributes` Object. This can be overridden by callers.
|
||||
*/
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
if (!this.isConnectedAndReady || oldValue === newValue || !this.inheritedAttributesCache) {
|
||||
if (oldValue === newValue || !this.inheritedAttributesCache) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,33 @@
|
||||
<inherited-element-declarative foo="fuagra"></inherited-element-declarative>
|
||||
<inherited-element-shadowdom-declarative foo="fuagra"></inherited-element-shadowdom-declarative>
|
||||
<inherited-element-imperative foo="fuagra"></inherited-element-imperative>
|
||||
<inherited-element-beforedomloaded foo="fuagra"></inherited-element-beforedomloaded>
|
||||
|
||||
<!-- test code running before page load goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
class InheritAttrsChangeBeforDOMLoaded extends MozXULElement {
|
||||
static get inheritedAttributes() {
|
||||
return {
|
||||
"label": "foo",
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
this.append(MozXULElement.parseXULToFragment(`<label />`));
|
||||
this.label = this.querySelector("label");
|
||||
|
||||
this.initializeAttributeInheritance();
|
||||
is(this.label.getAttribute("foo"), "fuagra",
|
||||
"InheritAttrsChangeBeforDOMLoaded: attribute should be propagated #1");
|
||||
|
||||
this.setAttribute("foo", "chuk&gek");
|
||||
is(this.label.getAttribute("foo"), "chuk&gek",
|
||||
"InheritAttrsChangeBeforDOMLoaded: attribute should be propagated #2");
|
||||
}
|
||||
}
|
||||
customElements.define("inherited-element-beforedomloaded",
|
||||
InheritAttrsChangeBeforDOMLoaded);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
||||
@@ -61,8 +61,7 @@ class MozWizardButtons extends MozXULElement {
|
||||
|
||||
static get inheritedAttributes() {
|
||||
return AppConstants.platform == "macosx" ? {
|
||||
"[dlgtype='finish']": "hidefinishbutton",
|
||||
"[dlgtype='next']": "lastpage",
|
||||
"[dlgtype='next']": "hidden=lastpage",
|
||||
} : null;
|
||||
}
|
||||
|
||||
@@ -144,8 +143,7 @@ class MozWizardButtons extends MozXULElement {
|
||||
|
||||
onPageChange() {
|
||||
if (AppConstants.platform == "macosx") {
|
||||
this.setAttribute("hidefinishbutton",
|
||||
!(this.getAttribute("lastpage") == "true"));
|
||||
this.getButton("finish").hidden = !(this.getAttribute("lastpage") == "true");
|
||||
} else if (this.getAttribute("lastpage") == "true") {
|
||||
this._wizardButtonDeck.setAttribute("selectedIndex", 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user