Closed Bug 1450465 Opened 3 years ago Closed 3 years ago
Remove the devtools overlay
We still have this two overlays for the devtools: overlay chrome://devtools/content/framework/toolbox-process-window.xul chrome://messenger/content/devtools/toolbox-process-overlay.xul overlay chrome://devtools/content/webconsole/webconsole.xul chrome://messenger/content/devtools/webconsole-overlay.xul Philipp, is it possible to do this through JS? I see also, that the changed dialog title in webconsole-overlay.xul no more works. Maybe because of the change to the new-ui.
Overlays are the only simple way I know to execute scripts in windows. I guess there could be a thing that watches windows being opened and injects the script tags accordingly, similar to how bootstrapped addons usually do it.
We are developing such a watcher system in bug 1450288, to be used by addons but could maybe also be used here by base TB.
Depends on: 1450288
So now with bug 1450288 landed, this could be done. E.g. webconsole-overlay.xul just loads chrome://global/content/viewSourceUtils.js and sets a title attribute (if it doesn't work, maybe the attribute has changed). Can we use Services.scriptloader.loadSubScript(chrome://global/content/viewSourceUtils.js, targetWindow); to inject the script into the window? The same for toolbox-process-overlay.xul .
Comment on attachment 8971046 [details] [diff] [review] 1450465.patch Review of attachment 8971046 [details] [diff] [review]: ----------------------------------------------------------------- Nice. The other errors "win.gBrowser is undefined" is pre-existing (bug 1439021 comment #33). It was hidden lately by "openWebLinkIn is not a function" (see bug 1454041 comment #2). All you could do it try it with an external viewer. Does that work? The aim of course would be to fix bug 1454041 at some stage as well. ::: mail/components/mailGlue.js @@ +61,5 @@ > + Services.scriptloader.loadSubScript("chrome://global/content/viewSourceUtils.js", domWindow); > + } > + > + ExtensionSupport.registerWindowListener( > + "Thunderbird-internal-1", Maybe call that Thunderbird-internal-Webconsole. @@ +73,5 @@ > + Services.scriptloader.loadSubScript("chrome://communicator/content/contentAreaClick.js", domWindow); > + } > + > + ExtensionSupport.registerWindowListener( > + "Thunderbird-internal-2", And this one Thunderbird-internal-Toolbox. ::: mail/locales/en-US/chrome/messenger/messenger.properties @@ +848,5 @@ > # e.g.: "48.0.2 (32-bit)" or "51.0a1 (2016-09-05) (64-bit)". > aboutDialog.architecture.sixtyFourBit = 64-bit > aboutDialog.architecture.thirtyTwoBit = 32-bit > + > +errorConsoleTitle = Error Console Now I finally see why the Browser Console is called Error Console in TB.
Attachment #8971046 - Flags: feedback?(jorgk) → feedback+
Comment on attachment 8971046 [details] [diff] [review] 1450465.patch f+ when you remove https://searchfox.org/comm-central/source/mail/components/devtools/jar.mn#5-9 too. Without its removal the build fails.
Attachment #8971046 - Flags: feedback?(richard.marti) → feedback+
Thanks, fixed the naming and the build failures. Try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=e703795da862a03da8615ccc1027f216af9dcdec
(In reply to Richard Marti (:Paenglab) from comment #6) > f+ when you remove > https://searchfox.org/comm-central/source/mail/components/devtools/jar.mn#5- > 9 too. Without its removal the build fails. Thanks, yes I forgot to remove the references to the removed files. (In reply to Jorg K (GMT+1) from comment #5) > Nice. The other errors "win.gBrowser is undefined" is pre-existing (bug > 1439021 comment #33). It was hidden lately by "openWebLinkIn is not a > function" (see bug 1454041 comment #2). All you could do it try it with an > external viewer. Does that work? I have external viewer set but it does not work from the Toolbox (it does from Error console). Strangely, clicking some .jsm or .xml files does open them directly in the Toolbox, on the Debugger tab. But .js files ask for the external app, while none is in the list. > Maybe call that Thunderbird-internal-Webconsole. > And this one Thunderbird-internal-Toolbox. Good idea, I made it BrowserConsole and Toolbox.
Assignee: nobody → acelists
Status: NEW → ASSIGNED
Version: unspecified → 61
Comment on attachment 8971068 [details] [diff] [review] 1450465.patch v1.1 Works for me. Viewing in external viewer still works, we'll fix the other cases in bug 1454041. Extra points for fixing the window title, thanks!
Attachment #8971068 - Flags: review?(jorgk) → review+
Pushed by email@example.com: https://hg.mozilla.org/comm-central/rev/09853c5bacdb replace devtools overlays with window listeners that insert the needed scripts into the proper m-c window. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
See Also: → 1567783
You need to log in before you can comment on or make changes to this bug.