bug 135046, remove p3p performance penalty, r=dp, sr=waterson, a=asa, adt=putterman

This commit is contained in:
morse%netscape.com 2006-07-27 14:56:35 +00:00
Родитель 50eab2a199
Коммит 6859f0672b
1 изменённых файлов: 12 добавлений и 10 удалений

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

@ -54,16 +54,18 @@
}
}
function TestIconVisibility() {
var cookieservice = Components.classes["@mozilla.org/cookieService;1"].getService();
cookieservice = cookieservice.QueryInterface(Components.interfaces.nsICookieService);
if (cookieservice.cookieIconIsVisible) {
var cookieIcon = document.getElementById("privacy-button");
if (cookieIcon) {
cookieIcon.removeAttribute("hidden");
var listener = {
handleEvent: function(event) {
var cookieservice = Components.classes["@mozilla.org/cookieService;1"].getService();
cookieservice = cookieservice.QueryInterface(Components.interfaces.nsICookieService);
if (cookieservice.cookieIconIsVisible) {
var cookieIcon = document.getElementById("privacy-button");
if (cookieIcon) {
cookieIcon.removeAttribute("hidden");
}
}
}
}
};
function viewP3PDialog() {
if (!gObserverService) {
@ -96,8 +98,8 @@
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// determine whether or not cookie icon in this new window should be displayed
// we need to delay before displaying icon because it hasn't been created yet
setTimeout(TestIconVisibility, 0);
// we need to wait until window is created before displaying icon
addEventListener("load", listener, false);
}
}
]]>