From 797cc1670414f92244b4e47ab24db98a73ec8039 Mon Sep 17 00:00:00 2001 From: "hyatt%mozilla.org" Date: Mon, 4 Aug 2003 04:29:35 +0000 Subject: [PATCH] Work around persiustence bug. --- browser/base/content/web-panels.js | 12 ++++++++---- browser/base/content/web-panels.xul | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/browser/base/content/web-panels.js b/browser/base/content/web-panels.js index 0c876cab2b49..1454e0b93134 100644 --- a/browser/base/content/web-panels.js +++ b/browser/base/content/web-panels.js @@ -45,22 +45,26 @@ var panelProgressListener = { } }; +var gLoadCachedSrc = true; function loadWebPanel(aURI) { var panelBrowser = document.getElementById('web-panels-browser'); panelBrowser.removeAttribute("src"); panelBrowser.setAttribute("src", aURI); - panelBrowser.setAttribute("cachedsrc", aURI); + panelBrowser.setAttribute("cachedurl", aURI); + gLoadCachedSrc = false; } function load() { var panelBrowser = document.getElementById('web-panels-browser'); panelBrowser.webProgress.addProgressListener(panelProgressListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL); - if (panelBrowser.getAttribute("cachedsrc")) - panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedsrc")); + if (gLoadCachedSrc && panelBrowser.getAttribute("cachedurl")) { + panelBrowser.setAttribute("src", panelBrowser.getAttribute("cachedurl")); + } } function unload() { - document.getElementById('web-panels-browser').webProgress.removeProgressListener(panelProgressListener); + var panelBrowser = document.getElementById('web-panels-browser'); + panelBrowser.webProgress.removeProgressListener(panelProgressListener); } diff --git a/browser/base/content/web-panels.xul b/browser/base/content/web-panels.xul index 9813ad4a2f87..59d3296cf359 100644 --- a/browser/base/content/web-panels.xul +++ b/browser/base/content/web-panels.xul @@ -10,6 +10,6 @@