Last Comment Bug 658555 - Make deleteFromSitesList select the "All Sites" entry rather than hiding stuff manually
: Make deleteFromSitesList select the "All Sites" entry rather than hiding stuf...
Status: RESOLVED FIXED
fixed-in-cedar
:
Product: Firefox
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: :Margaret Leibovic
:
Mentors:
Depends on:
Blocks: 573176
  Show dependency treegraph
 
Reported: 2011-05-20 09:13 PDT by :Margaret Leibovic
Modified: 2011-05-21 17:36 PDT (History)
3 users (show)
bzbarsky: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.40 KB, patch)
2011-05-20 09:28 PDT, :Margaret Leibovic
no flags Details | Diff | Review
patch v2 (3.02 KB, patch)
2011-05-20 09:43 PDT, :Margaret Leibovic
gavin.sharp: review+
Details | Diff | Review
patch for check-in (4.50 KB, patch)
2011-05-20 11:12 PDT, :Margaret Leibovic
no flags Details | Diff | Review

Description :Margaret Leibovic 2011-05-20 09:13:27 PDT
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.
Comment 1 :Margaret Leibovic 2011-05-20 09:28:19 PDT
Created attachment 534001 [details] [diff] [review]
patch

I'm sorry I misunderstood your review comment in bug 573176. This was easy to fix.
Comment 2 :Margaret Leibovic 2011-05-20 09:43:29 PDT
Created attachment 534007 [details] [diff] [review]
patch v2

This patch keeps the label-clearing functionality, but moves it to onSitesListSelect like you suggested.
Comment 3 :Gavin Sharp [email: gavin@gavinsharp.com] 2011-05-20 11:06:29 PDT
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.
Comment 4 :Margaret Leibovic 2011-05-20 11:12:33 PDT
Created attachment 534034 [details] [diff] [review]
patch for check-in
Comment 5 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-05-20 19:48:16 PDT
http://hg.mozilla.org/projects/cedar/rev/7b0c4c9fe637
Comment 6 Daniel Holbert [:dholbert] 2011-05-21 17:36:30 PDT
http://hg.mozilla.org/mozilla-central/rev/7b0c4c9fe637

Note You need to log in before you can comment on or make changes to this bug.