The default bug view has changed. See this FAQ.

Private Browsing changes for browser feed preview

RESOLVED FIXED in seamonkey2.20

Status

SeaMonkey
Feed Discovery and Preview
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Philip Chee, Assigned: Philip Chee)

Tracking

(Blocks: 1 bug)

Trunk
seamonkey2.20

SeaMonkey Tracking Flags

(seamonkey2.17 unaffected, seamonkey2.18 fixed, seamonkey2.19 fixed, seamonkey2.20 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Browser Feed Preview needs to be aware of Private Browsing. Patch coming up.
(Assignee)

Comment 1

4 years ago
Created attachment 731486 [details] [diff] [review]
Patch v1.0 Add PB awareness to feed preview.

> -function OpenBrowserWindow()
> +function OpenBrowserWindow(aOptions)
In order not to diverge our PB test too much from the Firefox version I've added a private browsing argument to OpenBrowserWindow()

> +    var notificationBox = getNotificationBox(aContentWindow);
> +    var win = notificationBox.ownerDocument.defaultView;
We can get the chrome window from the notificationBox so we don't need to use all those helper functions like Firefox does.

> -    classID: WCCR_CLASSID,
> -    contractID: WCCR_CONTRACTID,
> +      classID: WCCR_CLASSID,
> +      contractID: WCCR_CONTRACTID,
Remove some stray \tabs.

> -#include "prmem.h"
> -
Useless include, see Bug 798595.

> --- /dev/null
> +++ b/suite/browser/test/browser/browser_privatebrowsing_protocolhandler.js

To run this test:

$ TEST_PATH=suite/browser/test/browser_privatebrowsing_protocolhandler.js  pymake -C ../objdir-sm/ mochitest-browser-chrome

INFO TEST-START | Shutdown
Browser Chrome Test Summary
        Passed: 2
        Failed: 0
        Todo: 0
Attachment #731486 - Flags: review?(neil)
(Assignee)

Updated

4 years ago
Component: UI Design → Feed Discovery and Preview

Comment 2

4 years ago
Comment on attachment 731486 [details] [diff] [review]
Patch v1.0 Add PB awareness to feed preview.

>+function whenNewWindowLoaded(aOptions, aCallback) {
>+  let win = OpenBrowserWindow(aOptions);
This is teh suck. Just open the browser window directly.
var { private } = aOptions;
var features = private ? "private,chrome,all,dialog=no" : "non-private,chrome,all,dialog=no";
var win = window.openDialog(getBrowserURL(), "_blank", features, "about:blank");

>+    var flags = isPB ? this._faviconService.FAVICON_LOAD_PRIVATE :
>+                       this._faviconService.FAVICON_LOAD_NON_PRIVATE;
[I guess I need to fix up tabbrowser.xml ...]

>+      function (aURI, aDataLen, aData, aMimeType) {
Nit: no space before (?

>+    var isPB = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
>+                  .getInterface(Components.interfaces.nsIWebNavigation)
>+                  .QueryInterface(Components.interfaces.nsIDocShell)
>+                  .QueryInterface(Components.interfaces.nsILoadContext)
>+                  .usePrivateBrowsing;
IIRC you can test the private browsing state of the content window to avoid having to do it on the chrome window.
Attachment #731486 - Flags: review?(neil) → review-
(Assignee)

Comment 3

4 years ago
Created attachment 735813 [details] [diff] [review]
Patch v1.1 fix review issues.

> This is teh suck. Just open the browser window directly.
> var { private } = aOptions;
> var features = private ? "private,chrome,all,dialog=no" : "non-private,chrome,all,dialog=no";
> var win = window.openDialog(getBrowserURL(), "_blank", features, "about:blank");
Fixed.

>>+      function (aURI, aDataLen, aData, aMimeType) {
> Nit: no space before (?
Fixed.

>>+    var isPB = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
>>+                  .getInterface(Components.interfaces.nsIWebNavigation)
>>+                  .QueryInterface(Components.interfaces.nsIDocShell)
>>+                  .QueryInterface(Components.interfaces.nsILoadContext)
>>+                  .usePrivateBrowsing;
> IIRC you can test the private browsing state of the content window to avoid
> having to do it on the chrome window.
Fixed.
Attachment #731486 - Attachment is obsolete: true
Attachment #735813 - Flags: review?(neil)

Updated

4 years ago
Attachment #735813 - Flags: review?(neil) → review+
(Assignee)

Comment 4

4 years ago
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/0d3770a601e5
(Assignee)

Updated

4 years ago
Whiteboard: [leave open for comm-aurora and comm-beta]
Target Milestone: --- → seamonkey2.20
(Assignee)

Comment 5

4 years ago
Comment on attachment 735813 [details] [diff] [review]
Patch v1.1 fix review issues.

[Approval Request Comment]
Regression caused by (bug #): Not a regression. 
User impact if declined: Potential information leak
Testing completed (on m-c, etc.): Baked on comm-central without any problems detected.
Risk to taking this patch (and alternatives if risky): Low to none.
String changes made by this patch: None.
Attachment #735813 - Flags: approval-comm-beta?
Attachment #735813 - Flags: approval-comm-aurora?

Updated

4 years ago
Attachment #735813 - Flags: approval-comm-beta?
Attachment #735813 - Flags: approval-comm-beta+
Attachment #735813 - Flags: approval-comm-aurora?
Attachment #735813 - Flags: approval-comm-aurora+
(Assignee)

Comment 6

4 years ago
Pushed to branches:
http://hg.mozilla.org/releases/comm-aurora/rev/da623ec45a03
http://hg.mozilla.org/releases/comm-beta/rev/ca4626be38b7
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
status-seamonkey2.17: --- → unaffected
status-seamonkey2.18: --- → fixed
status-seamonkey2.19: --- → fixed
status-seamonkey2.20: --- → fixed
Resolution: --- → FIXED
(Assignee)

Updated

4 years ago
Whiteboard: [leave open for comm-aurora and comm-beta]
You need to log in before you can comment on or make changes to this bug.