Closed Bug 305856 Opened 19 years ago Closed 19 years ago

Non-continguous cookie Exception deletion causes Exception list to show gap

Categories

(Firefox :: Settings UI, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 273698

People

(Reporter: dasnyderx, Unassigned)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

If two or more non-contiguous sites from the cookie Exceptions dialog are
selected and the 'Remove' button is clicked, the list of sites in the
permissionsTree doesn't properly collapse to fill-in the deleted cookie
exception sites.

Reproducible: Always

Steps to Reproduce:
1. Click 'Edit->Preferences'
2. Click 'Privacy'
3. Click the twisty next to 'Cookies'.
4. Click 'Exceptions'
5. Select two or more non-contiguous sites in the Exception dialog permissionsTree.
6. Click 'Remove Site'.

For example, if the pre-deletion cookie permissionsTree is:
 aaa.aaaa.com
 bbb.bbbb.com
 ddd.dddd.com
 eee.eeee.com
 fff.ffff.com

And the following non-continguous selections are made:
 <selection>aaa.aaaa.com</selection>
 bbb.bbbb.com
 <selection>ddd.dddd.com</selection>
 eee.eeee.com
 fff.ffff.com


Actual Results:  
Actual post-'Remove Site' button click:
 bbb.bbbb.com
 
 eee.eeee.com
 fff.ffff.com


Expected Results:  
Expected post-'Remove Site' button click:
 bbb.bbbb.com
 eee.eeee.com
 fff.ffff.com


The following errors showed up in the JavaScript Console:

Error: setting a property that has only a getter
Source File: chrome://browser/content/cookieviewer/treeUtils.js
Line: 43

Further errors of the type also occured:

Error: gPermissionManager._addedPermissions[aRow] has no properties
Source File: chrome://browser/content/cookieviewer/CookieExceptions.js
Line: 32
--------------------------------------------------------------------------
Error: gPermissionManager._addedPermissions[aRow] has no properties
Source File: chrome://browser/content/cookieviewer/CookieExceptions.js
Line: 34

The particular line in treeUtils.js which errors out is:
 view.rowCount -= k - j;
Unfortunately, rowCount (in nsITreeView.idl) is *readonly*.  Therefore, that's
why the error occurs.
Fixed by the new prefs dialog.

*** This bug has been marked as a duplicate of 273698 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.