Closed Bug 273698 Opened 20 years ago Closed 20 years ago

removing an item from sites/cookie exceptions list leaves a blank line in the tree

Categories

(Firefox :: Settings UI, defect, P3)

defect

Tracking

()

VERIFIED WORKSFORME
Firefox1.5

People

(Reporter: steffen.wilberg, Assigned: Gavin)

References

Details

Attachments

(1 file)

Spin-off from bug 272678 comment 10.

This happens with Firefox 1.0 as well as trunk.

1. Open Options->Web Features->Allowed Sites.
2. If the exceptions dialog is empty, create a few items.
3. Delete the last item.

Actual Result:
The blank line after the last item is selected.

Expected Result:
The last item is selected.


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

And then this error every time you mouse over the blank line:
Error: gPermissionManager._addedPermissions[aRow] has no properties
Source File: chrome://browser/content/cookieviewer/CookieExceptions.js
Line: 32
(and line 34)
The reason is that treeUtils.js does this:
  view.rowCount -= k - j;
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/cookieviewer/content/treeUtils.js&mark=64#43

But CookieExceptions.js only provides _rowCount, not rowCount. I don't know what
the tree code does, or why CookieExceptions.js uses _rowCount, but this bug can
be fixed by changing all instances of _rowCount to rowCount in
CookieExceptions.js, or even by deleting the view.rowCount -= k - j; line in
treeUtils.js. Maybe the tree widget refactoring bug 221619 made it obsolete?
*** Bug 271671 has been marked as a duplicate of this bug. ***
*** Bug 270341 has been marked as a duplicate of this bug. ***
Attached patch Add the setterSplinter Review
I think the safest route is to just provide the public setter. I haven't
actually gotten deep into the tree code but this fixes it and shouldn't break
anything. rowCount is apparently used at
http://lxr.mozilla.org/mozilla/source/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp#1413
to redisplay the tree, or something of the sort. Is there someone familiar with
the tree code that could advise?

This should also fix the DeleteAll function, which according to
http://lxr.mozilla.org/mozilla/source/browser/components/cookieviewer/content/treeUtils.js#32
should probably be broken.
Assignee: firefox → gavin.sharp
Status: NEW → ASSIGNED
Attachment #169583 - Flags: review?(mconnor)
The checkin from bug 215656 introduced the error.
Whiteboard: [have patch]
Flags: blocking-aviary1.1?
Priority: -- → P3
Whiteboard: [have patch] → [patch-r?]
Target Milestone: --- → Firefox1.1
*** Bug 281998 has been marked as a duplicate of this bug. ***
Summary: removing an item from sites/exceptions list leaves a blank line in the tree → removing an item from sites/cookie exceptions list leaves a blank line in the tree
This was fixed by Ben's new pref dialog.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Flags: blocking-aviary1.1?
Resolution: --- → WORKSFORME
Attachment #169583 - Flags: review?(mconnor)
Whiteboard: [patch-r?]
*** Bug 295385 has been marked as a duplicate of this bug. ***
Status: RESOLVED → VERIFIED
*** Bug 305856 has been marked as a duplicate of this bug. ***
*** Bug 306923 has been marked as a duplicate of this bug. ***
*** Bug 277629 has been marked as a duplicate of this bug. ***
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs,
filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → preferences
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: