Index: chrome/content/ui/sendReport.js |
=================================================================== |
--- a/chrome/content/ui/sendReport.js |
+++ b/chrome/content/ui/sendReport.js |
@@ -22,16 +22,19 @@ |
Cu.import("resource://gre/modules/Services.jsm"); |
Cu.import("resource://gre/modules/FileUtils.jsm"); |
const MILLISECONDS_IN_SECOND = 1000; |
const SECONDS_IN_MINUTE = 60; |
const SECONDS_IN_HOUR = 60 * SECONDS_IN_MINUTE; |
const SECONDS_IN_DAY = 24 * SECONDS_IN_HOUR; |
+let contentWindow = window.arguments[0]; |
+let windowURI = (window.arguments[1] instanceof Ci.nsIURI ? window.arguments[1] : null); |
+ |
let reportData = new DOMParser().parseFromString("<report></report>", "text/xml"); |
// Some helper functions to work with the report data |
function reportElement(tag) |
{ |
for (let child = reportData.documentElement.firstChild; child; child = child.nextSibling) |
if (child.nodeType == Node.ELEMENT_NODE && child.tagName == tag) |
return child; |
@@ -86,17 +89,17 @@ let (element = reportElement("platform") |
element.setAttribute("version", Services.appinfo.platformVersion); |
element.setAttribute("build", Services.appinfo.platformBuildID); |
}; |
let (element = reportElement("options")) |
{ |
appendElement(element, "option", {id: "enabled"}, Prefs.enabled); |
appendElement(element, "option", {id: "objecttabs"}, Prefs.frameobjects); |
appendElement(element, "option", {id: "collapse"}, !Prefs.fastcollapse); |
- appendElement(element, "option", {id: "privateBrowsing"}, PrivateBrowsing.enabled); |
+ appendElement(element, "option", {id: "privateBrowsing"}, PrivateBrowsing.enabledForWindow(contentWindow) || PrivateBrowsing.enabled); |
appendElement(element, "option", {id: "subscriptionsAutoUpdate"}, Prefs.subscriptions_autoupdate); |
appendElement(element, "option", {id: "javascript"}, Services.prefs.getBoolPref("javascript.enabled")); |
appendElement(element, "option", {id: "cookieBehavior"}, Services.prefs.getIntPref("network.cookie.cookieBehavior")); |
}; |
// |
// Data collectors |
// |
@@ -1216,18 +1219,16 @@ function updateNextButton() |
} |
} |
} |
function initDataCollectorPage() |
{ |
document.documentElement.canAdvance = false; |
- let contentWindow = window.arguments[0]; |
- let windowURI = (window.arguments[1] instanceof Ci.nsIURI ? window.arguments[1] : null); |
let totalSteps = dataCollectors.length; |
let initNextDataSource = function() |
{ |
if (!dataCollectors.length) |
{ |
// We are done, continue to next page |
document.documentElement.canAdvance = true; |
document.documentElement.advance(); |
@@ -1328,17 +1329,17 @@ function initScreenshotPage() |
E("progressBar").activeItem = E("screenshotHeader"); |
} |
function initCommentPage() |
{ |
E("progressBar").activeItem = E("commentPageHeader"); |
updateEmail(); |
- |
+ |
screenshotDataSource.exportData(); |
updateDataField(); |
} |
function showDataField() |
{ |
E('dataDeck').selectedIndex = 1; |
updateDataField(); |
@@ -1378,19 +1379,19 @@ function updateComment() |
appendElement(reportData.documentElement, "comment", null, value.substr(0, 1000)); |
E("commentLengthWarning").setAttribute("visible", value.length > 1000); |
updateDataField(); |
} |
function updateEmail() |
{ |
removeReportElement("email"); |
- |
+ |
let anonymous = E("anonymousCheckbox").checked; |
- |
+ |
let value = E("email").value; |
// required for persist to work on textbox, see: https://bugzilla.mozilla.org/show_bug.cgi?id=111486 |
E("email").setAttribute("value", value); |
E("email").disabled = anonymous; |
E("emailLabel").disabled = anonymous; |
E("anonymityWarning").setAttribute("visible", anonymous); |
@@ -1524,17 +1525,17 @@ function reportSent(event) |
{ |
try |
{ |
let link = request.responseXML.getElementById("link").getAttribute("href"); |
let button = E("copyLink"); |
button.setAttribute("url", link); |
button.removeAttribute("disabled"); |
- if (!PrivateBrowsing.enabled) |
+ if (!PrivateBrowsing.enabledForWindow(contentWindow) && !PrivateBrowsing.enabled) |
reportsListDataSource.addReport(framesDataSource.site, link); |
} catch (e) {} |
E("copyLinkBox").hidden = false; |
document.documentElement.getButton("finish").disabled = false; |
document.documentElement.getButton("cancel").disabled = true; |
E("progressBar").activeItemComplete = true; |
} |