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

26355 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 63f3faaca9 Bug 1695565 - Fix appearance-cssom-001.html. r=boris
* Remove some legacy appearance aliases that other engines don't
   implement.

 * Allow to pass with unimplemented <compat-auto> values, since per the
   spec the idea of these is to get them removed, see
   https://github.com/w3c/csswg-drafts/issues/8506 for the ones we don't
   implement.

 * Also allow the `-moz-` prefix to be implemented, because we can't
   quite get rid of it (people use it to remove the <input type=number>
   buttons with -moz-appearance: textfield and so on), and the
   alternative is to implement a bunch of non-standard ::-webkit-
   pseudo-elements.

Differential Revision: https://phabricator.services.mozilla.com/D171243
2023-03-01 12:16:01 +00:00
ogiorgis df034b803f Bug 1749473 - fix some typos in doc r=firefox-source-docs-reviewers,sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D171191
2023-03-01 09:35:11 +00:00
Nicolas Chevobbe b3e99300e3 Bug 1819350 - [devtools] Simplify prettyFast sanitize function. r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D171242
2023-03-01 08:59:48 +00:00
Nicolas Chevobbe 481a7720b5 Bug 1819269 - [devtools] Make disableEmptyLines faster. r=jdescottes
- Replace `codeMirror.eachLine` with a simple for loop
- Change `fromEditorLine` signature so it takes a new parameter indicating
  if the source is wasm. This allows us to only compute this information once
  per file, and not for each line of a file.

Differential Revision: https://phabricator.services.mozilla.com/D171187
2023-03-01 08:59:47 +00:00
Nicolas Chevobbe e314893b9e Bug 1819268 - [devtools] Don't add sourceFile when fetching tokens for pretty-printing. r=jdescottes.
We don't make any use of this information, so we'd better not pass the option.

Differential Revision: https://phabricator.services.mozilla.com/D171186
2023-03-01 08:59:47 +00:00
Butkovits Atila 282f7ac462 Backed out 3 changesets (bug 1819350, bug 1819269, bug 1819268) for causing Bug 1819531. CLOSED TREE
Backed out changeset 8cbaead8a604 (bug 1819350)
Backed out changeset 52980b1f16ff (bug 1819269)
Backed out changeset 596dd10a439d (bug 1819268)
2023-03-01 09:56:18 +02:00
Nicolas Chevobbe e898d9dfb0 Bug 1819350 - [devtools] Simplify prettyFast sanitize function. r=devtools-reviewers,jdescottes
Depends on D171187

Differential Revision: https://phabricator.services.mozilla.com/D171242
2023-03-01 06:40:13 +00:00
Nicolas Chevobbe 52949ca30c Bug 1819269 - [devtools] Make disableEmptyLines faster. r=jdescottes
- Replace `codeMirror.eachLine` with a simple for loop
- Change `fromEditorLine` signature so it takes a new parameter indicating
  if the source is wasm. This allows us to only compute this information once
  per file, and not for each line of a file.

Differential Revision: https://phabricator.services.mozilla.com/D171187
2023-03-01 06:40:13 +00:00
Nicolas Chevobbe 17cac7f256 Bug 1819268 - [devtools] Don't add sourceFile when fetching tokens for pretty-printing. r=jdescottes.
We don't make any use of this information, so we'd better not pass the option.

Differential Revision: https://phabricator.services.mozilla.com/D171186
2023-03-01 06:40:13 +00:00
Nicolas Chevobbe bd0b910899 Bug 1818228 - [devtools] Don't send ChromeWorker messages to WindowGlobal targets. r=devtools-reviewers,bomsy
Those message could be evaluated by WindowGlobal targets living in
parent process (e.g. about:robots).
A test case is added to ensure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D170864
2023-02-28 16:31:21 +00:00
Cristina Horotan fc1a4074d8 Backed out 2 changesets (bug 1819268, bug 1817728) for causing devtools-bundle failure. CLOSED TREE
Backed out changeset 2da5ed051ee6 (bug 1819268)
Backed out changeset e8ff7001217f (bug 1817728)
2023-02-28 17:18:53 +02:00
Nicolas Chevobbe 3e31876b68 Bug 1819268 - [devtools] Don't add sourceFile when fetching tokens for pretty-printing. r=jdescottes.
We don't make any use of this information, so we'd better not pass the option.

Depends on D171185

Differential Revision: https://phabricator.services.mozilla.com/D171186
2023-02-28 15:02:08 +00:00
Nicolas Chevobbe ff63c3a66f Bug 1818687 - [devtools] Remove getBreakpointPositions from SourceActor spec. r=devtools-backward-compat-reviewers,devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D170850
2023-02-28 11:08:51 +00:00
Julian Descottes 55ea916ad2 Bug 1767722 - Wait for computed view property to be expanded r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D171160
2023-02-28 06:41:11 +00:00
Julian Descottes e3ffd36f3f Bug 1811544 - [devtools] Always wait for target in aboutdebugging tests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D171131
2023-02-28 06:39:10 +00:00
Emilio Cobos Álvarez 22b93499fa Bug 1818811 - Make -moz-box-layout: flex default, and clean-up CSS. r=Gijs,extension-reviewers,settings-reviewers,desktop-theme-reviewers,dao
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.

Differential Revision: https://phabricator.services.mozilla.com/D170944
2023-02-27 12:41:13 +00:00
Emilio Cobos Álvarez 755b25a9cf Bug 1818927 - Remove minimal-xul.css. r=dholbert
No longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D171012
2023-02-27 10:03:51 +00:00
Norisz Fay feb7ac30db Backed out 6 changesets (bug 1818927) for causing bc failurs on browser_parsable_css.js CLOSED TREE
Backed out changeset 02c5f8c116b5 (bug 1818927)
Backed out changeset 6cf817fdd398 (bug 1818927)
Backed out changeset 0f0342ee4149 (bug 1818927)
Backed out changeset 4f944842cde4 (bug 1818927)
Backed out changeset 08ad4bea30d6 (bug 1818927)
Backed out changeset f50bb20ae41d (bug 1818927)
2023-02-27 02:49:46 +02:00
Hubert Boma Manilla 9a6b2ae75a Bug 1817984 - [devtools] Add Search Modifiers for the project search component r=ochameau
In this patch
- Move search modifiers support into the SearchInput component, so that it can be shared across the Project Search, File Search and the Quick modal Search.
- Add on the actions, reducers and workers support for search modifiers to project search

Differential Revision: https://phabricator.services.mozilla.com/D168932
2023-02-26 23:45:00 +00:00
Emilio Cobos Álvarez 7d1f38cdfa Bug 1818927 - Remove minimal-xul.css. r=dholbert
No longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D171012
2023-02-26 23:09:20 +00:00
Butkovits Atila e3ed6cac3a Backed out changeset 5aa8652bdc97 (bug 1817984) for causing failures at browser_dbg-project-search.js. CLOSED TREE 2023-02-27 00:03:47 +02:00
Hubert Boma Manilla 49cc07f365 Bug 1817984 - [devtools] Add Search Modifiers for the project search component r=ochameau
In this patch
- Move search modifiers support into the SearchInput component, so that it can be shared across the Project Search, File Search and the Quick modal Search.
- Add on the actions, reducers and workers support for search modifiers to project search

Differential Revision: https://phabricator.services.mozilla.com/D168932
2023-02-26 19:34:02 +00:00
Noemi Erli 45aba48e02 Backed out 4 changesets (bug 1814607, bug 1814608, bug 1809168) for causing devtools failures CLOSED TREE
Backed out changeset 8f7f098d9af0 (bug 1809168)
Backed out changeset aff754cf0b3f (bug 1814607)
Backed out changeset 2e41f4a14afd (bug 1814608)
Backed out changeset abc019424cec (bug 1814608)
2023-02-25 07:42:13 +02:00
Alexandre Poirot 5f7276272b Bug 1809168 - [devtools] Update debugger watch expression after page is fully reloaded. r=devtools-reviewers,bomsy
We weren't trying to update the expression around any event related to navigation/reload!
I chose to update them with the latest possible event. navigate/DOCUMENT_EVENT's dom-complete,
which is equivalent to the "load" event.
If we want to update it earlier... we should probably update it more than once per navigation.

Also, I'm tweaking navigateTo test helper to ensure waiting for debugger's reloaded event.
It ensure that all navigate test helper will only resume after the navigated action resolves.

Differential Revision: https://phabricator.services.mozilla.com/D166421
2023-02-24 23:10:31 +00:00
Alexandre Poirot 43b46c81da Bug 1814607 - [devtools] Wait for debugger frontend async work on navigation in all tests. r=devtools-reviewers,nchevobbe
We weren't waiting for "reloaded" event of the debugger and so potentialy resolving
before some async work completed during page navigation.

The main challenge here is that when the test pause the navigation,
`navigate`  and `reload` test helpers will no longer resolve until the debugger resumes
execution.

I also had to tweak the DOCUMENT_EVENT support for WebExtension.
We still have to accept "frame switching" for WebExt (while keeping it off for the browser toolbox).
Otherwise the debugger doesn't update when reloading the addon or switching between addon documents.

Differential Revision: https://phabricator.services.mozilla.com/D169074
2023-02-24 23:10:30 +00:00
Alexandre Poirot f47a809f72 Bug 1814608 - [devtools] Fix breakable lines of inline script. r=bomsy,devtools-reviewers
Breakable lines could easily be missed when reloading.
The very original issue is that SourceActor.getBreakableLines can't be called too early during the page load.
The SourceActor may not have received enough content of the HTML page and the HTML string may not
include the inline script sources itself.
This lead to wrong `_startLineColumnDisplacement` being set to zero and breakable lines
of the inline script are starting from the very first line of the HTML page, instead of where the <script> starts.

Then... the frontend somewhat worksaround that very implicitely and not correctly.
The key is to force fetching the breakable lines after the source text content is fetched.

Covering this isn't trivial as this is a race condition.
But I expanded the coverage in feature tests and tweaked browser_dbg-inline-script-offset.js
which could fail intermittently and no longer fail with this patch and the next one applied.

Differential Revision: https://phabricator.services.mozilla.com/D169073
2023-02-24 23:10:30 +00:00
Alexandre Poirot 4769ecd1d3 Bug 1814608 - [devtools] Simplify source actor breakable line computation. r=devtools-reviewers,nchevobbe
* Remove the usage of PROMISE action, which isn't used
* Remove the memoizedAction as the reducer is already memoizing the breakableLines

All of this is only useful if we call setBreakableLines concurrently while
this is already in process of being loading.
This may still be theoriticaly possible between newSources and select actions.
But we should rather better coordinate when we pull breakable lines rather than
introduce such complexity. i.e. reduce the number of callsites requiring to load them.

Differential Revision: https://phabricator.services.mozilla.com/D169072
2023-02-24 23:10:30 +00:00
CanadaHonk 78f2bff811 Bug 1818269 - Implement URLSearchParams size getter r=emilio
Implemented size getter for URLSearchParams.

Spec: https://url.spec.whatwg.org/#dom-urlsearchparams-size

WPT tests (4/4 now pass):
https://github.com/web-platform-tests/wpt/blob/master/url/urlsearchparams-size.any.js
(test not synced into mozilla-central currently)

Differential Revision: https://phabricator.services.mozilla.com/D170768
2023-02-24 17:47:51 +00:00
Alexandre Poirot 050a0d45e2 Bug 1704690 - [devtools] Allow overriding request content with a local file. r=valentin,devtools-backward-compat-reviewers,bomsy,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D163600
2023-02-24 12:11:28 +00:00
Bob Owen c06ee8016f Bug 1772089 p3: Remove content temp dir from PathUtils. r=barret
This changes tempDir to be the OS temp to prevent churn, because it has many
more uses than osTempDir.

Differential Revision: https://phabricator.services.mozilla.com/D168594
2023-02-24 08:44:41 +00:00
Sebastian Zartner 3c6fb1115c Bug 1818090 - Adjusted custom formatter styling to use inline-flex. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D170609
2023-02-24 06:58:25 +00:00
Sebastian Zartner 3dc23d02d5 Bug 1818090 - Added custom formatting support for position: relative and align-* and justify-* properties. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D170607
2023-02-24 06:58:25 +00:00
Nicolas Chevobbe 4496cc6781 Bug 1818205 - [devtools] Update debugger jest obsolete snapshots. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D170600
2023-02-23 06:01:05 +00:00
Khadija Kamran edccfac574 Bug 1809912 - Apply same styling to Block and Resend buttons in Network Monitor r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D170577
2023-02-23 05:56:26 +00:00
Brad Werth db47bce4aa Bug 1815140 Part 2: Make grid highlighter hasMoved directly compare the grid fragment objects. r=devtools-reviewers,jdescottes
The Grid objects will be regenerated whenever the grid is reflowed, which
is nearly the same to the old check of comparing the contents of the
grid structure. This approach is prone to false positives, which is
explained in a new comment.

Differential Revision: https://phabricator.services.mozilla.com/D169725
2023-02-23 01:07:34 +00:00
Barret Rennie ff1fad1a73 Bug 1817036 - Remove osfile.jsm and ospath.jsm usage from devtools/ r=ochameau
The implementation of base-loader operates on stringly-typed URIs with path
methods. Refactoring this module to use paths and URIs is beyond the scope of
removing OS.File, so the methods from ospath_unix.jsm have been copied into the
module.

Differential Revision: https://phabricator.services.mozilla.com/D170107
2023-02-22 18:15:40 +00:00
Julian Descottes 4f16b3efaa Bug 1818037 - [devtools] Update test for text selection in netmonitor response preview r=ochameau
Depends on D170405

Fails without the previous patch, passes now

Differential Revision: https://phabricator.services.mozilla.com/D170503
2023-02-21 18:11:24 +00:00
Alexandre Poirot e480cacaee Bug 1817857 - [devtools] Allow copying text from netmonitor HTML previews. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D170405
2023-02-21 17:00:16 +00:00
Julian Descottes 06671ab852 Bug 1817659 - [devtools] Sort netmonitor test manifest alphabetically r=bomsy
Depends on D170346

Differential Revision: https://phabricator.services.mozilla.com/D170357
2023-02-21 16:49:40 +00:00
Julian Descottes 21205adeda Bug 1817659 - [devtools] Catch isFromCache exception in network observer r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D170346
2023-02-21 16:49:40 +00:00
Emilio Cobos Álvarez 5f6910e75e Bug 1817071 - Remove -moz-image-region support from layout. r=layout-reviewers,tnikkel
There are no users of non-auto values, so we can just simplify some code and
remove the property.

Differential Revision: https://phabricator.services.mozilla.com/D170010
2023-02-21 12:19:44 +00:00
Alexandre Poirot 1715c2ffcb Bug 1817729 - [devtools] Ensure computing Actor's requestTypes only once. r=jdescottes
This complex object used to be computed only once per Class,
but this regressed to be computed once per Class instance.

Differential Revision: https://phabricator.services.mozilla.com/D170412
2023-02-21 10:48:35 +00:00
Cosmin Sabou 720942a247 Backed out 3 changesets (bug 1815140) for causing wrapper related dt failures. CLOSED TREE
Backed out changeset 0380de95a301 (bug 1815140)
Backed out changeset dd7288d15da0 (bug 1815140)
Backed out changeset 7f50487ea10c (bug 1815140)
2023-02-21 07:15:20 +02:00
Brad Werth 58d5d29387 Bug 1815140 Part 2: Make grid highlighter hasMoved directly compare the grid fragment objects. r=devtools-reviewers,jdescottes
The Grid objects will be regenerated whenever the grid is reflowed, which
is nearly the same to the old check of comparing the contents of the
grid structure. This approach is prone to false positives, which is
explained in a new comment.

Differential Revision: https://phabricator.services.mozilla.com/D169725
2023-02-21 04:06:37 +00:00
Alexandre Poirot 8436152f72 Bug 1815888 - [devtools] Always use source-maps util module getOriginalLocation method. r=devtools-reviewers,bomsy
See previous changeset for the rationale of this change.

Differential Revision: https://phabricator.services.mozilla.com/D169329
2023-02-20 22:28:15 +00:00
Alexandre Poirot 0df99cad60 Bug 1815888 - [devtools] Always use source-maps util module getGeneratedLocation method. r=devtools-reviewers,bomsy
For now, the debugger frontend either directly query sourceMapLoader.getGeneratedLocation
or use the util's module helper.
We should unify before the utils module helper so that we can later append
the source object on the output of the sourceMapLoader.

Also simplified a bit various code passing both getState+sourceMapLoader
by handing over the thunkArgs.
The util's module helper requires state, so that this changes forces to
pass thunkArgs to some nested callsites of getGeneratedLocation.

Differential Revision: https://phabricator.services.mozilla.com/D169328
2023-02-20 22:28:15 +00:00
Emilio Cobos Álvarez cdf68c5e2d Bug 1817381 - Ignore OS zoom in devtools. r=devtools-reviewers,nchevobbe
What devtools wants to do is ignoring the website-specific zoom.

It seems KDE 5.27 on X11 uses the text scale factor to implement scaling
of GTK apps completely (including Firefox), rather than the global
integer GTK scaling combined with it.

This makes this difference way more obvious than it otherwise would.

Differential Revision: https://phabricator.services.mozilla.com/D170195
2023-02-20 16:35:04 +00:00
Iulian Moraru f1044dc7cc Backed out 2 changesets (bug 1815888) for causing node devtools tests failures. CLOSED TREE
Backed out changeset 98319eb646a8 (bug 1815888)
Backed out changeset 9ec47b10124d (bug 1815888)
2023-02-20 11:35:52 +02:00
Alexandre Poirot 14063bb00f Bug 1815888 - [devtools] Always use source-maps util module getOriginalLocation method. r=devtools-reviewers,bomsy
See previous changeset for the rationale of this change.

Differential Revision: https://phabricator.services.mozilla.com/D169329
2023-02-20 08:57:35 +00:00
Alexandre Poirot 25067719b7 Bug 1815888 - [devtools] Always use source-maps util module getGeneratedLocation method. r=devtools-reviewers,bomsy
For now, the debugger frontend either directly query sourceMapLoader.getGeneratedLocation
or use the util's module helper.
We should unify before the utils module helper so that we can later append
the source object on the output of the sourceMapLoader.

Also simplified a bit various code passing both getState+sourceMapLoader
by handing over the thunkArgs.
The util's module helper requires state, so that this changes forces to
pass thunkArgs to some nested callsites of getGeneratedLocation.

Differential Revision: https://phabricator.services.mozilla.com/D169328
2023-02-20 08:57:35 +00:00
Hubert Boma Manilla bb0012737e Bug 1811004 - [devtools] Rename project search selectors accordingly r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D169900
2023-02-20 08:49:00 +00:00
Hubert Boma Manilla 835172e052 Bug 1811004 - [devtools] Make the search modifiers a shared component r=ochameau
This patch makes the search modifiers a shared component so we can
use this for project search.

Differential Revision: https://phabricator.services.mozilla.com/D168931
2023-02-20 08:48:59 +00:00
Cristina Horotan f46d639f99 Backed out changeset 9d6e541704c3 (bug 1817381) for causing multiple dt failures on a CLOSED TREE 2023-02-20 11:00:48 +02:00
Emilio Cobos Álvarez b2be5a926e Bug 1817381 - Ignore OS zoom in devtools. r=devtools-reviewers,nchevobbe
What devtools wants to do is ignoring the website-specific zoom.

It seems KDE 5.27 on X11 uses the text scale factor to implement scaling
of GTK apps completely (including Firefox), rather than the global
integer GTK scaling combined with it.

This makes this difference way more obvious than it otherwise would.

Differential Revision: https://phabricator.services.mozilla.com/D170195
2023-02-20 08:01:42 +00:00
Mark Banner 8acde8d74e Bug 1816934 - Update consumers of services/settings to import ES modules directly. r=leplatrem,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,robwu
Differential Revision: https://phabricator.services.mozilla.com/D169934
2023-02-17 19:32:06 +00:00
Cristian Tuns b3bf09cc0d Backed out 6 changesets (bug 1816934, bug 1817182, bug 1817179, bug 1817183) for causing dt failures in browser_jsterm_autocomplete_null.js CLOSED TREE
Backed out changeset 17d4c013ed92 (bug 1817183)
Backed out changeset cfed8d9c23f3 (bug 1817183)
Backed out changeset 62fe2f589efe (bug 1817182)
Backed out changeset 557bd773fb85 (bug 1817179)
Backed out changeset 7f8a7865868b (bug 1816934)
Backed out changeset d6c1d4c0d2a0 (bug 1816934)
2023-02-17 10:51:33 -05:00
Mark Banner aec4c1293b Bug 1816934 - Update consumers of services/settings to import ES modules directly. r=leplatrem,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,robwu
Differential Revision: https://phabricator.services.mozilla.com/D169934
2023-02-17 09:01:43 +00:00
Fred Chasen cb0a8abc0b Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-16 21:29:07 +00:00
Alexandre Poirot 21d7ca47f7 Bug 1815845 - [devtools] Simplify code related to opening sources in the debugger. r=devtools-reviewers,bomsy
Most of the API exposed on Debugger panel object were actually related to view-source code.
The code related to getOriginalLocation could be greatly factorized with existing helpers
within the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D169327
2023-02-16 13:01:47 +00:00
Alexandre Poirot d146bacd36 Bug 1815497 - [devtools] Simplify a few things around pretty printing. r=devtools-reviewers,nchevobbe
* remove prettyPrint.spec.js as it only contains trivial assertions mostly covered by mochitests.
  Duplicated calls to toggle pretty print to the same source has been converted to a mochitest (browser_dbg-pretty-print-flow.js).
  But we can't easily replicate the exact same assertion as the assert() from `togglePrettyPrint` only thows on Node...
  I tweaked assert module to highlight how to try enabling it on mochitests via flags.testing.

  Removing this jest test helps remove useless export of `createPrettyPrintSource`, better highlighting the external API of prettyPrint.js
  About the mochitest, awaiting for togglePrettyPrint makes it useless to wait asynchronously for tabs opening.

* I removed a jest test from project-text-search.spec.js which started failing
  and should already be covered by mochitests?

* about `selectPrettyLocation`, we do not need to pass the generatedLocation argument,
  as this is always the currently selected location. Also we were selecting it once,
  mostly to force the loading of the original/pretty source via `selectSource()`.
  And then we were calling `selectSpecificLocation` a second time.
  We could select the source only once, if we force loading the original source first.
  We only need to populate the SourceMapLoader before trying to update the selection.
  This change may slow down the display of pretty printed source, but should avoid intermittents
  and unexpected changes of selected location.

* last but not least, `setSymbols` can be removed as this is done when calling `selectLocation`.
  This was the main goal, so that we can revise `setSymbols` more easily in following patches.

Differential Revision: https://phabricator.services.mozilla.com/D168425
2023-02-16 13:01:46 +00:00
Nicolas Chevobbe b6b0dae2b9 Bug 1816342 - [devtools] Fix `valid` getter in color.js. r=ochameau.
It used to return true only if `colorToRGBA` wasn't returning null.
We changed it to be an alias of `isValidCSSColor` but this had unintended effect
We need to consider a color valid if we can get the rgba tuples from it, as we
need them to run the different methods/operation in this module.

Differential Revision: https://phabricator.services.mozilla.com/D169592
2023-02-15 15:54:20 +00:00
Nazım Can Altınova 4329b54f0b Bug 1814908 - Reword the nomarkerstacks feature name and description r=florian,julienw
Differential Revision: https://phabricator.services.mozilla.com/D169111
2023-02-15 15:53:27 +00:00
Nazım Can Altınova a4089e0540 Bug 1814908 - Rename the noiostacks to nomarkerstacks r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169110
2023-02-15 15:53:27 +00:00
Nicolas Chevobbe b6d590468c Bug 1814668 - [devtools] Add test to check page state after closing RDM. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D169914
2023-02-15 14:50:12 +00:00
Christian Sonne a61bb317db Bug 1468404 - add subgrid to list of suggestions for grid-template-* properties r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169862
2023-02-14 22:48:11 +00:00
Dennis Jackson dd19a9405c Bug 1804460 - Add detailed connection info to WebRequest GetSecurityInfo API. r=keeler,devtools-backward-compat-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D164092
2023-02-14 17:24:46 +00:00
Butkovits Atila 699dd296eb Backed out 4 changesets (bug 1814908) for causing Xpcshell failures at test_addProfilerMarker.js. CLOSED TREE
Backed out changeset 07252e8b15df (bug 1814908)
Backed out changeset 14f79f14b429 (bug 1814908)
Backed out changeset d9bdfd2796a8 (bug 1814908)
Backed out changeset 78e1485fe526 (bug 1814908)
2023-02-14 17:43:32 +02:00
Alexandre Poirot 0caf39c7dc Bug 1816635 - [devtools] Move conn nullification to Pool. r=jdescottes
So that it isn't only done for Actors, but also for all Fronts.

Differential Revision: https://phabricator.services.mozilla.com/D169800
2023-02-14 14:47:17 +00:00
Nazım Can Altınova 010a0816e8 Bug 1814908 - Reword the nomarkerstacks feature name and description r=florian,julienw
Differential Revision: https://phabricator.services.mozilla.com/D169111
2023-02-14 14:11:42 +00:00
Nazım Can Altınova 4fdbbc649f Bug 1814908 - Rename the noiostacks to nomarkerstacks r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169110
2023-02-14 14:11:42 +00:00
Norisz Fay 6e54d85e3b Backed out 4 changesets (bug 1814908) for causing cppunit failures on TestBaseProfiler CLOSED TREE
Backed out changeset 4fd5e3f3d87b (bug 1814908)
Backed out changeset 6a716b16e8e3 (bug 1814908)
Backed out changeset a8557338bd74 (bug 1814908)
Backed out changeset b1a9a1820b56 (bug 1814908)
2023-02-14 14:44:31 +02:00
Nazım Can Altınova f3ad62f388 Bug 1814908 - Reword the nomarkerstacks feature name and description r=florian,julienw
Differential Revision: https://phabricator.services.mozilla.com/D169111
2023-02-14 11:42:27 +00:00
Nazım Can Altınova 14ec874db5 Bug 1814908 - Rename the noiostacks to nomarkerstacks r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169110
2023-02-14 11:42:27 +00:00
Alexandre Poirot a7482e3a96 Bug 1813648 - [devtools] Remove ActorClassWithSpec and all its dependencies. r=devtools-reviewers,jdescottes
Some actors weren't using any specification. They now have to pass a bare minimal spec object.
Unifying them to the regular Actor interface helps merging constructor with initialize
and instantiate all the actors without any code branch.

Differential Revision: https://phabricator.services.mozilla.com/D169359
2023-02-14 10:34:19 +00:00
Alexandre Poirot 09e00fefc6 Bug 1813477 - [devtools] Convert all tests still using ActorClassWithSpec. r=devtools-reviewers,perftest-reviewers,jdescottes,sparky
Differential Revision: https://phabricator.services.mozilla.com/D169358
2023-02-14 10:34:19 +00:00
Alexandre Poirot 47b8b20969 Bug 1813479 - [devtools] Convert ObjectActor and PauseScopedObjectActor to ES Classes. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169238
2023-02-14 10:34:18 +00:00
Marian-Vasile Laza 91a3c1e0ce Backed out changeset f4fe07518400 (bug 1591210) for web-platform failures on forced-colors-mode-14.html. CLOSED TREE 2023-02-14 06:40:31 +02:00
Fred Chasen 6f6759dce8 Bug 1591210 - Add forced-color-adjust property r=emilio
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.

Differential Revision: https://phabricator.services.mozilla.com/D169000
2023-02-14 00:52:26 +00:00
Gijs Kruitbosch 387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Julian Descottes 66eca9e88c Bug 1757457 - [devtools] Recompute mCanExecuteScripts after navigation r=smaug
I can see that after navigation, allowJavascript is correctly set for the browsing context, but it seems we need to call
RecomputeCanExecuteScripts() to force it to be applied to the new page. Not sure if doing this here makes sense or if it should be done earlier.

Also there are still other issues with this feature:
- closing the toolbox does not reload the page: meaning JavaScript remains disabled on the page
- similarly all pages which have been put in bfcache will retain the javascript disabled/enabled setting

For the first issue, I wonder if we should force a reload when closing the toolbox (iff javascript disabled was toggled).
And for the second issue, could we invalidate contexts put in bfcache for a given browsing context when we toggle allowJavaScript?

Olli: Does this change make sense at least to fix the basic issue?

Differential Revision: https://phabricator.services.mozilla.com/D169182
2023-02-13 17:52:51 +00:00
Julien Wajsberg 1dccac0c2b Bug 1811853 - Reorder the performance panel's components directory between components for about:profiling and the ones for the devtools panel r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167852
2023-02-13 16:46:42 +00:00
Julien Wajsberg eaf4ef45e7 Bug 1811853 - Update the README file for the performance devtools panel r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167851
2023-02-13 16:46:41 +00:00
Julien Wajsberg a9521c9c6c Bug 1811853 - Move the panel related files to a new subdirectory panel/ r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167850
2023-02-13 16:46:41 +00:00
Julien Wajsberg d56fd8a7a4 Bug 1811853 - Rename panel.jsm.js to logic.jsm.js, to better reflect its content r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167849
2023-02-13 16:46:40 +00:00
Julien Wajsberg ccfe550642 Bug 1811853 - Move the performance panel's browser component to the shared/ directory r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167848
2023-02-13 16:46:40 +00:00
Julien Wajsberg defba62b91 Bug 1811853 - Move utilities files to shared/ r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167847
2023-02-13 16:46:40 +00:00
Julien Wajsberg 58de75b2da Bug 1811853 - Move symbolication files to the shared/ directory r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167846
2023-02-13 16:46:38 +00:00
Julien Wajsberg 686ac4bb70 Bug 1811853 - Move background.jsm.js to a shared subdirectory r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167845
2023-02-13 16:46:38 +00:00
Julien Wajsberg 6fa044fc63 Bug 1811853 - Merge gecko-profiler-interface.js into the perf actor r=jdescottes,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167844
2023-02-13 16:46:38 +00:00
Julien Wajsberg 6712709070 Bug 1811853 - Slightly simplify recording-utils to make the function easier to read r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D167842
2023-02-13 16:46:37 +00:00
Nicolas Chevobbe 15e9036e65 Bug 1777608 - [devtools] Change how we render cropped URLs in String rep. r=bomsy.
Instead of rendering the cropped URL, we split the URL in 3 parts, so the full
URL text will be in the DOM, but we visually hide the middle part and replace
it with an ellipsis.
This way copying the message will still put the full URL in the clipboard.
A test case is added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D165805
2023-02-13 16:01:21 +00:00
Nicolas Chevobbe 7e975e93bc Bug 1807140 - [devtools] Re-enable browser_jsterm_await_paused.js on asan/tsan. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D169590
2023-02-13 15:39:46 +00:00
Alexandre Poirot 3965e85132 Bug 1800916 - [devtools] Allow interactions with HTML previews in netmonitor. r=devtools-reviewers,bomsy
It might be misleading to allow interactions with HTML previews.
Links/forms may navigate to another URL without any way to navigate back.
But it sounds unlikely this will lead to major security issue,
while letting users copy and paste partial pieces of these previews.

Differential Revision: https://phabricator.services.mozilla.com/D169075
2023-02-13 15:14:49 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Nicolas Chevobbe c76f6f7fa5 Bug 1815877 - [devtools] Don't include CSS property preferences in devtools/shared/css/generated/properties-db.js. r=ochameau.
This was only used in a XPCShell test, where we can
directly use InspectorUtils.getCSSPropertyPrefs() instead.

Differential Revision: https://phabricator.services.mozilla.com/D169338
2023-02-13 12:38:29 +00:00
Julian Descottes b8b9107571 Bug 1789723 - [devtools] fix intermittent devtools/client/inspector/animation/test/browser_animation_current-time-label.js r=devtools-reviewers,ochameau
This should fix the issue, seems low frequency on try but no failure detected with the patch.

Differential Revision: https://phabricator.services.mozilla.com/D169568
2023-02-13 11:23:33 +00:00
Nicolas Chevobbe 054df312dd Bug 1688001 - Allow to open url from network message from keyboard. r=bomsy.
Use a proper link element so it can be focused and clicked.

Differential Revision: https://phabricator.services.mozilla.com/D169349
2023-02-13 10:18:04 +00:00
Nicolas Chevobbe b89116e1f1 Bug 1815903 - [devtools] Allow eager evaluation of change array by copy methods. r=arai.
Differential Revision: https://phabricator.services.mozilla.com/D169454
2023-02-13 08:00:22 +00:00
Florian Quèze 4407f46f5d Bug 1815438 - remove the 'Preference Read' profiler feature and record these markers unconditionally, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D169239
2023-02-10 21:50:02 +00:00
Nicolas Chevobbe 49b7b9c349 Bug 1815159 - [devtools] Add support for @layer and @container rules in Changes panel. r=jdescottes
A test is added to make sure those are displayed properly and that the "Copy Rule"
button gives the expected result.

Differential Revision: https://phabricator.services.mozilla.com/D168952
2023-02-10 14:40:05 +00:00
Nicolas Chevobbe 772bc18d4b Bug 1815159 - [devtools] Use CSS rules classnames instead of CSSRule.type. r=jdescottes.
CSSRule.type is deprecated (see https://developer.mozilla.org/en-US/docs/Web/API/CSSRule/type)
and new type of rules added recently (CSSContainerRule, CSSLayerBlockRule, …) don't
have a dedicated type, which means we can't target them.
Instead of looking into the type property, we should check the name of the class
to properly classify the rule.

Differential Revision: https://phabricator.services.mozilla.com/D168951
2023-02-10 14:40:04 +00:00
ogiorgis 5ee8239e80 Bug 1749473 - remove useless md file r=firefox-source-docs-reviewers,devtools-reviewers,sylvestre,nchevobbe DONTBUILD
There were two index files (rst and md) here. Sphinx triggered a
warning and always used the rst.

Differential Revision: https://phabricator.services.mozilla.com/D169429
2023-02-10 11:27:11 +00:00
Tooru Fujisawa 6150479cb6 Bug 1815152 - Treat await inside async function effectful in eager evaluation. r=jandem,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169307
2023-02-10 11:20:20 +00:00
Geoff Lankow a1a27f5aa0 Bug 1803728 - Stop trying to add Firefox devtools UI to Thunderbird on start-up. r=devtools-reviewers,nchevobbe
This code tries to add keys and menu items etc. to Firefox when browser-delayed-startup-finished is fired.
Since bug 1797760 Thunderbird fires this notification too, and we've been getting errors about the devtools trying and failing to add to Thunderbird's UI.

Differential Revision: https://phabricator.services.mozilla.com/D169392
2023-02-10 10:57:12 +00:00
Cristian Tuns a64bf7e7eb Backed out changeset d5722560ec79 (bug 1800916) for causing devtools failures on /browser_webconsole_network_messages_html_preview.js CLOSED TREE 2023-02-09 20:48:05 -05:00
Alexandre Poirot 8b9b7e67a9 Bug 1800916 - [devtools] Allow interactions with HTML previews in netmonitor. r=devtools-reviewers,bomsy
It might be misleading to allow interactions with HTML previews.
Links/forms may navigate to another URL without any way to navigate back.
But it sounds unlikely this will lead to major security issue,
while letting users copy and paste partial pieces of these previews.

Differential Revision: https://phabricator.services.mozilla.com/D169075
2023-02-09 22:05:07 +00:00
Nicolas Chevobbe 39dd92bfd1 Bug 1814830 - [devtools] Drop side-effect free requirement for custom formatter hooks. r=ochameau.
Since we will handle a single Debugger now, we can simplify some code.

Differential Revision: https://phabricator.services.mozilla.com/D168770
2023-02-09 15:25:38 +00:00
Nicolas Chevobbe d84ba3f2ec Bug 1815850 - [devtools] Remove check on CSS color level 4 syntax support. r=ochameau.
It's enabled for a while now, we don't need to check it
in our codebase.

Differential Revision: https://phabricator.services.mozilla.com/D169306
2023-02-09 14:11:07 +00:00
Julian Descottes eb7faea7aa Bug 1814629 - [devtools] Load target-actor-registry in the shared global but exclude browser-element targets r=ochameau
Depends on D168438

Differential Revision: https://phabricator.services.mozilla.com/D168677
2023-02-09 13:13:44 +00:00
Alexandre Poirot 0393a10316 Bug 1814615 - [devtools] Use WatcherActor.getAllBrowsingContexts rather than getAllBrowsingContextsForContext. r=devtools-reviewers,nchevobbe
Rather use the shortcut of it on WatcherActor, which will pass all meaningful contextual arguments to it.

Differential Revision: https://phabricator.services.mozilla.com/D167993
2023-02-09 10:44:05 +00:00
Nicolas Chevobbe 7abf0b4fd8 Bug 1815648 - [devtools] Display ellipsis for message location on narrow layout. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D169184
2023-02-09 10:02:15 +00:00
Nicolas Chevobbe 6efc4f99fc Bug 1815646 - [devtools] Remove odd/even classes on ConsoleTable <tr>. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D169183
2023-02-09 10:01:05 +00:00
Tooru Fujisawa ed2a64e98a Bug 1815689 - Test window.scheduler.constructor.name only when available. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169281
2023-02-09 06:01:22 +00:00
Alexandre Poirot d5c1cc2201 Bug 1815386 - [devtools] Merge storage actors preListStore into populateStoresForHosts. r=devtools-reviewers,nchevobbe
preListStore used to be the async version of populateStoresForHosts.
But now we can simply make populateStoresForHosts async and have a unique initialization method.

populateStoresForHosts and populateStoresForHost are initialization method, so I moved them
first in the classes.

Differential Revision: https://phabricator.services.mozilla.com/D169050
2023-02-08 19:10:04 +00:00
Alexandre Poirot b52a76b782 Bug 1815386 - [devtools] Simplify cookies storage actor. r=devtools-reviewers,nchevobbe
* pendingResponse is a leftover
* this code always runs in the parent and should always register/unregister listeners
* observe method can be simplified.

Differential Revision: https://phabricator.services.mozilla.com/D169049
2023-02-08 19:10:04 +00:00
Henrik Skupin bb76ed6247 Bug 1810941 - [devtools] Update browser compat data to 5.2.34. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D169204
2023-02-08 15:03:38 +00:00
Hubert Boma Manilla 110232617a Bug 1811040 - [devtools] No longer search in blackboxed files r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168925
2023-02-08 06:14:46 +00:00
Hubert Boma Manilla 03c46580d5 Bug 1810990 - [devtools] Always show search results from minified source r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168924
2023-02-08 06:14:46 +00:00
Hubert Boma Manilla 306ce0b2a2 Bug 1812022 - [devtools] Allow searching in third party scripts r=nchevobbe
Remove the hard-coded blocking of searching in third-party scripts.
We are later going to add a feature to allow the users filter out these files themselves

Differential Revision: https://phabricator.services.mozilla.com/D168261
2023-02-08 06:14:45 +00:00
Hubert Boma Manilla a13d122e4c Bug 1814255 - [devtools] Split up the project search tests r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168923
2023-02-08 06:14:45 +00:00
Hubert Boma Manilla 5613db095a Bug 1803546 - [devtools] Show errored request for those that are for non-existing domain r=ochameau
#### Highlights of this patch

- We are now tracking errors that show up later in the cycle.
- Errors related to 301 redirects are ignored as we show those as 301's in the netmonitor.
- Using `waitForLoad` in a couple of more places as when a domain is not found, we have `await`'s that do not resolve.
- `NS_IMAGELIB_ERROR_FAILURE` is now emitted for the stub network request in the console, which was not exposed previously.

Differential Revision: https://phabricator.services.mozilla.com/D166882
2023-02-08 05:32:03 +00:00
Nicolas Chevobbe 60057fbfab Bug 1814652 - [devtools] Rename SourceMapLoader#applySourceMap and change its signature. r=ochameau.
Let's make it take an array of ids so we don't need
to create multiple SourceMapConsumer.

Differential Revision: https://phabricator.services.mozilla.com/D168685
2023-02-07 15:05:36 +00:00
Nicolas Chevobbe 3290f20402 Bug 1815452 - [devtools] Simplify mapping structure posted to/from workers. r=ochameau,bomsy.
We used to get the mappings array from the pretty fast worker to the prettyPrint
action, and then pass this array to the sourceMap service (also a worker).
As the mapping can be quite large, and given it has a complex shape, passing it
to and from workers (via `postMessage`) was costly.

So here, instead of passing only the mapping, we directly generate the sourceMap
from the pretty fast worker, and pass it to the action which forwards it to
the sourceMap service.

This helps reduce the overhead we were seeing when not buffering the lines in
the pretty print worker, in the previous patch of this stack.

Differential Revision: https://phabricator.services.mozilla.com/D168384
2023-02-07 15:05:35 +00:00
Nicolas Chevobbe 3acb069157 Bug 1814620 - [devtools] Remove color.js rgbToColorName. r=ochameau.
Make the callsites call InspectorUtils.rgbToColorName instead.
Since it was throwing when passed a non-valid named color,
which wasn't the expected outcome in DevTools, modify the
c++ method so it return an empty string instead.
Add a dedicated test since there wasn't one.

Differential Revision: https://phabricator.services.mozilla.com/D168989
2023-02-07 12:39:19 +00:00
Nicolas Chevobbe 77612fb6d7 Bug 1814620 - [devtools] Replace custom color.js method with InspectorUtils ones. r=ochameau.
Let's use `InspectorUtils` `isValidCSSColor`, `rgbToColorName` and `colorToRGBA`
instead of their js-counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D168669
2023-02-07 12:39:18 +00:00
Alexandre Poirot d356265137 Bug 1813478 - [devtools] Move StyleSheetsManager to WindowGlobalTargetActor. r=devtools-reviewers,nchevobbe
This is specific to WindowGlobal targets and isn't used by worker/process targets.

Differential Revision: https://phabricator.services.mozilla.com/D168663
2023-02-07 10:37:01 +00:00
Alexandre Poirot 6c01f0d697 Bug 1813478 - [devtools] Migrate target actors to ES Classes. r=devtools-reviewers,nchevobbe
The main challenge of this patch is around the initial `docShell`.
We have to call inner methods of WebExtensionTargetActor to compute it,
but this is forbiden by ES Class constructor. You can't use `this` before calling `super()`.

Otherwise this is also some troubles on destruction.
CssChangesActor was emitting late RDP event and throwing when closing the browser toolbox.

Differential Revision: https://phabricator.services.mozilla.com/D168662
2023-02-07 10:37:00 +00:00
Alexandre Poirot 81194cbfe1 Bug 1814011 - [devtools] Migrate storage actors to ES Classes. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168577
2023-02-07 10:37:00 +00:00
Alexandre Poirot 2dc32e362a Bug 1814013 - [devtools] Remove test-only echo request from the root actor. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This wasn't so trivial to revisit tests, but at least we stop shipping test-only
features in RDP. And the cryptic echo implement now only exists in tests.

Differential Revision: https://phabricator.services.mozilla.com/D168360
2023-02-07 10:36:59 +00:00
Alexandre Poirot a168e76b7c Bug 1813995 - [devtools] Nullify conn for all Actors on destruction. r=jdescottes,devtools-reviewers
A few classes weren't passing the conn object to Actor's constructor
and instead manually defining it.

Some others were having a duplicated `_conn` alias.

Differential Revision: https://phabricator.services.mozilla.com/D168351
2023-02-07 10:36:59 +00:00
Cristian Tuns 930c38c916 Backed out 2 changesets (bug 1814620) as requested by dev CLOSED TREE
Backed out changeset a7cf3a7ae359 (bug 1814620)
Backed out changeset b74334ea6e48 (bug 1814620)
2023-02-07 05:26:20 -05:00
Nicolas Chevobbe 33a8707341 Bug 1814620 - [devtools] Remove color.js rgbToColorName. r=ochameau.
Make the callsites call InspectorUtils.rgbToColorName instead.
Since it was throwing when passed a non-valid named color,
which wasn't the expected outcome in DevTools, modify the
c++ method so it return an empty string instead.
Add a dedicated test since there wasn't one.

Differential Revision: https://phabricator.services.mozilla.com/D168989
2023-02-07 08:50:18 +00:00
Nicolas Chevobbe ec16d48d4f Bug 1814620 - [devtools] Replace custom color.js method with InspectorUtils ones. r=ochameau.
Let's use `InspectorUtils` `isValidCSSColor`, `rgbToColorName` and `colorToRGBA`
instead of their js-counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D168669
2023-02-07 08:50:17 +00:00
Tooru Fujisawa 6c4234030c Bug 1812540 - Part 2: Add get/set prefix for Xray accessors. r=nchevobbe,peterv
Also remove the workaround to add get/set prefix in debugger.

Differential Revision: https://phabricator.services.mozilla.com/D168513
2023-02-07 07:36:18 +00:00
Tooru Fujisawa 2e02e360ca Bug 1806598 - Part 8: Add testcases. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168342
2023-02-07 07:36:17 +00:00
Tooru Fujisawa cc232b9d8e Bug 1806598 - Part 7: Apply allowlist filter on getters in eager evaluation. r=nchevobbe
Instead of treating all getters non-effectful, apply the filter also on
getter calls.

Differential Revision: https://phabricator.services.mozilla.com/D168341
2023-02-07 07:36:16 +00:00
Tooru Fujisawa 616a19b408 Bug 1806598 - Part 6.5: Do not use WorkerGlobalScope.prototype.location and WorkerLocation.prototype.href in eager evaluation test. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169035
2023-02-07 07:36:16 +00:00
Tooru Fujisawa 748388bc15 Bug 1806598 - Part 6: Add Location accessors, window.location, and document.location to allowlist. r=nchevobbe
Location related accessors are not marked Pure, but some testcase expects
them to be eagerly evaluateable.

Differential Revision: https://phabricator.services.mozilla.com/D168340
2023-02-07 07:36:16 +00:00
Tooru Fujisawa 79d62c97fa Bug 1806598 - Part 5: Add Window accessors to allowlist. r=nchevobbe
Add support for [Global] extended attribute and methods/getters on instances.

This retrieves the Xray getter function of the given eval global, so that even
if some configurable properties are modified by the web content, debugger
can see the original getters, and pass them to isSameNativeWithJitInfo.

Differential Revision: https://phabricator.services.mozilla.com/D168339
2023-02-07 07:36:15 +00:00
Tooru Fujisawa 7fc1db75f4 Bug 1806598 - Part 4: Collect safe DOM getters into webidl-pure-allowlist.js. r=nchevobbe
Also refactor the allowlist structure to represent static vs prototype and
methods vs getters clearly.

And also moved the pre-defined pure methods list into GenerateDataFromWebIdls.py
for simplicity.

Differential Revision: https://phabricator.services.mozilla.com/D168338
2023-02-07 07:36:15 +00:00
Tooru Fujisawa 1207c028e5 Bug 1806598 - Part 3: Add ECMAScript built-in getters to eager-ecma-allowlist.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168337
2023-02-07 07:36:14 +00:00
Tooru Fujisawa 06e970fe63 Bug 1806598 - Part 2: Use isSameNativeWithJitInfo in eager evaluation. r=nchevobbe
In order to add getters to allowlist, debugger should use isSameNativeWithJitInfo
instead of isSameNative, to distinguish 2 getters with shared native function.

Differential Revision: https://phabricator.services.mozilla.com/D168336
2023-02-07 07:36:14 +00:00
Alexandre Poirot f641715496 Bug 1814609 - [devtools] Use mutable Maps in source actors reducer. r=devtools-reviewers,bomsy
Also stop modifying source actor objects by putting breakable lines on it.
Ideally source actors should be immutable object. There is only sourceMapURL left.

And clarified the fact that we are having source actor IDs everywhere and never a Source ID.

Differential Revision: https://phabricator.services.mozilla.com/D168661
2023-02-06 23:36:58 +00:00
Julian Descottes b0b95baab1 Bug 1811138 - [devtools] Remove require calls to InspectorUtils r=ochameau,perftest-reviewers,sparky
Depends on D167211

Differential Revision: https://phabricator.services.mozilla.com/D167308
2023-02-06 09:47:18 +00:00
Julian Descottes 040a85de53 Bug 1811138 - [devtools] Move ensureCSSErrorReportingEnabled to the CSS_MESSAGE watcher r=ochameau,perftest-reviewers,sparky,devtools-backward-compat-reviewers
We can also remove the legacy listener, as it is only ever triggered by worker toolboxes.

Differential Revision: https://phabricator.services.mozilla.com/D167211
2023-02-06 09:47:17 +00:00
Nicolas Chevobbe 5c02ef4197 Bug 1814855 - [devtools] Better message layout on narrow console output. r=bomsy.
First, we set the max-width of the message location in percentage
instead of vw, as the console output inline-size can be different
than the viewport one (e.g. when it is in editor mode).
We then turn the media query we had to hide the timestamp into a
container query, again, to take into account editor mode.
Finally, we place the location on its own row when the output is
narrow so the message text itself can still be readable.

Differential Revision: https://phabricator.services.mozilla.com/D168778
2023-02-06 07:48:04 +00:00
Sandor Molnar 4fcb729dc9 Backed out 11 changesets (bug 1806598, bug 1812905, bug 1812540) for causing dt failures in devtools/client/webconsole/test/browser/browser_console_evaluation_context_selector.js CLOSED TREE
Backed out changeset 3b0e28b20def (bug 1812540)
Backed out changeset 810ed5832764 (bug 1812540)
Backed out changeset 9e042da8472f (bug 1806598)
Backed out changeset ab04e3122f20 (bug 1806598)
Backed out changeset f97c01add0a5 (bug 1806598)
Backed out changeset de9d04dc5014 (bug 1806598)
Backed out changeset 3808fc5bf528 (bug 1806598)
Backed out changeset 9be2509e8540 (bug 1806598)
Backed out changeset 3fc6c5d9d620 (bug 1806598)
Backed out changeset 297a91be123b (bug 1806598)
Backed out changeset 24cc5069faf3 (bug 1812905)
2023-02-06 07:19:51 +02:00
Tooru Fujisawa 6c0060ef74 Bug 1812540 - Part 2: Add get/set prefix for Xray accessors. r=nchevobbe,peterv
Also remove the workaround to add get/set prefix in debugger.

Differential Revision: https://phabricator.services.mozilla.com/D168513
2023-02-06 03:42:38 +00:00
Tooru Fujisawa 23208a5218 Bug 1806598 - Part 8: Add testcases. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168342
2023-02-06 03:42:37 +00:00