Make deleteFromSitesList select the "All Sites" entry rather than hiding stuff manually

RESOLVED FIXED

Status

()

Firefox
Preferences
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Margaret, Assigned: Margaret)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-cedar)

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

6 years ago
From bug 573176 comment 50:

>+  deleteFromSitesList: function(aHost) {
>+    for each (let site in this._sites) {
>+      if (site.host.hasRootDomain(aHost)) {
>+        if (site == this._selectedSite) {
>+          // Clear site data from the DOM to maximize privacy.

Wouldn't it be better to just set selectedItem to "all sites" entry? You could then move the site-label label clearing into onSitesListSelect, and get rid of the permissions-box hiding stuff.
(Assignee)

Updated

6 years ago
Blocks: 573176
(Assignee)

Comment 1

6 years ago
Created attachment 534001 [details] [diff] [review]
patch

I'm sorry I misunderstood your review comment in bug 573176. This was easy to fix.
Assignee: nobody → margaret.leibovic
Status: NEW → ASSIGNED
Attachment #534001 - Flags: review?(gavin.sharp)
(Assignee)

Comment 2

6 years ago
Created attachment 534007 [details] [diff] [review]
patch v2

This patch keeps the label-clearing functionality, but moves it to onSitesListSelect like you suggested.
Attachment #534001 - Attachment is obsolete: true
Attachment #534001 - Flags: review?(gavin.sharp)
Attachment #534007 - Flags: review?(gavin.sharp)
Comment on attachment 534007 [details] [diff] [review]
patch v2

by "get rid of the permissions-box hiding stuff" I also meant the .hidden=false in updatePermissionsBox and the hidden="true" in the XUL. r=me with those removed too.
Attachment #534007 - Flags: review?(gavin.sharp) → review+
(Assignee)

Comment 4

6 years ago
Created attachment 534034 [details] [diff] [review]
patch for check-in
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
http://hg.mozilla.org/projects/cedar/rev/7b0c4c9fe637
Flags: in-testsuite?
Keywords: checkin-needed
Whiteboard: fixed-in-cedar
http://hg.mozilla.org/mozilla-central/rev/7b0c4c9fe637
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.