Closed Bug 503029 Opened 15 years ago Closed 15 years ago

remove effectively-dead code that sets the host in the status bar's security button

Categories

(Firefox :: General, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Firefox 3.6a1

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
      No description provided.
Attachment #387397 - Flags: review?(gavin.sharp)
Attachment #387397 - Flags: review?(gavin.sharp) → review-
Comment on attachment 387397 [details] [diff] [review]
patch

>diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css

>+/* There's no label for the security UI in the status bar. */
> #security-button > label {

Shouldn't we just change security-button to be a statusbarpanel-iconic rather than a statusbarpanel-iconic-text?

>diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js

>+#ifdef DEBUG
>     try {
>       this._host = gBrowser.contentWindow.location.host;
>     } catch(ex) {
>       this._host = null;
>     }
>+#endif

If we're not actually using _host for anything anymore, this code and the debug assertion is useless, right?

>-#security-button {
>-  min-width: 20px;
>-  -moz-box-direction: reverse;
>-}

Why remove these?
(In reply to comment #1)
> If we're not actually using _host for anything anymore, this code and the debug
> assertion is useless, right?

It seems to verify that _hostChanged is correctly false. The early return doesn't only affect the host, but also the rest of the UI.

> >-#security-button {
> >-  min-width: 20px;
> >-  -moz-box-direction: reverse;
> >-}
> 
> Why remove these?

DOMi says the width exceeds 20px anyway, and box-direction:reverse makes sense only if there's a label.
Attached patch patch v2Splinter Review
using statusbarpanel-iconic now. I'm indifferent about the debug code.
Attachment #387397 - Attachment is obsolete: true
Attachment #387667 - Flags: review?(gavin.sharp)
Comment on attachment 387667 [details] [diff] [review]
patch v2

(In reply to comment #2)
> It seems to verify that _hostChanged is correctly false. The early return
> doesn't only affect the host, but also the rest of the UI.

Good point! Doesn't hurt to keep it I guess.
Attachment #387667 - Flags: review?(gavin.sharp) → review+
http://hg.mozilla.org/mozilla-central/rev/2acc8c5989ae
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.6a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: