зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
975f9b571e
Коммит
96cd40a062
|
@ -69,8 +69,15 @@
|
|||
|
||||
<!-- =================== nsIAutoCompleteInput =================== -->
|
||||
|
||||
<field name="_popup">null</field>
|
||||
<property name="popup" readonly="true">
|
||||
<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 popupId = this.getAttribute("autocompletepopup");
|
||||
if (popupId) {
|
||||
|
@ -86,14 +93,7 @@
|
|||
}
|
||||
popup.mInput = this;
|
||||
|
||||
// Avoid having to recalculate the popup property each time
|
||||
Object.defineProperty(this, "popup", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: popup
|
||||
});
|
||||
return popup;
|
||||
return this._popup = popup;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
|
|
|
@ -347,8 +347,15 @@
|
|||
</setter>
|
||||
</property>
|
||||
|
||||
<field name="_tabbox">null</field>
|
||||
<property name="tabbox" readonly="true">
|
||||
<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;
|
||||
while (parent) {
|
||||
if (parent.localName == "tabbox") {
|
||||
|
@ -357,14 +364,7 @@
|
|||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
// Avoid having to recalculate the tabbox property each time
|
||||
Object.defineProperty(this, "tabbox", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: parent
|
||||
});
|
||||
return parent;
|
||||
return this._tabbox = parent;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
|
@ -642,8 +642,15 @@
|
|||
</method>
|
||||
|
||||
<!-- public -->
|
||||
<field name="_tabbox">null</field>
|
||||
<property name="tabbox" readonly="true">
|
||||
<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;
|
||||
while (parent) {
|
||||
if (parent.localName == "tabbox") {
|
||||
|
@ -652,14 +659,7 @@
|
|||
parent = parent.parentNode;
|
||||
}
|
||||
|
||||
// Avoid having to recalculate the tabbox property each time
|
||||
Object.defineProperty(this, "tabbox", {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value: parent
|
||||
});
|
||||
return parent;
|
||||
return this._tabbox = parent;
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче