Closed Bug 1119747 Opened 6 years ago Closed 6 years ago

Incorrect count for selected cookies shown under some circumstances

Categories

(Firefox :: Preferences, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 37

People

(Reporter: aryx, Assigned: aryx)

Details

Attachments

(1 file, 1 obsolete file)

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)
Attached 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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
You need to log in before you can comment on or make changes to this bug.