Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #32265 from arcturus/bug-1211582
Browse files Browse the repository at this point in the history
Bug 1211582 Performance regression in contacts: dont add iframe, as i…
  • Loading branch information
arcturus committed Oct 6, 2015
2 parents 217b274 + a379838 commit 59fd122
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion apps/communications/contacts/index.html
Expand Up @@ -259,6 +259,5 @@ <h1 id="edit-title" data-l10n-id="contacts"></h1>
<section is="ice-view" id="ice-view" role="region" class="view view-right hidden"></section>
<section is="multiple-select-view" id="multiple-select-view" role="region" class="view hidden"></section>
<gaia-sim-picker id="sim-picker" tabindex="-1"></gaia-sim-picker>
<iframe id="iframe_curtain" src="/shared/pages/import/curtain.html"></iframe>
</body>
</html>
7 changes: 5 additions & 2 deletions shared/pages/import/js/curtain.js
Expand Up @@ -22,14 +22,16 @@ var Curtain = (function() {
parent.document.body.appendChild(curtainFrame);
}

var doc = curtainFrame.contentDocument;
function getDoc() {
return curtainFrame.contentWindow.document;
}

var cpuWakeLock, cancelButton, retryButton, okButton, progressElement, form,
progressTitle;
var messages = [];
var elements = ['error', 'timeout', 'wait', 'message', 'progress', 'alert'];

if (doc.readyState === 'complete') {
if (getDoc().readyState === 'complete') {
init();
} else {
// The curtain could not be loaded at this moment
Expand All @@ -40,6 +42,7 @@ var Curtain = (function() {
}

function init() {
var doc = getDoc();
cancelButton = doc.querySelector('#cancel');
retryButton = doc.querySelector('#retry');
okButton = doc.querySelector('#ok');
Expand Down

0 comments on commit 59fd122

Please sign in to comment.