Commit Graph
175 Commits
Author SHA1 Message Date
Nicolas Chevobbe b64ccccc10 Bug 1896847 - [devtools] Add matching bracket styling in cm6. r=bomsy,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D210901
2024-05-21 05:43:20 +00:00
Hubert Boma Manilla 6ee10584ed Bug 1890269 - [devtools] Implementing search highlight in codemirror 6 r=devtools-reviewers,nchevobbe
This patch
- Gets the search in file feature working for codemirror 6 (Use Ctrl/CMD F to open in the editor)
- Highlights search results in the editor, when using the search panel on the left.
- Includes the @codemirror/search package in the codemirror bundle. This enables using the `RegExpCursor`

Differential Revision: https://phabricator.services.mozilla.com/D208110
2024-05-20 09:50:41 +00:00
Hubert Boma Manilla 999135a4da Bug 1891336 - [devtools] Highlight text during pause and for exceptions r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D207418
2024-05-19 22:28:23 +00:00
Hubert Boma Manilla 2db2984f38 Bug 1889281 - [devtools] Display column breakpoints for codemirror 6 r=devtools-reviewers,nchevobbe
This patch creates a new extension and api enable marking content nodes

Differential Revision: https://phabricator.services.mozilla.com/D207408
2024-05-19 22:28:23 +00:00
Nicolas Chevobbe 99013436f5 Bug 1674321 - [devtools] Tweak matching bracket style. r=devtools-reviewers,bomsy.
We used to have an outline all around the brackets, making
it hard to distinguish the cursor if it was close.
Switching to a simple underline so it's less distracting.

Differential Revision: https://phabricator.services.mozilla.com/D210331
2024-05-17 11:44:56 +00:00
Hubert Boma Manilla 5d85945437 Bug 1889276 - [devtools] Fix editor scrolling in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D202125
2024-05-07 23:53:33 +00:00
Hubert Boma Manilla 23a61d41b2 Bug 1894659 - [devtools] Fix duplicate breakpoints on really long lines r=devtools-reviewers,nchevobbe
`visibleRanges` can return multiple ranges (mostly for large sources the overflow the current viewport),
and those might contain the same line, causing duplicates.
Switching from cm.visibleRanges to cm.viewport

Differential Revision: https://phabricator.services.mozilla.com/D209233
2024-05-07 00:04:16 +00:00
Hubert Boma Manilla cfc1737fd0 Bug 1889283 - [devtools] Add support for inline previews r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D208267
2024-05-05 13:11:03 +00:00
Hubert Boma Manilla c66148a707 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 22:15:17 +00:00
Tamas Szentpeteri dac2560d0e Backed out changeset c18051672452 (bug 1887649) for causing dt failures in browser_dbg-breakpoints-cond-ui-state.js. CLOSED TREE 2024-04-30 09:43:05 +03:00
Hubert Boma Manilla 976b715f39 Bug 1887649 - [devtools] Show the conditional/log breakpoint panel in codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D205578
2024-04-30 05:57:42 +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
Hubert Boma Manilla 3e437ed282 Bug 1888864 - [devtools] Add click and context menu event listeners for the editor content r=devtools-reviewers,nchevobbe
With this patch the context menu for the editor should be visible

Differential Revision: https://phabricator.services.mozilla.com/D206291
2024-04-22 11:56:39 +00:00
Nicolas Chevobbe ca57e329c5 Bug 1888441 - [devtools] Use InspectorCSSParser in CSSCompleter. r=devtools-reviewers,bomsy.
This requires some changes as the token type and text from the cssparser
differs from the JS-based CSS lexer.

Differential Revision: https://phabricator.services.mozilla.com/D206023
2024-04-17 05:57:13 +00:00
Hubert Boma Manilla 34047e8c3a Bug 1886967 - [devtools] Cleanup the API to make more consitent r=devtools-reviewers,nchevobbe
- Added the requirement for a new `id` property to markers passed to the `setLineGutterMarkers` API.
- Changed `gutterLineClassName` to `lineClassName` the API name already indicates that it is the gutter, no need to have gutter in the property name, this also amkes it consistent with `setLineContentMarker`
- Changed `createGutterLineElementNode` to `createLineElementNode` for same reason as above.

Differential Revision: https://phabricator.services.mozilla.com/D205435
2024-03-25 21:56:12 +00:00
Hubert Boma Manilla 1f236dbd77 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 21:56:11 +00:00
pstanciu 26e14298bd Backed out 3 changesets (bug 1884651) for causing pause line failures e.g. on browser_dbg-keyboard-shortcuts.js
Backed out changeset 571e7f23a751 (bug 1884651)
Backed out changeset 3c52a12e9f0c (bug 1884651)
Backed out changeset f7201f71c231 (bug 1884651)
2024-03-25 17:18:30 +02:00
Hubert Boma Manilla 3a4f688073 Bug 1884651 - [devtools] Rendering debug lines when paused in code mirror 6 r=devtools-reviewers,nchevobbe
In this patch
- we begin to render debug lines when paused.
- New APIs are added to add and remove line content markers

Differential Revision: https://phabricator.services.mozilla.com/D204243
2024-03-25 13:47:42 +00:00
Hubert Boma Manilla bbab5fc674 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-21 07:48:58 +00:00
Cristina Horotan b537a35df5 Backed out 3 changesets (bug 1882060) for causing dt failures at DOMSecurityMonitor.cpp CLOSED TREE
Backed out changeset 1d39266eb67d (bug 1882060)
Backed out changeset a72df33c8fb6 (bug 1882060)
Backed out changeset 16a6afc63e6c (bug 1882060)
2024-03-20 16:35:03 +02:00
Hubert Boma Manilla d99a480af2 Bug 1882060 - [devtools] Add support for empty lines markers to codemirror 6 r=devtools-reviewers,nchevobbe
In this patch
1) Adds the `setLineGutterMarkers` function to the editor which enables defining gutter markers
the line number gutter component. This also updates the line number gutter when the viewport (visible ranges)
change (This usually happens when the editor is scrolled).

2)The first use of the `setLineGutterMarkers` is for rendering empty lines

Differential Revision: https://phabricator.services.mozilla.com/D202716
2024-03-20 13:08:30 +00:00
Hubert Boma Manilla 11e553435e Bug 1882060 - [devtools] Add gutter events for click and context menu r=devtools-reviewers,nchevobbe
With this patch
- The line gutter context menu will get displayed on right click of the gutter
- Clicking line gutter should set breakpoints

Note not covered in this patch:-
- Context menu feaures might not work
- Line breakpoints are not showing yet ( this is coming in a future patch)

Differential Revision: https://phabricator.services.mozilla.com/D203210
2024-03-18 09:51:29 +00:00
Hubert Boma Manilla 3d21a16949 Bug 1882333 - [devtools] Update the editor toggle button size when the editior dimensions change r=devtools-reviewers,nchevobbe
This patch updates the size of the button (above the editor gutter) which toogles the sidebar for codemirror 6.
Note this was broken with the current codemirror as wel so fixed both.

Also adding the ability to attach an updateListener to the editor we can listen for editor changes.

Differential Revision: https://phabricator.services.mozilla.com/D202398
2024-03-18 09:51:27 +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
Nicolas Chevobbe dfac8eca38 Bug 1881677 - [devtools] Fix CodeMirror 6 wrapping. r=bomsy,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D202546
2024-02-23 15:44:02 +00:00
Nicolas Chevobbe 83718d377b Bug 1881247 - [devtools] Use esm for CodeMirror 6 bundle. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D202310
2024-02-23 12:33:51 +00:00
Sandor Molnar 2e811b0318 Backed out changeset cc4383344170 (bug 1881247) for causing lint failures at devtools/client/shared/sourceeditor/editor.js CLOSED TREE 2024-02-23 09:16:42 +02:00
Nicolas Chevobbe 1b845db481 Bug 1881247 - [devtools] Use esm for CodeMirror 6 bundle. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D202310
2024-02-23 06:54:54 +00:00
Hubert Boma Manilla a913d4e702 Bug 1878647 - [devtools] Fix debugger editor line wrapping for codemirror 6 r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D201808
2024-02-22 16:56:26 +00:00
Hubert Boma Manilla 22dcb385ee Bug 1878647 - [devtools] Show text in the debugger with codemirror 6 r=devtools-reviewers,nchevobbe
This patch enables showing basic source text content on source selection.

Differential Revision: https://phabricator.services.mozilla.com/D201809
2024-02-22 16:56:26 +00:00
Nicolas Chevobbe a37ae20735 Bug 1877989 - [devtools] Add CodeMirror 6 in tree. r=devtools-reviewers,bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D200305
2024-02-08 14:39:41 +00:00
Mark Banner c4f2b2d3ac Bug 1878553 - Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200582
2024-02-07 08:55:29 +00:00
Cristian Tuns 8829a8d6c5 Backed out 11 changesets (bug 1878554, bug 1878553, bug 1878556) for causing node failures in aboutwelcome CLOSED TREE
Backed out changeset 425f70fa7e5a (bug 1878556)
Backed out changeset 2ab3a28f5c04 (bug 1878556)
Backed out changeset fb2e02682c8c (bug 1878556)
Backed out changeset 2fc5e630568e (bug 1878554)
Backed out changeset 78839d5841b4 (bug 1878554)
Backed out changeset e0ab31d2de1b (bug 1878554)
Backed out changeset 4eb59e4ebafa (bug 1878554)
Backed out changeset ab1e077d3f84 (bug 1878554)
Backed out changeset ef999f293e3e (bug 1878553)
Backed out changeset cf49920cb1ad (bug 1878553)
Backed out changeset 95f0fce63726 (bug 1878553)
2024-02-07 01:26:39 -05:00
Mark Banner 7fdf48bc1f Bug 1878553 - Define *.config.(m)js files as node based for ESLint. r=mossop,devtools-reviewers,omc-reviewers,nchevobbe,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D200582
2024-02-06 22:32:51 +00:00
Nicolas Chevobbe 22f57f2472 Bug 1877428 - [devtools] Use proper private fields in Editor. r=bomsy,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D199973
2024-01-31 05:57:19 +00:00
Nicolas Chevobbe 8ed318df6c Bug 1877428 - [devtools] Turn Editor into a proper ES6 class. r=bomsy,devtools-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D199972
2024-01-31 05:57:18 +00:00
Emilio Cobos Álvarez aac1ce993c Bug 1866063 - Prevent flickering of the source editor by hiding it till loaded. r=devtools-reviewers,nchevobbe
Much like we we do here:

  https://searchfox.org/mozilla-central/rev/d7f837add602d270f2b2958b3ab5206dc85965c0/devtools/client/framework/toolbox.js#2605

This is not an ideal fix but it fixes the immediate flicker.

The real fix would be addressing
https://github.com/w3c/csswg-drafts/issues/9624

Depends on D194395

Differential Revision: https://phabricator.services.mozilla.com/D194396
2023-11-23 11:05:53 +00:00
Emilio Cobos Álvarez a239157a27 Bug 1866063 - Always use an HTML iframe for codemirror. r=devtools-reviewers,nchevobbe
Using a XUL iframe introduces some flickering with about:blank that I
don't think I want to dig into much. Just use HTML here.

Depends on D194394

Differential Revision: https://phabricator.services.mozilla.com/D194395
2023-11-23 10:06:48 +00:00
Emilio Cobos Álvarez b30a1bf423 Bug 1866063 - Simplify codemirror editor iframe set-up. r=devtools-reviewers,nchevobbe
This doesn't change behavior but makes it easier to reason about.

Differential Revision: https://phabricator.services.mozilla.com/D194394
2023-11-23 09:57:15 +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
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
Mark Banner 806a90f3f1 Bug 1846570 - Convert more jsm style imports to ES modules (devtools). r=devtools-reviewers,nchevobbe
Depends on D185071

Differential Revision: https://phabricator.services.mozilla.com/D185072
2023-08-02 13:43:07 +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
Mark Banner 0f2402949a Bug 1826062 - Manual fixes for Prettier 2.8.8 upgrade. r=mossop,webdriver-reviewers,extension-reviewers,devtools-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D177908
2023-05-20 12:26:55 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +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
Mark Banner 0fadbc1ec4 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Emilio Cobos Álvarez cdff2ecc8e Bug 1820534 - Move front-end to modern flexbox. r=Gijs,dao,settings-reviewers,credential-management-reviewers,sgalich,devtools-reviewers,nchevobbe
Done mostly automatically via find/replace following the conversions
specified here:

  https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ

For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).

I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).

Differential Revision: https://phabricator.services.mozilla.com/D171715
2023-03-08 16:13:57 +00:00