Closed
Bug 816406
Opened 12 years ago
Closed 12 years ago
Disallow dragging a private tab into a non-private window and vice versa
Categories
(Firefox :: Tabbed Browser, defect)
Firefox
Tabbed Browser
Tracking
()
RESOLVED
FIXED
Firefox 20
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
(deleted),
patch
|
dao
:
review+
|
Details | Diff | Splinter Review |
This is definitely unintuitive, and can cause confusion and unexpected results. We should disallow it in the first place.
Updated•12 years ago
|
Component: Private Browsing → Tabbed Browser
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Updated•12 years ago
|
Whiteboard: [appcoast]
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #687548 -
Flags: review?(dao)
Assignee | ||
Comment 2•12 years ago
|
||
ping?
Comment 3•12 years ago
|
||
Comment on attachment 687548 [details] [diff] [review]
Patch (v1)
>--- a/browser/base/content/tabbrowser.xml
>+++ b/browser/base/content/tabbrowser.xml
>@@ -1895,6 +1895,15 @@
> <parameter name="aOtherTab"/>
> <body>
> <![CDATA[
>+#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
>+ // Do not allow transfering a private tab to a non-private window
>+ // and vice versa.
>+ if (PrivateBrowsingUtils.isWindowPrivate(window) !=
>+ PrivateBrowsingUtils.isWindowPrivate(aOtherTab.ownerDocument.defaultView)) {
>+ return;
>+ }
>+#endif
remove { } per local style
>@@ -3421,6 +3430,15 @@
> sourceNode.ownerDocument.defaultView instanceof ChromeWindow &&
> sourceNode.ownerDocument.documentElement.getAttribute("windowtype") == "navigator:browser" &&
> sourceNode.ownerDocument.defaultView.gBrowser.tabContainer == sourceNode.parentNode) {
>+#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
>+ // Do not allow transfering a private tab to a non-private window
>+ // and vice versa.
>+ if (PrivateBrowsingUtils.isWindowPrivate(window) !=
>+ PrivateBrowsingUtils.isWindowPrivate(sourceNode.ownerDocument.defaultView)) {
>+ return dt.effectAllowed = "none";
>+ }
>+#endif
ditto
Please make sure to use unified = 8 and showfunc = 1 when generating patches.
Attachment #687548 -
Flags: review?(dao) → review+
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #3)
> Please make sure to use unified = 8 and showfunc = 1 when generating patches.
Sure, will do. Sorry!
Assignee | ||
Comment 5•12 years ago
|
||
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
You need to log in
before you can comment on or make changes to this bug.
Description
•