diff --git a/extensions/cookie/nsCookie.cpp b/extensions/cookie/nsCookie.cpp index c538c013cfd..89278ce5096 100644 --- a/extensions/cookie/nsCookie.cpp +++ b/extensions/cookie/nsCookie.cpp @@ -2578,6 +2578,7 @@ COOKIE_CookieViewerReturn(nsAutoString results) { /* step through all cookies and delete those that are in the sequence */ char * gone = cookie_FindValueInArgs(results, "|goneC|"); + char * block = cookie_FindValueInArgs(results, "|block|"); cookie_LockList(); if (cookie_cookieList) { count = cookie_cookieList->Count(); @@ -2585,6 +2586,11 @@ COOKIE_CookieViewerReturn(nsAutoString results) { count--; cookie = NS_STATIC_CAST(cookie_CookieStruct*, cookie_cookieList->ElementAt(count)); if (cookie && cookie_InSequence(gone, count)) { + if (PL_strlen(block) && block[0]=='t') { + char * hostname = nsnull; + StrAllocCopy(hostname, cookie->host); + permission_Add(hostname, PR_FALSE, COOKIEPERMISSION, PR_TRUE); + } cookie_FreeCookie(cookie); cookie_cookiesChanged = PR_TRUE; } @@ -2593,6 +2599,7 @@ COOKIE_CookieViewerReturn(nsAutoString results) { cookie_Save(); cookie_UnlockList(); nsCRT::free(gone); + nsCRT::free(block); /* step through all permissions and delete those that are in the sequence */ for (PRInt32 type = 0; type < NUMBER_OF_PERMISSIONS; type++) { diff --git a/extensions/wallet/cookieviewer/CookieViewer.dtd b/extensions/wallet/cookieviewer/CookieViewer.dtd index d0e24dde02c..b7d2d40ca28 100644 --- a/extensions/wallet/cookieviewer/CookieViewer.dtd +++ b/extensions/wallet/cookieviewer/CookieViewer.dtd @@ -31,3 +31,5 @@ + + diff --git a/extensions/wallet/cookieviewer/CookieViewer.js b/extensions/wallet/cookieviewer/CookieViewer.js index cb208f1f992..c94620601cf 100644 --- a/extensions/wallet/cookieviewer/CookieViewer.js +++ b/extensions/wallet/cookieviewer/CookieViewer.js @@ -347,7 +347,7 @@ function DeletePermissionSelected() function DeleteAllPermissions() { // delete selected item - gone_p += DeleteAllItems(permissions.length, "permtree_", "permissionlist"); + gone_p += DeleteAllItems(permissions.length, "permtree_", "permissionslist"); if( !document.getElementById("removePermissions").disabled ) { document.getElementById("removePermissions").setAttribute("disabled", "true") } @@ -439,7 +439,8 @@ function DeleteAllImages() { // function : ::doOKButton(); // purpose : saves the changed settings and closes the dialog. function onOK(){ - var result = "|goneC|" + gone_c + "|goneP|" + gone_p + "|goneI|" + gone_i+ "|"; + var result = "|goneC|" + gone_c + "|goneP|" + gone_p + "|goneI|" + gone_i + + "|block|" + document.getElementById("checkbox").checked +"|"; cookieviewer.SetValue(result, window); return true; }