Closed
Bug 816527
Opened 13 years ago
Closed 13 years ago
In per-window private browsing switch-to-tab should not show tabs from private windows
Categories
(Firefox :: Private Browsing, defect)
Tracking
()
VERIFIED
FIXED
Firefox 20
People
(Reporter: sdrocking, Assigned: ehsan.akhgari)
References
(Depends on 2 open bugs)
Details
(Whiteboard: [testday-20130104])
Attachments
(1 file, 3 obsolete files)
8.90 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
Bug seen on UX hourly with PB enabled.
Assignee | ||
Comment 1•13 years ago
|
||
Hmm, I'm pretty sure that I had filed this bug before, but now I can't find it. Josh, have you seen that bug, or am I just imagining things?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•13 years ago
|
||
Apparently I have not filed that bug!
Assignee | ||
Comment 3•13 years ago
|
||
(The description of this patch comes in the commit message.)
Comment 4•13 years ago
|
||
Comment on attachment 686979 [details] [diff] [review]
Patch (v1)
I'm not sure I understand the reasoning behind disabling switch-to-tab in private browsing windows. Isn't it enough to make sure that the private tabs aren't ever offered? What's the downside to exposing non-private tabs for easy access from private windows? Removing that would remove the need for an additional gross autocompletesearchparam hack, which would be nice :)
Similarly, you could just make switchIfURIInWindow only check aWindow's private browsing state (and return false if it's true).
Blair should probably review the adjusted patch here.
Attachment #686979 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to comment #4)
> I'm not sure I understand the reasoning behind disabling switch-to-tab in
> private browsing windows. Isn't it enough to make sure that the private tabs
> aren't ever offered? What's the downside to exposing non-private tabs for easy
> access from private windows? Removing that would remove the need for an
> additional gross autocompletesearchparam hack, which would be nice :)
If we offer non-private suggestions for a tab that the user is trying to open in a private window, and they accept it, they may be under the false assumption that they're in private browsing mode when they switch to that tab, and this leads to confusion at best and data leakage at worst.
> Similarly, you could just make switchIfURIInWindow only check aWindow's private
> browsing state (and return false if it's true).
I don't think that's what we want to allow. Tab switching between private and non-private windows is very error prone, since the tab switching UI has no indication of where the target is, so the user cannot make a good decision. We should protect them against both directions here.
Assignee | ||
Updated•13 years ago
|
Attachment #686979 -
Flags: review?(bmcbride)
Comment 6•13 years ago
|
||
Comment on attachment 686979 [details] [diff] [review]
Patch (v1)
In that case it seems like it would be simpler to have the front-end adjust its autocompletesearchparam to not include "enable-actions" in private browsing windows, rather than the current thing where it adds a "private" flag.
The comment in switchIfURIInWindow seems wrong, I think you want s/either/neither/.
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to comment #6)
> Comment on attachment 686979 [details] [diff] [review]
> --> https://bugzilla.mozilla.org/attachment.cgi?id=686979
> Patch (v1)
>
> In that case it seems like it would be simpler to have the front-end adjust its
> autocompletesearchparam to not include "enable-actions" in private browsing
> windows, rather than the current thing where it adds a "private" flag.
OK, I can do that, it's a very easy change to make, and make the patch a bit cleaner.
> The comment in switchIfURIInWindow seems wrong, I think you want
> s/either/neither/.
Right, will fix it.
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #687248 -
Flags: review?(bmcbride)
Assignee | ||
Updated•13 years ago
|
Attachment #686979 -
Attachment is obsolete: true
Attachment #686979 -
Flags: review?(bmcbride)
Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 687248 [details] [diff] [review]
Patch (v2)
Blair is out this week. Is there anyone else who can review this patch?
Attachment #687248 -
Flags: review?(gavin.sharp)
Attachment #687248 -
Flags: review?(dolske)
Attachment #687248 -
Flags: review?(bmcbride)
Comment 10•13 years ago
|
||
Comment on attachment 687248 [details] [diff] [review]
Patch (v2)
>diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
>+ if (!isBlankPageURL(aLocation.spec)
>+#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
>+ // Don't find this tab when finding a switch to tab candidate.
>+ && !PrivateBrowsingUtils.isWindowPrivate(window)
I'd rephrase the comment:
"Tabs in private windows aren't registered as "Open" so that they don't appear as switch-to-tab candidates."
>diff --git a/browser/base/content/test/browser_bug816527.js b/browser/base/content/test/browser_bug816527.js
This test is a bit hard to follow. Why is there a TabClose handler and an onload handler? Finding a way to avoid the setTimeout would also be good, but I haven't thought about it too much.
Assignee | ||
Comment 11•13 years ago
|
||
This patch fixes the comment, and adds an extensive comment to the test explaining what you were asking about.
Attachment #687248 -
Attachment is obsolete: true
Attachment #687248 -
Flags: review?(gavin.sharp)
Attachment #687248 -
Flags: review?(dolske)
Attachment #687963 -
Flags: review?(gavin.sharp)
Comment 12•13 years ago
|
||
The "aExpectSuccess" bit was confusing me. Since no callers pass true, can you just remove it?
Assignee | ||
Comment 13•13 years ago
|
||
Oh, right! Done. Sorry about that, I should've removed it before.
Attachment #687963 -
Attachment is obsolete: true
Attachment #687963 -
Flags: review?(gavin.sharp)
Attachment #688086 -
Flags: review?(gavin.sharp)
Updated•13 years ago
|
Attachment #688086 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 14•13 years ago
|
||
Comment 15•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
![]() |
||
Comment 16•13 years ago
|
||
2013-01-04-03-08-23-mozilla-central-firefox-20.0a1.en-US.linux-x86_64
Private Browsing windows seem to have no switch-to-tab; and the private windows’ tabs do not show up in normal windows’ switch-to-tab.
![]() |
||
Updated•13 years ago
|
Whiteboard: [testday-20130104]
Comment 17•13 years ago
|
||
Verified as fixed on Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130115 Firefox/21.0 and Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20130115 Firefox/20.0.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•