Commit Graph
300 Commits
Author SHA1 Message Date
Nicolas Chevobbe 65d0aa02d0 Bug 1904752 - [devtools] Fix handling of single-char quote in InspectorCSSParserWrapper#performEOFFixup. r=devtools-reviewers,jdescottes.
When tracking tokens, we weren't handling the case of unterminated,
single-char quote.
Test cases are added to cover the fix.

Differential Revision: https://phabricator.services.mozilla.com/D214917
2024-06-26 17:30:37 +00:00
Alexandre Poirot eeadbc4866 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-27 09:53:54 +00:00
Cristian Tuns d0272b92b7 Backed out 8 changesets (bug 1651518, bug 1883847) dt failures in nsTArray.h. CLOSED TREE
Backed out changeset 481558275c1d (bug 1651518)
Backed out changeset 5337435e8bca (bug 1651518)
Backed out changeset 8fe0c1a4da7f (bug 1651518)
Backed out changeset 840a0d9db260 (bug 1651518)
Backed out changeset eaab9de5819d (bug 1651518)
Backed out changeset cf71de92d782 (bug 1651518)
Backed out changeset d778691464db (bug 1651518)
Backed out changeset af28e5f719e8 (bug 1883847)
2024-05-22 09:02:19 -04:00
Alexandre Poirot 34e5032104 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-22 11:50:44 +00:00
Cristina Horotan ca70119cfa Backed out 8 changesets (bug 1651518, bug 1883847) for causing damp failures at toolbox/browser-toolbox.js CLOSED TREE
Backed out changeset 4ec70db12f48 (bug 1651518)
Backed out changeset b2b138889ad6 (bug 1651518)
Backed out changeset efda5c09b0ea (bug 1651518)
Backed out changeset b0de4113f8fb (bug 1651518)
Backed out changeset 03cf235d2a80 (bug 1651518)
Backed out changeset 58e71c27f1fd (bug 1651518)
Backed out changeset f7fb390c3965 (bug 1651518)
Backed out changeset b8a2473c47c0 (bug 1883847)
2024-05-22 04:00:53 +03:00
Alexandre Poirot 3d2406db93 Bug 1651518 - [devtools] Ensure spawning DistinctSystemPrincipalLoader.sys.mjs only once. r=devtools-reviewers,nchevobbe
This is important to spawn this ESM only once between regular and browser toolbox,
and especially between various callsites used by the browser toolbox.
Otherwise we may start loading modules in two distinct system loaders
and may have inconsistancies when using `instanceof`.

Differential Revision: https://phabricator.services.mozilla.com/D207432
2024-05-21 14:09:33 +00:00
Nicolas Chevobbe 8384623980 Bug 1892901 - [devtools] Remove performEOFFixup preserveBackslash parameter. r=devtools-reviewers,bomsy.
The parameter was always passed with true,
except in a unit test.

Differential Revision: https://phabricator.services.mozilla.com/D208320
2024-04-30 05:12:54 +00:00
Nicolas Chevobbe 5532aef13b Bug 1892895 - [devtools] Remove JS CSS Lexer. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D208318
2024-04-26 09:18:12 +00:00
Nicolas Chevobbe 0abfb7c1f9 Bug 1889363 - [devtools] Implement performEOFFixup for InspectorCSSParser. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D206748
2024-04-23 08:43:03 +00:00
Nicolas Chevobbe 46f2af8bba Bug 1887638 - [devtools] Expose CSS token value in InspectorCSSToken. r=emilio.
In some cases, it can be more useful to only get the token value than the whole
token text (e.g. for 'Function`, where the value is the function name, while
the text includes the opening parenthesis)
Refactor `test_lexer` to better test the tokens we get, including their value property.

Differential Revision: https://phabricator.services.mozilla.com/D207400
2024-04-15 17:14:43 +00:00
Nicolas Chevobbe 8609258f9f Bug 1887638 - [devtools] Add InspectorCSSParser. r=emilio,devtools-reviewers,frontend-codestyle-reviewers,bomsy.
This new InspectorCSSParser makes use of the cssparser crate so DevTools end
up using the same code as the CSS engine.
At the moment, we can't get the token start and end offsets, so we create
a JS wrapper class to compute them in JS. This might be removed if we get
a way to retrieve utf16 position from the cssparser.
The existing lexer xpcshell test is modified so it can run against both js-based
and rust-based lexers.

Differential Revision: https://phabricator.services.mozilla.com/D202909
2024-04-15 17:14:42 +00:00
Dave Townsend 2af4d349f3 Bug 1864896: Autofix unused function arguments (devtools). r=profiler-reviewers,devtools-reviewers,nchevobbe,julienw
Differential Revision: https://phabricator.services.mozilla.com/D202959
2024-03-05 14:21:15 +00:00
Tooru Fujisawa 0791e8d3c4 Bug 1875639 - Part 1: Use global option instead of loadInDevToolsLoader option. r=ochameau,devtools-reviewers
global option supercedes loadInDevToolsLoader, with omitting the
implicit contextual loader behavior.
In order to make the API less error-prone, use global option, with requireing
global option in DevTools global, to choose from shared global or explicit
contextual loader.

Differential Revision: https://phabricator.services.mozilla.com/D199466
2024-02-20 04:49:57 +00:00
Tooru Fujisawa 27fcce53e4 Bug 1836480 - Part 3: Rewrite consumers of XPIProvider.jsm, XPIDatabase.jsm, and XPIInstall.jsm. r=robwu,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D199793
2024-01-31 20:07:28 +00:00
Gijs Kruitbosch 3288f177a4 Bug 1780071 - autofix devtools/ violations of no-comparison-or-assignment-inside-ok r=profiler-reviewers,devtools-reviewers,julienw,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D198975
2024-01-26 13:12:07 +00:00
Nicolas Chevobbe 2711398289 Bug 1864842 - [devtools] Remove devtools/shared/defer.js . r=devtools-reviewers,ochameau.
This can now be replaced with native Promise.withResolvers,
so we can remove our custom implementation module.

Differential Revision: https://phabricator.services.mozilla.com/D198033
2024-01-10 06:30:28 +00:00
Mark Banner a7b0c4e22e Bug 1872673 - Remove 'console' export from Console.sys.mjs, use alternative logging where required. r=mossop,devtools-reviewers,nchevobbe
Depends on D197502

Differential Revision: https://phabricator.services.mozilla.com/D197503
2024-01-02 17:38:55 +00:00
Jonathan Watt 61ff6ba12e Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt 839fe1be5d Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Joel Maher cac31d18e3 Bug 1859873 - batch 13 xpcshell.ini -> .toml. r=aryx,devtools-reviewers,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194161
2023-11-21 12:32:50 +00:00
Vinny Diehl e4c35302d5 Bug 1617562 - Allow unknown words at beginning of Date string r=arai,devtools-reviewers,ochameau
They are also allowed after the month name, e.g. "Sep foo 26 1995".

These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.

We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.

Differential Revision: https://phabricator.services.mozilla.com/D192560
2023-11-08 02:14:07 +00:00
Natalia Csoregi 097a124484 Backed out changeset 2516d38fcdfa (bug 1617562) for causing leaks on jsdate.cpp. CLOSED TREE 2023-11-07 09:12:23 +02:00
Vinny Diehl 84868e6065 Bug 1617562 - Allow unknown words at beginning of Date string r=arai,devtools-reviewers,ochameau
They are also allowed after the month name, e.g. "Sep foo 26 1995".

These "unknown words" are supposed to be day of week, or abbreviations
of them, but they can be anything really.

We need to run telemetry before dropping explicit support for day of
week in later parts of the date string.

Differential Revision: https://phabricator.services.mozilla.com/D192560
2023-11-07 04:37:03 +00:00
Vinny Diehl b9efeb19ea Bug 449921 - Loosen requirements for characters directly following numbers r=arai,devtools-reviewers,nchevobbe
This patch newly allows cases such as MonDDYYYY and Mon.DD.YYYY.
In adding tests for this patch, I noticed that the tests for parsing
periods were broken and could not fail the way that they were written,
so I fixed them.

This patch also fixes a couple of other standing bugs...

fixes Bug 485639 - for cases like "Aug 15 2015 10:00am"
fixes Bug 1760290 - for YYYY.MM.DD

Differential Revision: https://phabricator.services.mozilla.com/D186054
2023-09-27 09:52:46 +00:00
Tom Marble 6c1231e2e8 Bug 1853244 - convert .ini manifests to .toml: batch 6 {caps,devtools,dom}/**/browser.ini r=jmaher,media-playback-reviewers,devtools-reviewers,profiler-reviewers,alwu,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D188856
2023-09-22 20:42:14 +00:00
Tom Marble d70780c99c Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Alexandre Poirot 27f68e6323 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 20:59:34 +00:00
Butkovits Atila 76e7dfa668 Backed out changeset fb19de542f01 (bug 1320607) for causing python failures complaining about test_devtools_database_parsing . CLOSED TREE 2023-09-07 18:58:05 +03:00
Alexandre Poirot 7198ba3de1 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 13:08:37 +00:00
Alexandre Poirot 017f627911 Bug 1847753 - [devtools] Stop storing pseudo elements in properties-db. r=devtools-reviewers,nchevobbe
This appears to be unused and only page-actor is reading the list of all pseudo elements
by querying InspectorUtils directly.

Differential Revision: https://phabricator.services.mozilla.com/D185664
2023-08-09 13:30:40 +00:00
Mark Banner 544ecba3af Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
Nicolas Chevobbe 7eb79052d8 Bug 1838857 - [devtools] Use devtools.editor.tabsize value for space indentation in prettifyCSS. r=devtools-reviewers,ochameau.
We used to only indent with one space when `devtools.editor.expandtab` was true.
Unit test is updated to make sure we do use the pref value now.

Differential Revision: https://phabricator.services.mozilla.com/D181225
2023-06-20 07:42:20 +00:00
Alexandre Poirot c42905da36 Bug 1838443 - [devtools] Move preview data from redux store to react state. r=devtools-reviewers,perftest-reviewers,sparky,bomsy
This data is transient and only specific to the Editor's index react component.
There is no need to share nor persist this data in Redux,
this would avoid unecessary complexity/layers and avoid a few state updates.

Note that the target.match(:hover) was probably a poorly documented way to prevent
rending preview for token that are no longer hovered (the comment about whitespace sounds weird).

Also tweak waitForSelectedSource to also wait for CodeMirror to be updated.
Otherwise, we might try to hover tokens while CodeMirror is still udpating...
While doing that, use the L10N string instead of the final localized string.

Differential Revision: https://phabricator.services.mozilla.com/D180992
2023-06-19 17:18:27 +00:00
Barret Rennie c21ee0d6d6 Bug 1747468 - Remove FileUtils.getFile from devtools/ r=devtools-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D180461
2023-06-15 01:59:11 +00:00
Kris Maglione 42012f6b4b Bug 1648545: Part 2 - Load SpecialPowers in XPCShellContentUtils. r=ahal,application-update-reviewers,nalexander,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D119449
2023-05-27 03:46:44 +00:00
Noemi Erli a08e78ef6e Backed out 4 changesets (bug 1648545) for causing mass failures
Backed out changeset ac3d639547fa (bug 1648545)
Backed out changeset f63760c845f3 (bug 1648545)
Backed out changeset 652b48b10d37 (bug 1648545)
Backed out changeset 1ca7abd873d1 (bug 1648545)
2023-05-26 02:12:58 +03:00
Kris Maglione ea0b4c7e26 Bug 1648545: Part 2 - Load SpecialPowers in XPCShellContentUtils. r=ahal,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D119449
2023-05-25 22:04:31 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Nicolas Chevobbe b58efd33f0 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 f1a3dac261 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
Nicolas Chevobbe 2956fe754e Bug 1803646 - [devtools] Pass storage-expires-session localized value to getStoreObjects. r=jdescottes,fluent-reviewers,flod.
We need the string in devtools/shared `naturalOrder`, but we can't directly retrieve
it from the fluent file as it lives on the client (and won't be available in the
server on Android).
As the client and server might have different locales, we can't move the string
to devtools/shared.
Since the function is used from the server to make sure the data is displayed
properly on the UI, we pass the localized string to `getStoreObjects` so it's
then available to `naturalOrder`.
Tests are updated to match the new signature.

Differential Revision: https://phabricator.services.mozilla.com/D164354
2022-12-14 09:50:15 +00:00
Julian Descottes e1a7f602ec Bug 1796582 - [devtools] Load DistinctSystemPrincipalLoader in the dedicated DevToolsLoader global r=ochameau
Depends on D160215

Differential Revision: https://phabricator.services.mozilla.com/D160216
2022-10-28 08:06:38 +00:00
Julian Descottes 05e646b612 Bug 1796582 - [devtools] Extract helpers for distinctSystemPrincipalLoader to a dedicated module r=ochameau
Depends on D160214

Differential Revision: https://phabricator.services.mozilla.com/D160215
2022-10-28 08:06:38 +00:00
Stanca Serban 9c70023e79 Backed out 3 changesets (bug 1796582) for causing failures in test_invisible_loader.js. CLOSED TREE
Backed out changeset a365a7834657 (bug 1796582)
Backed out changeset fa0ff274795f (bug 1796582)
Backed out changeset 70af32ef6986 (bug 1796582)
2022-10-28 10:01:09 +03:00
Julian Descottes 148f62f92b Bug 1796582 - [devtools] Extract helpers for distinctSystemPrincipalLoader to a dedicated module r=ochameau
Depends on D160214

Differential Revision: https://phabricator.services.mozilla.com/D160215
2022-10-28 06:23:53 +00:00
Mark Banner c0d92b68e8 Bug 1795322 - Update toolkit module references in devtools. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D160025
2022-10-26 08:06:33 +00:00
Csoregi Natalia 5edbe31601 Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Mark Banner 6749586de1 Bug 1795322 - Update toolkit module references in devtools. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D160025
2022-10-25 19:49:23 +00:00
Mark Banner 5407bdffa8 Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Alexandre Poirot bde84f5b65 Bug 1793604 - [devtools] Convert Loader.jsm to ESM. r=perftest-reviewers,geckoview-reviewers,preferences-reviewers,owlish,kshampur,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158582
2022-10-14 12:19:42 +00:00