Граф коммитов

25521 Коммитов

Автор SHA1 Сообщение Дата
Ted Campbell 7a57865285 Bug 1790912 - Migrate js/ductwork/debugger to devtools/platform. r=ochameau
This gecko integration code is better managed with the other devtools platform
hook code. To simplify resolving the JSM and avoiding issues around restricted
use of eval in chrome, I also reset the DIST_SUBDIR config and run the xpcshell
tests without a firefox-appdir. The test works on Android these days, so
re-enable it on that platform.

Differential Revision: https://phabricator.services.mozilla.com/D157522
2022-09-25 09:03:34 +00:00
Ted Campbell 69dfb519c2 Bug 1790912 - Use globalThis instead of this with jsdebugger.jsm. r=jandem,ochameau
Use 'globalThis' instead of 'this' when trying to attach a debugger to the
current global to avoid subtle footguns with the varied definitions of 'this'.
The debugger interface needs a true GlobalObject so this is much clearer. In
particular, this is a problem in test_nativewrappers.js when the test runs in
strict mode since the 'this' in the test function is no long implicitly the
global.

Differential Revision: https://phabricator.services.mozilla.com/D157544
2022-09-25 09:03:33 +00:00
Alexandre Poirot 5bae281ff6 Bug 1791055 - [devtools] Migrate to CommandsFactory to instantiate all descriptors. r=jdescottes,perftest-reviewers,AlexandruIonescu
This help factorise all code trying to instantiate a server and a client everywhere.
This will also help migrate from descriptor to commands in Toolbox constructor.

A good way to track all leftover manual instantiation of descriptors is to look for mainRoot.get*.
There should only be tests now, and descriptor-from-url, which I would to convert once
we migrate toolbox constructor from descriptor to commands.

Differential Revision: https://phabricator.services.mozilla.com/D157737
2022-09-24 07:14:58 +00:00
Emilio Cobos Álvarez cb0b3ab372 Bug 1791972 - Simplify dialog stack and rdm styles. r=Gijs,devtools-reviewers,jdescottes
.browserContainer is relatively positioned, so we can position the
tab-modal dialogs absolutely inside it instead of making them part of
the browser stack.

While at it, make the rdm toolbar part of the regular browserContainer,
just like the regular devtools toolbox is. That way there's no need to
do ResizeObserver shenanigans to be able to let it grow. Keep it also
absolutely positioned tho, because we need to overlay the whole
container when the device modal is opened. That's somewhat gross.

This should in general be simpler to understand than the current set-up,
and more performant to since it avoids the dialog stack from forming
part of the browser element's flow.

Differential Revision: https://phabricator.services.mozilla.com/D157912
2022-09-23 22:23:37 +00:00
Jan Odvarko 455a50c929 Bug 1761367 - Firefox DevTools User Docs mention removed Web Developer submenu r=jdescottes,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D157789
2022-09-23 12:06:14 +00:00
nchevobbe 4b82f36d86 Bug 1791405 - [devtools] Block key events in source editor for u0000 keys. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D157738
2022-09-23 01:30:36 +00:00
Paul Adenot 271ca51499 Bug 1791870 - Add BackgroundThreadPool to the media preset. r=julienw DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D157861
2022-09-22 17:41:02 +00:00
Julian Descottes ee708d7ab9 Bug 1791640 - [devtools] Do not use custom zoom keys when the toolbox is hosted in a tab r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D157830
2022-09-21 17:49:38 +00:00
Jan Odvarko 6dca238bf4 Bug 1789150 - Keyboard shortcuts missing most of shortcuts for Style Editor r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D157709
2022-09-20 13:35:24 +00:00
Alexandre Poirot 8010ef0166 Bug 1789980 - [devtools] Stop exposing `indexedDB` to all DevTools modules. r=jdescottes
This symbol is specific to documents and isn't available in JSM/ESM.
So it will be best to keep it manually crafter from the modules.
It appears that only async-storage depends on the overloaded indexedDB
object created by devtools/shared/indexed-db.

Differential Revision: https://phabricator.services.mozilla.com/D157424
2022-09-20 12:52:27 +00:00
Alexandre Poirot 8c0ef6b298 Bug 1789980 - [devtools] Migrate all callsites using require("chrome") to use Components.* global symbols. r=jdescottes,perftest-reviewers,AlexandruIonescu
This will help transition to ES Modules as we won't be able to expose a magic "chrome" ESM.
Also, most of these symbols are exposed as global already.
All but:
* `components` which is `Components`,
* `CC` which is `Components.Constructor`,
* `Cm` which is `Components.manager`.

$ sed -ie "/require(.chrome.)/d" $(git grep -l 'require("chrome")' devtools/)
+ manual edits for all three exceptions

Differential Revision: https://phabricator.services.mozilla.com/D156936
2022-09-20 12:52:27 +00:00
Alexandre Poirot c7d60e285f Bug 1789980 - [devtools] Stop exposing require("chrome"), instead expose Components.* as globals. r=jdescottes
This will actually make commonjs module behave like JSM/ESM.
Where you have access to Components, Cc, Ci, Cu and Cr as globals.

This patch is based on the usage of Sandbox's wantComponents,
which will expose all these globals for us.
Then, I'm handling the special cases of Services and ChromeWorker,
which have nothing to do with Components.* APIs.

Differential Revision: https://phabricator.services.mozilla.com/D156935
2022-09-20 12:52:26 +00:00
Alexandre Poirot 3ce07c3d24 Bug 1789980 - [devtools] Import "wantGlobalProperties" symbols from the module Sandbox. r=jdescottes
That, instead of involving the "debuggerSandbox", which is only meant
for exposing the "Debugger" symbol.

Differential Revision: https://phabricator.services.mozilla.com/D156934
2022-09-20 12:52:26 +00:00
Jan Odvarko 8d87ce546f Bug 1790578 - Fix links pointing to examples repos r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D157704
2022-09-20 08:33:11 +00:00
Dana Keeler bdb75eecd3 Bug 1790451 - remove now-unnecessary QueryInterface(Ci.nsITransportSecurityInfo) calls r=jschanck,webdriver-reviewers,necko-reviewers,application-update-reviewers,nalexander,valentin
Differential Revision: https://phabricator.services.mozilla.com/D157166
2022-09-20 03:58:50 +00:00
Nicolas Chevobbe d125d4d87d Bug 1790595 - [devtools] Fix performance regression in _getMediaRules. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D157206
2022-09-19 11:51:59 +00:00
Marian-Vasile Laza 853e5e4873 Backed out changeset c2224b54c672 (bug 1790595) for causing mochitest failures on test_styles-applied.html. CLOSED TREE 2022-09-19 11:37:39 +03:00
Nicolas Chevobbe 672cdef00f Bug 1790595 - [devtools] Fix performance regression in _getMediaRules. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D157206
2022-09-19 07:51:21 +00:00
Joel Maher f668f1c655 Bug 1790868 - clean up 32 bit annotations for tests that don't run on 32 bit, and general cleanup. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D157352
2022-09-16 12:40:13 +00:00
criss 49eaaa607e Backed out 2 changesets (bug 1667090, bug 1788605) for causing Xpcshell failures on test_css-properties-db.js. CLOSED TREE
Backed out changeset cee98ae67ea4 (bug 1788605)
Backed out changeset 404e0b4bcd0f (bug 1667090)
2022-09-15 12:13:28 +03:00
Frederic Wang fe1762c548 Bug 1667090 - Implement CSS font-size: math and math-depth properties. r=emilio
The font-size math keyword is implemented. It behaves as a font-size: 1em
with the extra fixup due to math-level change (and other legacy MathML
attributes). After that change, the CSS for math-level / font-size: math
is behaving as per the specification, so the math-depth is turned in
nightly.

The adjusting function for font-size: math is modified so that it's
executed only if both font-size: math (otherwise the spec says no scale
should apply) and math-depth (otherwise the scale is 1 and function exists
early anyway) are set on the element. Also checking if the current node
has a scriptsizemultiplier rule applied to use MathML3's scaling is
incorrect. Instead this is changed to check if a non-default
scriptsizemultiplier is set.

Differential Revision: https://phabricator.services.mozilla.com/D91744
2022-09-15 08:14:49 +00:00
Alexandre Poirot 7e5e4979c4 Bug 1780912 - [devtools] Make the local web extension toolbox be always on top. r=nchevobbe,eemeli
This allows to keep the DevTools visible while interacting with the Firefox
window where the extension is running.

This behavior is enabled by default, but can be disable on-demand via a button
in the top toolbar.
Note that it requires to close and reopen the window/toolbox as platform APIs
disallow changing this behavior "live" on a given window.

Differential Revision: https://phabricator.services.mozilla.com/D155843
2022-09-15 07:31:31 +00:00
Alexandre Poirot c44d50f08a Bug 1780912 - [devtools] Open toolboxes for local WebExtension in dedicated window. r=jdescottes
This should hopefully help debug addons displaying panels/popups.

Differential Revision: https://phabricator.services.mozilla.com/D155393
2022-09-15 07:31:31 +00:00
Julian Descottes d97d7ca5d8 Bug 1790889 - Use width and height properties for splitters in the Storage Inspector and StyleEditor r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D157375
2022-09-15 07:26:22 +00:00
Julian Descottes 272b4e18e5 Bug 1790898 - [devtools] Remove gap in the storage editor navigation sidebar r=nchevobbe
This was added in the original landing of the TreeWidget.
Nowadays this is only used by the storage inspector and I haven't seen any bad side effect.

Differential Revision: https://phabricator.services.mozilla.com/D157368
2022-09-15 05:33:13 +00:00
Ryan VanderMeulen 083930f0c5 Bug 1790929 - Update protobuf to version 21.6. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D157391
2022-09-15 01:33:24 +00:00
Julian Descottes 87ef6aa2ff Bug 1790753 - [devtools] Track all devtools sockets in DevToolsSocketStatus r=ochameau,Gijs
The DevToolsSocketStatus could be misleading for any usage other than the current one from browser.js since it misses browser toolbox sockets

This patch allows the singleton to track all sockets but changes the API to allow consumers to exclude browser toolbox sockets.

Differential Revision: https://phabricator.services.mozilla.com/D157300
2022-09-14 19:11:22 +00:00
Julian Descottes 94456f0f52 Bug 1790821 - [devtools] Fix resizing side-docked toolbox using the splitter r=ochameau,emilio
Adding a test explicitly resizing the toolbox by manipulating the splitter in both horizontal and vertical configurations

Differential Revision: https://phabricator.services.mozilla.com/D157339
2022-09-14 19:04:57 +00:00
Marian-Vasile Laza e8b90ffd2f Backed out changeset a50d707b3bbc (bug 1769534) for causing debugger frame failures. CLOSED TREE 2022-09-14 17:05:11 +03:00
Pierre de La Morinerie 5211456a86 Bug 1769534 - preserve NBSP when copying HTML content. r=hsivonen
To workaround the historical lack of 'white-space: pre', when an user
wants to compose HTML text with several consecutive spaces, WYSIWYG
HTML editors insert an alternating pattern of SPACE and NBSP to avoid
spaces being collapsed.

This is why browsers, when copying HTML content, usually strip all NBSP
from the copied text.

This commit changes the copying behavior, to strip only NBSP that were
potentially generated by an editor (and preserve the others).

The heuristic used is "An NBSP adjacent to a regular space doesn't make
sense, and can be replaced by a regular space". This detects the
alternating pattern of SPACE/NBSP, but also a space followed by a long
sequence of NBSP (because a line break would occur anyway in that case).

NB: included is a change that makes devtools use regular spaces
(rather than NBSPs) to indent stacktrace frames. This prevent NBSPs from
appearing in the clipboard when copying a stacktrace.

Attribution: the actual nsPlainTextSerializer changes were written by
Rachel Martin <rachel@betterbird.eu>, as a part of Betterbird.

Differential Revision: https://phabricator.services.mozilla.com/D149644
2022-09-14 13:13:51 +00:00
Evgenii Simakin a530884ea9 Bug 1595119 - Fix wrong slicing of displayed WebSocket messages in devtools when 'Keep all future messages' is enabled r=Honza
In addition to that, this will fix minor styles issues with 'truncated messages' box.

Differential Revision: https://phabricator.services.mozilla.com/D155763
2022-09-14 08:40:48 +00:00
Alexandre Poirot 768d312e90 Bug 1790013 - [devtools] Fix browser_net_har_copy_all_as_har.js intermitent. r=bomsy
When reloading twice, we weren't waiting for the two reload requests.

Differential Revision: https://phabricator.services.mozilla.com/D157093
2022-09-14 08:37:06 +00:00
Henrik Skupin 0a815d2001 Bug 1790559 - [devtools] Update MDN compat data (2022 September 13th week) r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D157191
2022-09-13 11:59:38 +00:00
Emilio Cobos Álvarez f2c192212d Bug 1790299 - Make XUL splitter use height property rather than attribute. r=jdescottes,tnikkel
Existing splitter and DevTools tests keep passing with this.

Differential Revision: https://phabricator.services.mozilla.com/D157062
2022-09-13 10:02:05 +00:00
Nicolas Chevobbe 5bfeb8f498 Bug 1788601 - [devtools] Fix ESLint consistent-return failures in devtools/client/framework. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D156159
2022-09-12 17:41:33 +00:00
Nicolas Chevobbe fa06502ad1 Bug 1788594 - [devtools] Fix ESLint consistent-return failures in devtools/client/debugger/. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D156156
2022-09-12 17:41:33 +00:00
Mark Banner 186d63f202 Bug 1479515 - Add an ESLint rule to check for valid property accesses on Services. r=Gijs
This is manually run and requires a full build. MOZ_OBJDIR needs to be set to point to the object directory.

Differential Revision: https://phabricator.services.mozilla.com/D156426
2022-09-12 16:38:44 +00:00
Alexandre Poirot 58aaf052d7 Bug 1789256 - [devtools] Fix displaying sources when reloading a web extension. r=bomsy
I think we have a special edge case here, where we do have a navigation,
but no new top level target is notified.
In regular devtools/webpages, we should have a new top level target notified to the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D156467
2022-09-12 11:44:46 +00:00
Hubert Boma Manilla dab890653a Bug 1789363 - [devtools] Support specifying the source actor to the load the source text r=ochameau
This patch enables specifying a source actor to load the source text content

Differential Revision: https://phabricator.services.mozilla.com/D154778
2022-09-12 10:32:03 +00:00
Nicolas Chevobbe 0f42f58871 Bug 1789973 - [devtools] Remove unused RemoteSettings script and update documentation. r=jdescottes.
Now that the script is run on automation, there's no need to have
a (different) version in tree.
The documentation is also updated to explain the current setup.

Differential Revision: https://phabricator.services.mozilla.com/D156930
2022-09-09 14:20:27 +00:00
Mariana Picolo 5e049236e4 Bug 1621919 - Update constant for format bytes. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D66917
2022-09-09 11:32:02 +00:00
Alexandre Poirot 3c1d82f3c1 Bug 1789595 - [devtools] Migrate require to new devtools/server's ESM to ChromeUtils.importESModule. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D156827
2022-09-09 10:13:15 +00:00
Alexandre Poirot 393e94ddf0 Bug 1789595 - [devtools] Convert devtools/server JSM to ES Modules. r=nchevobbe
This is the result of:
$ ./mach esmify devtools/server/

Differential Revision: https://phabricator.services.mozilla.com/D156826
2022-09-09 10:13:15 +00:00
Alexandre Poirot 573f380baf Bug 1789202 - [devtools] Expose ChromeUtils as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.ChromeUtils.)/d" $(git grep -l 'require("ChromeUtils")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .ChromeUtils./d" $(git grep -l 'loader.lazyRequireGetter(this, "ChromeUtils"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js + manual eslint fixes

Differential Revision: https://phabricator.services.mozilla.com/D156402
2022-09-09 07:22:51 +00:00
Alexandre Poirot 7f9229d43d Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
justchen1369 4743055749 Bug 1789765 - Fix broken links to 'Fluent for Firefox Developers' page. r=firefox-source-docs-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D156761
2022-09-08 19:03:25 +00:00
Hubert Boma Manilla 954bd93334 Bug 1780544 - Increase the storage size limit for the resent request r=jdescottes
This patch switches to using indexedDB to for more space.
Some cleanups.

Differential Revision: https://phabricator.services.mozilla.com/D155239
2022-09-08 10:51:43 +00:00
Emilio Cobos Álvarez a11c622dc7 Bug 1786147 - Remove layout.css.webkit-line-clamp.enabled, and add a new pref to apply line-clamp to all BFCs. r=dholbert
It's always true, so remove it.

Add another pref to allow -webkit-line-clamp to work on all blocks
rather than just legacy -webkit-boxes, which seems something we should
try to look into, eventually.

Depends on D155181

Differential Revision: https://phabricator.services.mozilla.com/D155182
2022-09-07 23:57:18 +00:00
Noemi Erli 539bbccc5d Backed out 2 changesets (bug 1780912) for causing failures in browser_aboutdebugging_addons_debug_console.js CLOSED TREE
Backed out changeset d2360a2a3d70 (bug 1780912)
Backed out changeset 21f1e9031be0 (bug 1780912)
2022-09-08 01:59:18 +03:00
Alexandre Poirot 80c9c861dd Bug 1780912 - [devtools] Make the local web extension toolbox be always on top. r=nchevobbe,eemeli
This allows to keep the DevTools visible while interacting with the Firefox
window where the extension is running.

This behavior is enabled by default, but can be disable on-demand via a button
in the top toolbar.
Note that it requires to close and reopen the window/toolbox as platform APIs
disallow changing this behavior "live" on a given window.

Differential Revision: https://phabricator.services.mozilla.com/D155843
2022-09-07 21:00:17 +00:00