Bug 1370294 - Lazily create the iframe for the date time picker;r=mconley

MozReview-Commit-ID: Cn99obd86RB

--HG--
extra : rebase_source : 520c56042b3c83136f80c6a0ad585731fe272f36
This commit is contained in:
Brian Grinstead 2017-06-05 20:53:54 -07:00
Родитель 3782f0765c
Коммит 49e3f4a0c2
2 изменённых файлов: 11 добавлений и 4 удалений

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

@ -169,7 +169,6 @@
consumeoutsideclicks="false"
level="parent"
tabspecific="true">
<iframe id="dateTimePopupFrame"/>
</panel>
<!-- for select dropdowns. The menupopup is what shows the list of options,

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

@ -15,9 +15,17 @@
<stylesheet src="chrome://global/skin/datetimepopup.css"/>
</resources>
<implementation>
<field name="dateTimePopupFrame">
this.querySelector("#dateTimePopupFrame");
</field>
<property name="dateTimePopupFrame">
<getter>
let frame = this.querySelector("#dateTimePopupFrame");
if (!frame) {
frame = this.ownerDocument.createElement("iframe");
frame.id = "dateTimePopupFrame";
this.appendChild(frame);
}
return frame;
</getter>
</property>
<field name="TIME_PICKER_WIDTH" readonly="true">"12em"</field>
<field name="TIME_PICKER_HEIGHT" readonly="true">"21em"</field>
<field name="DATE_PICKER_WIDTH" readonly="true">"23.1em"</field>