Closed Bug 842015 Opened 7 years ago Closed 7 years ago

Normal tabs are converted to private tabs

Categories

(Firefox for Android :: General, defect)

ARM
Android
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 22
Tracking Status
firefox20 + verified
firefox21 + verified
firefox22 --- verified
fennec 20+ ---

People

(Reporter: yves.dessertine2, Assigned: jdm)

References

Details

(Keywords: regression, reproducible)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:18.0) Gecko/20100101 Firefox/18.0
Build ID: 20130201185928

Steps to reproduce:

Tested on a Galaxy S3 w/ Android 4.1.2 stock rom, french, on Wifi connection

1) Kill Nightly process Android App Manager
2) Open Nightly
3) Navigate to http://m.pcinpact.com (using awesome screen)
4) Long press on any link, then select "Open Link in Private Tab"
5) Switch to that private tab and click on a link. (Page opens in *ANOTHER* private tab.  -- Bug?)
6) Close the two private tabs by swiping them away. You return to the "normal" tab
7) Long press on a link



Actual results:

"Open Link in Private Tab" not present in menu


Expected results:

"Open Link in Private Tab" present in menu
OS: Linux → Android
Hardware: x86 → ARM
Sorry, correction:
========
Actual results:

"Open Link in New Tab" not present in menu


Expected results:

"Open Link in New Tab" present in menu
Assignee: nobody → bnicholson
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Ever confirmed: true
Keywords: reproducible
(In reply to Kevin Brosnan [:kbrosnan] from comment #2)
> bug 826487?


No. Bug 826487 is just a label change.
Bug 842015 is still reproducible in 21.0a1 (2013-02-19)
Bug 826644 added code to hide "Open Link in New Tab" when in a private tab. Seems like a regression from that code.
Status: NEW → ASSIGNED
Keywords: regression
tracking-fennec: ? → 20+
This is not a bug from bug 826644. I can reproduce this without using this context menu item at all:

1) Open http://m.pcinpact.com in a normal tab
2) Open http://m.pcinpact.com in a private tab
3) In the private tab, click one of the links, then click a link on the following page (which should result in a new private tab being opened)

At this point, the normal tab from step 1 is somehow converted to a private browsing tab (even though this isn't apparent in the tabs tray UI).
Blocks: pb
No longer blocks: 826644
Summary: "Open Link in New Tab" menu item disappears after using Private browsing → Normal tabs are converted to private tabs
I don't know how useful this is, but commenting out this line makes the problem go away: http://hg.mozilla.org/mozilla-central/file/885cde564ff3/docshell/base/nsDocShell.cpp#l2087. I wonder if the docshell of the non-private tab is somehow being set as a child docshell of the private tab...?

Josh, will you be able to take a look at this?
Flags: needinfo?(josh)
Assignee: bnicholson → josh
Flags: needinfo?(josh)
Blocks: PBnGen
Comment on attachment 717371 [details] [diff] [review]
Avoid modifying the root docshell's privacy status when we aren't opening a new toplevel window.

r=me
Attachment #717371 - Flags: review?(bzbarsky) → review+
Thanks, Josh!

This needs to land on Aurora and Beta too.
Comment on attachment 717371 [details] [diff] [review]
Avoid modifying the root docshell's privacy status when we aren't opening a new toplevel window.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 795556
User impact if declined: Public tabs on mobile unexpectedly turn into private ones.
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): Potential for subtle edge case behaviour (private tabs in public windows or the reverse) in Firefox if the patch isn't correct. No alternatives.
String or UUID changes made by this patch: None.
Attachment #717371 - Flags: approval-mozilla-beta?
Attachment #717371 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/5b8a0abbd54c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
Comment on attachment 717371 [details] [diff] [review]
Avoid modifying the root docshell's privacy status when we aren't opening a new toplevel window.

Let's get this uplifted to beta right away so there's time to do testing around it and backout if need be, tracking as well so this stays on our radar.
Attachment #717371 - Flags: approval-mozilla-beta?
Attachment #717371 - Flags: approval-mozilla-beta+
Attachment #717371 - Flags: approval-mozilla-aurora?
Attachment #717371 - Flags: approval-mozilla-aurora+
Status: RESOLVED → VERIFIED
Keywords: qawanted, verifyme
Verified on Aurora 21.0a2 2013-03-14 and Firefox Mobile 20 beta 5 on the Smasung Galaxy Tab 2 7.0 (Android 4.1.1)
You need to log in before you can comment on or make changes to this bug.