mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 1323600 - Some fields have been converted to properties and won't reset anymore when the binding is recreated. r=mossop
MozReview-Commit-ID: CHxBFpbW6aS --HG-- extra : rebase_source : caa8602ca6e0648b8f52e8de9c430298528d3286
This commit is contained in:
parent
975f9b571e
commit
96cd40a062
@ -69,8 +69,15 @@
|
|||||||
|
|
||||||
<!-- =================== nsIAutoCompleteInput =================== -->
|
<!-- =================== nsIAutoCompleteInput =================== -->
|
||||||
|
|
||||||
|
<field name="_popup">null</field>
|
||||||
<property name="popup" readonly="true">
|
<property name="popup" readonly="true">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
|
// Memoize the result in a field rather than replacing this property,
|
||||||
|
// so that it can be reset along with the binding.
|
||||||
|
if (this._popup) {
|
||||||
|
return this._popup;
|
||||||
|
}
|
||||||
|
|
||||||
let popup = null;
|
let popup = null;
|
||||||
let popupId = this.getAttribute("autocompletepopup");
|
let popupId = this.getAttribute("autocompletepopup");
|
||||||
if (popupId) {
|
if (popupId) {
|
||||||
@ -86,14 +93,7 @@
|
|||||||
}
|
}
|
||||||
popup.mInput = this;
|
popup.mInput = this;
|
||||||
|
|
||||||
// Avoid having to recalculate the popup property each time
|
return this._popup = popup;
|
||||||
Object.defineProperty(this, "popup", {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
writable: true,
|
|
||||||
value: popup
|
|
||||||
});
|
|
||||||
return popup;
|
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
@ -347,8 +347,15 @@
|
|||||||
</setter>
|
</setter>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<field name="_tabbox">null</field>
|
||||||
<property name="tabbox" readonly="true">
|
<property name="tabbox" readonly="true">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
|
// Memoize the result in a field rather than replacing this property,
|
||||||
|
// so that it can be reset along with the binding.
|
||||||
|
if (this._tabbox) {
|
||||||
|
return this._tabbox;
|
||||||
|
}
|
||||||
|
|
||||||
let parent = this.parentNode;
|
let parent = this.parentNode;
|
||||||
while (parent) {
|
while (parent) {
|
||||||
if (parent.localName == "tabbox") {
|
if (parent.localName == "tabbox") {
|
||||||
@ -357,14 +364,7 @@
|
|||||||
parent = parent.parentNode;
|
parent = parent.parentNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid having to recalculate the tabbox property each time
|
return this._tabbox = parent;
|
||||||
Object.defineProperty(this, "tabbox", {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
writable: true,
|
|
||||||
value: parent
|
|
||||||
});
|
|
||||||
return parent;
|
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
@ -642,8 +642,15 @@
|
|||||||
</method>
|
</method>
|
||||||
|
|
||||||
<!-- public -->
|
<!-- public -->
|
||||||
|
<field name="_tabbox">null</field>
|
||||||
<property name="tabbox" readonly="true">
|
<property name="tabbox" readonly="true">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
|
// Memoize the result in a field rather than replacing this property,
|
||||||
|
// so that it can be reset along with the binding.
|
||||||
|
if (this._tabbox) {
|
||||||
|
return this._tabbox;
|
||||||
|
}
|
||||||
|
|
||||||
let parent = this.parentNode;
|
let parent = this.parentNode;
|
||||||
while (parent) {
|
while (parent) {
|
||||||
if (parent.localName == "tabbox") {
|
if (parent.localName == "tabbox") {
|
||||||
@ -652,14 +659,7 @@
|
|||||||
parent = parent.parentNode;
|
parent = parent.parentNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid having to recalculate the tabbox property each time
|
return this._tabbox = parent;
|
||||||
Object.defineProperty(this, "tabbox", {
|
|
||||||
configurable: true,
|
|
||||||
enumerable: true,
|
|
||||||
writable: true,
|
|
||||||
value: parent
|
|
||||||
});
|
|
||||||
return parent;
|
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user