From 1f9ab3a6e6e3f1e79b482c0540c98859bbc71350 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 18 Jan 2019 22:43:29 +0100 Subject: Remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS --- devtools/shared/jsinspector/nsJSInspector.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'devtools') diff --git a/devtools/shared/jsinspector/nsJSInspector.cpp b/devtools/shared/jsinspector/nsJSInspector.cpp index 6d717af5b..457e64c08 100644 --- a/devtools/shared/jsinspector/nsJSInspector.cpp +++ b/devtools/shared/jsinspector/nsJSInspector.cpp @@ -37,7 +37,6 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsJSInspector) NS_IMPL_CYCLE_COLLECTING_RELEASE(nsJSInspector) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsJSInspector) - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsJSInspector) -- cgit v1.2.3 From 43d44975b1f49df640916cca5f6a0b138696da3c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 13 Feb 2019 19:11:37 +0100 Subject: Remove WebExtension support from the platform. - Conditional code - WE APIs - WE toolkit theming --- devtools/server/actors/moz.build | 2 +- devtools/server/actors/webbrowser.js | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) (limited to 'devtools') diff --git a/devtools/server/actors/moz.build b/devtools/server/actors/moz.build index ddefc3e9e..085d003cf 100644 --- a/devtools/server/actors/moz.build +++ b/devtools/server/actors/moz.build @@ -67,6 +67,6 @@ DevToolsModules( 'worker.js', ) -FINAL_TARGET_PP_FILES.chrome.devtools.modules.devtools.server.actors += [ +FINAL_TARGET_FILES.chrome.devtools.modules.devtools.server.actors += [ 'webbrowser.js', ] \ No newline at end of file diff --git a/devtools/server/actors/webbrowser.js b/devtools/server/actors/webbrowser.js index dffe49b91..e7981e163 100644 --- a/devtools/server/actors/webbrowser.js +++ b/devtools/server/actors/webbrowser.js @@ -30,9 +30,6 @@ loader.lazyRequireGetter(this, "WorkerActorList", "devtools/server/actors/worker loader.lazyRequireGetter(this, "ServiceWorkerRegistrationActorList", "devtools/server/actors/worker", true); loader.lazyRequireGetter(this, "ProcessActorList", "devtools/server/actors/process", true); loader.lazyImporter(this, "AddonManager", "resource://gre/modules/AddonManager.jsm"); -#ifdef MOZ_WEBEXTENSIONS -loader.lazyImporter(this, "ExtensionContent", "resource://gre/modules/ExtensionContent.jsm"); -#endif // Assumptions on events module: // events needs to be dispatched synchronously, @@ -984,21 +981,6 @@ TabActor.prototype = { return null; }, -#ifdef MOZ_WEBEXTENSIONS - /** - * Getter for the WebExtensions ContentScript globals related to the - * current tab content's DOM window. - */ - get webextensionsContentScriptGlobals() { - // Ignore xpcshell runtime which spawn TabActors without a window. - if (this.window) { - return ExtensionContent.getContentScriptGlobalsForWindow(this.window); - } - - return []; - }, -#endif - /** * Getter for the list of all content DOM windows in this tabActor * @return {Array} -- cgit v1.2.3 From 54f9a14d030793d9380e0af6d8a77e17e1e1e8f5 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 16 Feb 2019 12:46:20 +0100 Subject: Stop using hard-coded URL for "get more devtools" --- devtools/client/menus.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'devtools') diff --git a/devtools/client/menus.js b/devtools/client/menus.js index 1d2168967..dbacb367d 100644 --- a/devtools/client/menus.js +++ b/devtools/client/menus.js @@ -189,7 +189,8 @@ exports.menuitems = [ l10nKey: "getMoreDevtoolsCmd", oncommand(event) { let window = event.target.ownerDocument.defaultView; - window.openUILinkIn("https://addons.mozilla.org/firefox/collections/mozilla/webdeveloper/", "tab"); + let getMoreURL = Services.prefs.getCharPref("browser.getdevtools.url"); + window.openUILinkIn(getMoreURL, "tab"); } }, ]; -- cgit v1.2.3 From 1413b3d6fd7297014d35d862abc792dc30c1ec24 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Mon, 18 Mar 2019 18:39:07 -0400 Subject: Issue #756 - Remove Contextual Identity from DevTools --- .../client/responsive.html/docs/browser-swap.md | 3 - devtools/client/responsive.html/manager.js | 16 +---- devtools/client/styleeditor/test/browser.ini | 1 - .../browser_styleeditor_loading_with_containers.js | 63 ------------------- .../test/fixtures/stubs/consoleApi.js | 72 ++++++++-------------- devtools/server/actors/stylesheets.js | 13 +--- 6 files changed, 26 insertions(+), 142 deletions(-) delete mode 100644 devtools/client/styleeditor/test/browser_styleeditor_loading_with_containers.js (limited to 'devtools') diff --git a/devtools/client/responsive.html/docs/browser-swap.md b/devtools/client/responsive.html/docs/browser-swap.md index 75055ad4e..f4f8322cb 100644 --- a/devtools/client/responsive.html/docs/browser-swap.md +++ b/devtools/client/responsive.html/docs/browser-swap.md @@ -96,11 +96,8 @@ browsers are swapped. Browser attributes `gBrowser.swapBrowsersAndCloseOther` transfers between browsers: -* `usercontextid` - Tab attributes `gBrowser.swapBrowsersAndCloseOther` transfers between tabs: -* `usercontextid` * `muted` * `soundplaying` * `busy` diff --git a/devtools/client/responsive.html/manager.js b/devtools/client/responsive.html/manager.js index a3fbed366..97ef8ad6d 100644 --- a/devtools/client/responsive.html/manager.js +++ b/devtools/client/responsive.html/manager.js @@ -76,11 +76,6 @@ const ResponsiveUIManager = exports.ResponsiveUIManager = { this.showRemoteOnlyNotification(window, tab, options); return promise.reject(new Error("RDM only available for remote tabs.")); } - // Remove this once we support this case in bug 1306975. - if (tab.linkedBrowser.hasAttribute("usercontextid")) { - this.showNoContainerTabsNotification(window, tab, options); - return promise.reject(new Error("RDM not available for container tabs.")); - } if (!this.isActiveForTab(tab)) { this.initMenuCheckListenerFor(window); @@ -218,16 +213,7 @@ const ResponsiveUIManager = exports.ResponsiveUIManager = { } }), - showRemoteOnlyNotification(window, tab, options) { - this.showErrorNotification(window, tab, options, getStr("responsive.remoteOnly")); - }, - - showNoContainerTabsNotification(window, tab, options) { - this.showErrorNotification(window, tab, options, - getStr("responsive.noContainerTabs")); - }, - - showErrorNotification(window, tab, { command } = {}, msg) { + showRemoteOnlyNotification(window, tab, { command } = {}) { // Default to using the browser's per-tab notification box let nbox = window.gBrowser.getNotificationBox(tab.linkedBrowser); diff --git a/devtools/client/styleeditor/test/browser.ini b/devtools/client/styleeditor/test/browser.ini index 4a84d45e6..ba935e1dd 100644 --- a/devtools/client/styleeditor/test/browser.ini +++ b/devtools/client/styleeditor/test/browser.ini @@ -77,7 +77,6 @@ support-files = [browser_styleeditor_init.js] [browser_styleeditor_inline_friendly_names.js] [browser_styleeditor_loading.js] -[browser_styleeditor_loading_with_containers.js] [browser_styleeditor_media_sidebar.js] [browser_styleeditor_media_sidebar_links.js] skip-if = e10s && debug # Bug 1252201 - Docshell leak on debug e10s diff --git a/devtools/client/styleeditor/test/browser_styleeditor_loading_with_containers.js b/devtools/client/styleeditor/test/browser_styleeditor_loading_with_containers.js deleted file mode 100644 index a00628c8b..000000000 --- a/devtools/client/styleeditor/test/browser_styleeditor_loading_with_containers.js +++ /dev/null @@ -1,63 +0,0 @@ -/* vim: set ts=2 et sw=2 tw=80: */ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -// Test that the stylesheets can be loaded correctly with containers -// (bug 1282660). - -const TESTCASE_URI = TEST_BASE_HTTP + "simple.html"; -const EXPECTED_SHEETS = [ - { - sheetIndex: 0, - name: /^simple.css$/, - rules: 1, - active: true - }, { - sheetIndex: 1, - name: /^<.*>$/, - rules: 3, - active: false - } -]; - -add_task(function* () { - // Using the personal container. - let userContextId = 1; - let { tab } = yield* openTabInUserContext(TESTCASE_URI, userContextId); - let { ui } = yield openStyleEditor(tab); - - is(ui.editors.length, 2, "The UI contains two style sheets."); - checkSheet(ui.editors[0], EXPECTED_SHEETS[0]); - checkSheet(ui.editors[1], EXPECTED_SHEETS[1]); -}); - -function* openTabInUserContext(uri, userContextId) { - // Open the tab in the correct userContextId. - let tab = gBrowser.addTab(uri, {userContextId}); - - // Select tab and make sure its browser is focused. - gBrowser.selectedTab = tab; - tab.ownerDocument.defaultView.focus(); - - let browser = gBrowser.getBrowserForTab(tab); - yield BrowserTestUtils.browserLoaded(browser); - return {tab, browser}; -} - -function checkSheet(editor, expected) { - is(editor.styleSheet.styleSheetIndex, expected.sheetIndex, - "Style sheet has correct index."); - - let summary = editor.summary; - let name = summary.querySelector(".stylesheet-name > label") - .getAttribute("value"); - ok(expected.name.test(name), "The name '" + name + "' is correct."); - - let ruleCount = summary.querySelector(".stylesheet-rule-count").textContent; - is(parseInt(ruleCount, 10), expected.rules, "the rule count is correct"); - - is(summary.classList.contains("splitview-active"), expected.active, - "The active status for this sheet is correct."); -} diff --git a/devtools/client/webconsole/new-console-output/test/fixtures/stubs/consoleApi.js b/devtools/client/webconsole/new-console-output/test/fixtures/stubs/consoleApi.js index 26e95fe39..d9662c4fd 100644 --- a/devtools/client/webconsole/new-console-output/test/fixtures/stubs/consoleApi.js +++ b/devtools/client/webconsole/new-console-output/test/fixtures/stubs/consoleApi.js @@ -657,8 +657,7 @@ stubPackets.set("console.log('foobar', 'test')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -690,8 +689,7 @@ stubPackets.set("console.log(undefined)", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -721,8 +719,7 @@ stubPackets.set("console.warn('danger, will robinson!')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -754,8 +751,7 @@ stubPackets.set("console.log(NaN)", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -787,8 +783,7 @@ stubPackets.set("console.log(null)", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -818,8 +813,7 @@ stubPackets.set("console.log('鼬')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -847,8 +841,7 @@ stubPackets.set("console.clear()", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086275587, @@ -881,8 +874,7 @@ stubPackets.set("console.count('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086277812, @@ -933,8 +925,7 @@ stubPackets.set("console.assert(false, {message: 'foobar'})", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -973,8 +964,7 @@ stubPackets.set("console.log('hello \nfrom \rthe \"string world!')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -1004,8 +994,7 @@ stubPackets.set("console.log('úṇĩçödê țĕșť')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [], @@ -1047,8 +1036,7 @@ stubPackets.set("console.dirxml(window)", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086285483, @@ -1076,8 +1064,7 @@ stubPackets.set("console.trace()", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086287286, @@ -1130,8 +1117,7 @@ stubPackets.set("console.time('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086289137, @@ -1164,8 +1150,7 @@ stubPackets.set("console.timeEnd('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086289138, @@ -1198,8 +1183,7 @@ stubPackets.set("console.table('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086290984, @@ -1246,8 +1230,7 @@ stubPackets.set("console.table(['a', 'b', 'c'])", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086292762, @@ -1277,8 +1260,7 @@ stubPackets.set("console.group('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086294628, @@ -1308,8 +1290,7 @@ stubPackets.set("console.groupEnd('bar')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086294630, @@ -1339,8 +1320,7 @@ stubPackets.set("console.groupCollapsed('foo')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086296567, @@ -1370,8 +1350,7 @@ stubPackets.set("console.groupEnd('foo')", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086296570, @@ -1399,8 +1378,7 @@ stubPackets.set("console.group()", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086298462, @@ -1428,8 +1406,7 @@ stubPackets.set("console.groupEnd()", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "timeStamp": 1477086298464, @@ -1460,8 +1437,7 @@ stubPackets.set("console.log(%cfoobar)", { "appId": 0, "firstPartyDomain": "", "inIsolatedMozBrowser": false, - "privateBrowsingId": 0, - "userContextId": 0 + "privateBrowsingId": 0 }, "private": false, "styles": [ diff --git a/devtools/server/actors/stylesheets.js b/devtools/server/actors/stylesheets.js index 7fcbca8c4..f484a5976 100644 --- a/devtools/server/actors/stylesheets.js +++ b/devtools/server/actors/stylesheets.js @@ -451,21 +451,10 @@ var StyleSheetActor = protocol.ActorClassWithSpec(styleSheetSpec, { let options = { loadFromCache: true, policy: Ci.nsIContentPolicy.TYPE_INTERNAL_STYLESHEET, + window: this.window, charset: this._getCSSCharset() }; - // Bug 1282660 - We use the system principal to load the default internal - // stylesheets instead of the content principal since such stylesheets - // require system principal to load. At meanwhile, we strip the loadGroup - // for preventing the assertion of the userContextId mismatching. - // The default internal stylesheets load from the 'resource:' URL. - // Bug 1287607, 1291321 - 'chrome' and 'file' protocols should also be handled in the - // same way. - if (!/^(chrome|file|resource):\/\//.test(this.href)) { - options.window = this.window; - options.principal = this.document.nodePrincipal; - } - return fetch(this.href, options).then(({ content }) => { this.text = content; return content; -- cgit v1.2.3 From 3cfdf908cc5e967efd3302f2b4be9a33d31ac5ae Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Sat, 23 Mar 2019 10:56:30 +0100 Subject: Escape '!' to '\041' in posix strings ($'...') --- devtools/client/shared/curl.js | 1 + 1 file changed, 1 insertion(+) (limited to 'devtools') diff --git a/devtools/client/shared/curl.js b/devtools/client/shared/curl.js index 6d33ad971..967019746 100644 --- a/devtools/client/shared/curl.js +++ b/devtools/client/shared/curl.js @@ -375,6 +375,7 @@ const CurlUtils = { .replace(/\'/g, "\\\'") .replace(/\n/g, "\\n") .replace(/\r/g, "\\r") + .replace(/!/g, "\\041") .replace(/[^\x20-\x7E]/g, escapeCharacter) + "'"; } -- cgit v1.2.3