Incorrect count for selected cookies shown under some circumstances

RESOLVED FIXED in Firefox 37

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: aryx, Assigned: aryx)

Tracking

Trunk
Firefox 37
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Bug 1118226 added the ability to have the count of selected cookies in the "Remove individual cookies" dialog in the button label for removing the selected ones (required by some localizations).

Unfortunately, the number is sometimes wrong, e.g. open a folder, select a cookie, and then select the folder. The count will always be 2.
Comment on attachment 8546656 [details] [diff] [review]
patch, v1

This patch is larger than I expected and I'm not sure I agree with your changes...

Can't you just remove "&& !item.open" here:

>-        if (item.container && !item.open)
>-          selectedCookieCount += item.cookies.length;
>-        else if (!item.container)
>-          ++selectedCookieCount;

And remove these lines:

>-    var item = this._view._getItemAtIndex(seln.currentIndex);
>-    if (item && seln.count == 1 && item.container && item.open)
>-      selectedCookieCount += 2;

?
Attachment #8546656 - Flags: review?(dao)
Posted patch patch, v2Splinter Review
Attachment #8546656 - Attachment is obsolete: true
Attachment #8546792 - Flags: review?(dao)
Comment on attachment 8546792 [details] [diff] [review]
patch, v2

thanks!
Attachment #8546792 - Flags: review?(dao) → review+
https://hg.mozilla.org/mozilla-central/rev/9beacf61fe3d
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
You need to log in before you can comment on or make changes to this bug.