diff --git a/browser/components/preferences/in-content/privacy.js b/browser/components/preferences/in-content/privacy.js index 60cbc525dfc71..6b192de72e283 100644 --- a/browser/components/preferences/in-content/privacy.js +++ b/browser/components/preferences/in-content/privacy.js @@ -651,22 +651,22 @@ var gPrivacyPane = { * Displays a dialog from which individual parts of private data may be * cleared. */ - clearPrivateDataNow: function (aClearEverything) - { + clearPrivateDataNow: function (aClearEverything) { var ts = document.getElementById("privacy.sanitize.timeSpan"); var timeSpanOrig = ts.value; - if (aClearEverything) + + if (aClearEverything) { ts.value = 0; + } - const Cc = Components.classes, Ci = Components.interfaces; - var glue = Cc["@mozilla.org/browser/browserglue;1"] - .getService(Ci.nsIBrowserGlue); - glue.sanitize(window); + gSubDialog.open("chrome://browser/content/sanitize.xul", "resizable=no", null, () => { + // reset the timeSpan pref + if (aClearEverything) { + ts.value = timeSpanOrig; + } - // reset the timeSpan pref - if (aClearEverything) - ts.value = timeSpanOrig; - Services.obs.notifyObservers(null, "clear-private-data", null); + Services.obs.notifyObservers(null, "clear-private-data", null); + }); }, /** diff --git a/browser/components/preferences/in-content/subdialogs.js b/browser/components/preferences/in-content/subdialogs.js index 90673367e54f3..71f0cd51ce85b 100644 --- a/browser/components/preferences/in-content/subdialogs.js +++ b/browser/components/preferences/in-content/subdialogs.js @@ -173,6 +173,18 @@ var gSubDialog = { this._frame.contentWindow.addEventListener("dialogclosing", this); + let oldResizeBy = this._frame.contentWindow.resizeBy; + this._frame.contentWindow.resizeBy = function(resizeByWidth, resizeByHeight) { + // Only handle resizeByHeight currently. + let frameHeight = gSubDialog._frame.clientHeight; + let boxMinHeight = parseFloat(getComputedStyle(gSubDialog._box).minHeight, 10); + + gSubDialog._frame.style.height = (frameHeight + resizeByHeight) + "px"; + gSubDialog._box.style.minHeight = (boxMinHeight + resizeByHeight) + "px"; + + oldResizeBy.call(gSubDialog._frame.contentWindow, resizeByWidth, resizeByHeight); + }; + // Make window.close calls work like dialog closing. let oldClose = this._frame.contentWindow.close; this._frame.contentWindow.close = function() { @@ -273,8 +285,10 @@ var gSubDialog = { this._overlay.style.visibility = "visible"; this._overlay.style.opacity = ""; // XXX: focus hack continued from _onContentLoaded - this._resizeObserver = new MutationObserver(this._onResize); - this._resizeObserver.observe(this._box, {attributes: true}); + if (this._box.getAttribute("resizable") == "true") { + this._resizeObserver = new MutationObserver(this._onResize); + this._resizeObserver.observe(this._box, {attributes: true}); + } this._trapFocus(); }, diff --git a/browser/themes/linux/sanitizeDialog.css b/browser/themes/linux/sanitizeDialog.css index 28d4e7eb30676..e73cd27e71312 100644 --- a/browser/themes/linux/sanitizeDialog.css +++ b/browser/themes/linux/sanitizeDialog.css @@ -56,7 +56,7 @@ padding: 0; margin-top: 6px; margin-bottom: 6px; - margin-inline-start: -6px; + margin-inline-start: -4px; margin-inline-end: 0; } diff --git a/browser/themes/shared/incontentprefs/preferences.inc.css b/browser/themes/shared/incontentprefs/preferences.inc.css index 72ac39bc1e73b..577baa6ed507e 100644 --- a/browser/themes/shared/incontentprefs/preferences.inc.css +++ b/browser/themes/shared/incontentprefs/preferences.inc.css @@ -369,7 +369,6 @@ description > html|a { #dialogFrame { -moz-box-flex: 1; /* Default dialog dimensions */ - height: 20em; width: 66ch; } diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm index fc38a6abf34da..aa2b3f2a7cae0 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Preferences.jsm @@ -23,6 +23,7 @@ this.Preferences = { ["paneApplications", null], ["panePrivacy", null], ["panePrivacy", null, DNTDialog], + ["panePrivacy", null, clearRecentHistoryDialog], ["paneSecurity", null], ["paneSync", null], ["paneAdvanced", "generalTab"], @@ -107,6 +108,12 @@ function* connectionDialog(aBrowser) { }); } +function* clearRecentHistoryDialog(aBrowser) { + yield ContentTask.spawn(aBrowser, null, function* () { + content.document.getElementById("historyRememberClear").click(); + }); +} + function* certManager(aBrowser) { yield ContentTask.spawn(aBrowser, null, function* () { content.document.getElementById("viewCertificatesButton").click(); diff --git a/devtools/client/framework/toolbox-options.xhtml b/devtools/client/framework/toolbox-options.xhtml index 8351c9c254ae7..372a588ab8455 100644 --- a/devtools/client/framework/toolbox-options.xhtml +++ b/devtools/client/framework/toolbox-options.xhtml @@ -84,6 +84,16 @@ +
+ &options.debugger.label; + +
+
&options.styleeditor.label;