Bug 1584627 - Remove ensureXBLBindingAttached from tabprompts.jsm. r=bgrins

This is unnecessary now that XBL bindings are not used anymore.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Paolo Amadini 2019-10-29 18:32:40 +00:00
Родитель 298a7195c8
Коммит cac70e35cc
3 изменённых файлов: 1 добавлений и 21 удалений

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

@ -9448,7 +9448,6 @@ TabModalPromptBox.prototype = {
let prompt = prompts[prompts.length - 1];
prompt.element.hidden = false;
// Because we were hidden before, this won't have been possible, so do it now:
prompt.ensureXBLBindingAttached();
prompt.Dialog.setDefaultFocus();
} else {
browser.removeAttribute("tabmodalPromptShowing");

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

@ -247,20 +247,6 @@ var TabModalPrompt = class {
this.onResize();
}
// Sadly this is needed to ensure all the bindings inside the <tabmodalprompt>
// are attached. This method had to be called by CommonDialog.jsm after
// it had set the visibility of each of the elements.
ensureXBLBindingAttached() {
for (let key in this.ui) {
if (this.ui[key] instanceof this.win.XULElement) {
if (this.ui[key].hidden) {
continue;
}
this.ui[key].clientTop;
}
}
}
shutdownPrompt() {
// remove our event listeners
try {

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

@ -176,12 +176,7 @@ CommonDialog.prototype = {
}
if (!this.ui.promptContainer || !this.ui.promptContainer.hidden) {
// For tab prompts, we will need to ensure its content bindings are attached.
if (!xulDialog) {
this.ui.prompt.ensureXBLBindingAttached();
}
// Set default focus / selection.
// Set default focus and select textbox contents if applicable.
this.setDefaultFocus(true);
}