Closed Bug 859326 Opened 11 years ago Closed 11 years ago

New Private Window entry in right click Dock Icon menu doesn't make sense in permanent private browsing

Categories

(Firefox :: Private Browsing, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 23

People

(Reporter: tiziana, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

Steps to reproduce:
1. Single Right Click the Firefox dock Icon on Permanent Private Browsing mode.

Actual results:
We see "New Window" and "New Private Window" menu and they both open a private window.

Expected results:
The "New Window" menu is not necessary.

I have tested that on 
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:22.0) Gecko/20130407 Firefox/22.0
Build ID: 20130407004016 

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0
Build ID: 20130401192816

and the current Firefox 20 on release channel.
This is a simple matter of adding another entry to the list in the patch in bug 845592. The mac dock menu is defined at http://mxr.mozilla.org/mozilla-central/source/browser/base/content/macBrowserOverlay.xul?force=1#55.
Whiteboard: [mentor=jdm][lang=js]
(In reply to Josh Matthews [:jdm] from comment #1)
> This is a simple matter of adding another entry to the list in the patch in
> bug 845592. The mac dock menu is defined at
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/
> macBrowserOverlay.xul?force=1#55.

Hmm, no, since we need a special case for non-browser windows...  Patch coming up.
Whiteboard: [mentor=jdm][lang=js]
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #734651 - Flags: review?(josh)
Comment on attachment 734651 [details] [diff] [review]
Patch (v1)

Review of attachment 734651 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/browser.js
@@ +1807,5 @@
>  
>      SocialUI.nonBrowserWindowInit();
>  
> +    if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
> +      document.getElementById("macDockMenuNewWindow").hidden = true;

Will this break on non-mac platforms, or does the menu always exist somewhere?
(In reply to Josh Matthews [:jdm] from comment #4)
> Comment on attachment 734651 [details] [diff] [review]
> Patch (v1)
> 
> Review of attachment 734651 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: browser/base/content/browser.js
> @@ +1807,5 @@
> >  
> >      SocialUI.nonBrowserWindowInit();
> >  
> > +    if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
> > +      document.getElementById("macDockMenuNewWindow").hidden = true;
> 
> Will this break on non-mac platforms, or does the menu always exist
> somewhere?

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#1756
I don't know what to make of that link. Looking elsewhere, it appears that the overlay usually only exists on OS X.
(In reply to Josh Matthews [:jdm] from comment #6)
> I don't know what to make of that link. Looking elsewhere, it appears that
> the overlay usually only exists on OS X.

The entire block of code that I patched in browser.js is Mac only, so this won't break on non-Mac platforms (the patch should be a full no-op there.)
Comment on attachment 734651 [details] [diff] [review]
Patch (v1)

Review of attachment 734651 [details] [diff] [review]:
-----------------------------------------------------------------

Ah. Apologies for being dense.
Attachment #734651 - Flags: review?(josh) → review+
https://hg.mozilla.org/mozilla-central/rev/faf3b775851c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: