diff --git a/layout/tools/layout-debug/ui/content/layoutdebug.js b/layout/tools/layout-debug/ui/content/layoutdebug.js index 077aa67e00c6..0f326362ad65 100644 --- a/layout/tools/layout-debug/ui/content/layoutdebug.js +++ b/layout/tools/layout-debug/ui/content/layoutdebug.js @@ -20,6 +20,16 @@ const { Preferences } = ChromeUtils.import( "resource://gre/modules/Preferences.jsm" ); +var { loader } = ChromeUtils.import( + "resource://devtools/shared/loader/Loader.jsm" +); + +loader.lazyImporter( + this, + "BrowserToolboxLauncher", + "resource://devtools/client/framework/browser-toolbox/Launcher.jsm" +); + const FEATURES = { paintDumping: "nglayout.debug.paint_dumping", invalidateDumping: "nglayout.debug.invalidate_dumping", @@ -101,6 +111,10 @@ class Debugger { this._sendMessage("setPagedMode", v); } + openDevTools() { + BrowserToolboxLauncher.init(); + } + async _sendMessage(name, arg) { await this._sendMessageTo(gBrowser.browsingContext, name, arg); } diff --git a/layout/tools/layout-debug/ui/content/layoutdebug.xhtml b/layout/tools/layout-debug/ui/content/layoutdebug.xhtml index fc6f26e81180..f25ee714e3b0 100644 --- a/layout/tools/layout-debug/ui/content/layoutdebug.xhtml +++ b/layout/tools/layout-debug/ui/content/layoutdebug.xhtml @@ -45,6 +45,7 @@ + @@ -56,6 +57,7 @@ +