diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 94ae7ef4fd5..b32f70cfc16 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -7523,14 +7523,14 @@ var StyleEditor = { this.StyleEditorManager.selectEditor(win); return win; } else { - return this.StyleEditorManager.newEditor(contentWindow, + return this.StyleEditorManager.newEditor(contentWindow, window, aSelectedStyleSheet, aLine, aCol); } }, toggle: function SE_toggle() { - this.StyleEditorManager.toggleEditor(gBrowser.contentWindow); + this.StyleEditorManager.toggleEditor(gBrowser.contentWindow, window); } }; diff --git a/browser/devtools/styleeditor/StyleEditor.jsm b/browser/devtools/styleeditor/StyleEditor.jsm index 9a483ce80dc..a43a285d3bb 100644 --- a/browser/devtools/styleeditor/StyleEditor.jsm +++ b/browser/devtools/styleeditor/StyleEditor.jsm @@ -1315,11 +1315,12 @@ StyleEditorManager.prototype = { * Open a new editor. * * @param {Window} content window. + * @param {Window} chrome window. * @param {CSSStyleSheet} [aSelectedStyleSheet] default Stylesheet. * @param {Number} [aLine] Line to which the caret should be moved (one-indexed). * @param {Number} [aCol] Column to which the caret should be moved (one-indexed). */ - newEditor: function SEM_newEditor(aContentWindow, aSelectedStyleSheet, aLine, aCol) { + newEditor: function SEM_newEditor(aContentWindow, aChromeWindow, aSelectedStyleSheet, aLine, aCol) { const CHROME_URL = "chrome://browser/content/styleeditor.xul"; const CHROME_WINDOW_FLAGS = "chrome,centerscreen,resizable,dialog=no"; @@ -1330,7 +1331,7 @@ StyleEditorManager.prototype = { col: aCol }; args.wrappedJSObject = args; - let chromeWindow = Services.ww.openWindow(null, CHROME_URL, "_blank", + let chromeWindow = Services.ww.openWindow(aChromeWindow, CHROME_URL, "_blank", CHROME_WINDOW_FLAGS, args); chromeWindow.onunload = function() { @@ -1353,12 +1354,12 @@ StyleEditorManager.prototype = { * * @param {Window} associated content window. */ - toggleEditor: function SEM_toggleEditor(aContentWindow) { + toggleEditor: function SEM_toggleEditor(aContentWindow, aChromeWindow) { let editor = this.getEditorForWindow(aContentWindow); if (editor) { editor.close(); } else { - this.newEditor(aContentWindow); + this.newEditor(aContentWindow, aChromeWindow); } }, diff --git a/browser/devtools/styleeditor/test/browser_styleeditor_private.js b/browser/devtools/styleeditor/test/browser_styleeditor_private.js index d0f84252f35..593593b0832 100644 --- a/browser/devtools/styleeditor/test/browser_styleeditor_private.js +++ b/browser/devtools/styleeditor/test/browser_styleeditor_private.js @@ -6,6 +6,8 @@ // content CSS files in the permanent cache when opened from PB mode. function checkDiskCacheFor(host) { + let foundPrivateData = false; + let visitor = { visitDevice: function(deviceID, deviceInfo) { if (deviceID == "disk") @@ -15,10 +17,12 @@ function checkDiskCacheFor(host) { visitEntry: function(deviceID, entryInfo) { info(entryInfo.key); - is(entryInfo.key.contains(host), false, "web content present in disk cache"); + foundPrivateData |= entryInfo.key.contains(host); + is(foundPrivateData, false, "web content present in disk cache"); } }; cache.visitEntries(visitor); + is(foundPrivateData, false, "private data present in disk cache"); } const TEST_HOST = 'mochi.test:8888';