Commit Graph
62 Commits
Author SHA1 Message Date
Hubert Boma Manilla fb186490a6 Bug 1979902 - [devtools] Enable codemirror 6 default search for the source preview r=devtools-reviewers,nchevobbe
To test, check the codemirror view in the Netmonitor's response panel

Differential Revision: https://phabricator.services.mozilla.com/D259086
2025-10-01 18:51:32 +00:00
Hubert Boma Manilla ef9bbcbf3b Bug 1978284 - [devtools] Migrate Source preview to Cm6 r=devtools-reviewers,nchevobbe,perftest-reviewers,tschuster,afinder
Differential Revision: https://phabricator.services.mozilla.com/D259089
2025-10-01 18:51:28 +00:00
Alexandru Marc 04a772b041 Revert (Bug 1979902, Bug 1978284) for causing dt failures @ webconsole/index.html
This reverts commit 6d6b71f2b6.

Revert "Bug 1978284 - [devtools] Migrate Source preview to Cm6 r=devtools-reviewers,nchevobbe,perftest-reviewers,tschuster,afinder"

This reverts commit e835bebd76.
2025-09-30 18:25:31 +00:00
Hubert Boma Manilla 6d6b71f2b6 Bug 1979902 - [devtools] Enable codemirror 6 default search for the source preview r=devtools-reviewers,nchevobbe
To test, check the codemirror view in the Netmonitor's response panel

Differential Revision: https://phabricator.services.mozilla.com/D259086
2025-09-30 15:21:03 +00:00
Hubert Boma Manilla e835bebd76 Bug 1978284 - [devtools] Migrate Source preview to Cm6 r=devtools-reviewers,nchevobbe,perftest-reviewers,tschuster,afinder
Differential Revision: https://phabricator.services.mozilla.com/D259089
2025-09-30 15:20:59 +00:00
Nicolas Chevobbe a23ce6757e Bug 1957020 - [devtools] Fix matching bracket style in High Contrast Mode. r=devtools-reviewers,ochameau.
Don't use important on the background color unset in regular mode so the declaration for HCM overrides it.
Instead, increase the specificity of the rule so it's higher than the default CodeMirror one.

Differential Revision: https://phabricator.services.mozilla.com/D243428
2025-04-02 15:52:19 +00:00
Nicolas Chevobbe 94d5018007 Bug 1955339 - [devtools] Fix and refactor CodeMirror keymap/vim.js prompt. r=devtools-reviewers,ochameau.
The input element wasn't rendered anymore ("Flattening unsafe node"), so build
a document fragment instead of constructing the string for the prompt element.
Instead of adding inline style, we put CSS classes on the elements
for which we add rules in mozilla.css.
The styles are slightly tweaked so we use the colors from the DevTools theme,
and show proper focus indicator.

Differential Revision: https://phabricator.services.mozilla.com/D242525
2025-03-24 14:19:37 +00:00
Nicolas Chevobbe 5bcb4a6f35 Bug 1955235 - [devtools] Remove inline style from codemirror search addon. r=devtools-reviewers,ochameau.
Instead use the class that are set on the elements to add CSS rules in mozilla.css.
The classes are renamed to make it clear they're for CodeMirror 5.
The style of the element is slightly tweaked to use our theme variables, and we
set proper focus indicator on the search/replace input.

Differential Revision: https://phabricator.services.mozilla.com/D242513
2025-03-24 14:19:37 +00:00
Tom Schuster 0b7b527c3d Bug 1950311 - Add CSP to devtool's cmiframe.html. r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D241620
2025-03-19 15:28:16 +00:00
Nicolas Chevobbe 07f6f75aa6 Bug 1953376 - [devtools] Fix Debugger gutter border in High Contrast Mode. r=devtools-reviewers,ochameau.
Move rule for gutters from (light|dark)-theme.css to mozilla.css, use variable for the
background and border colors, and redefine the border in High Contrast Mode.

Differential Revision: https://phabricator.services.mozilla.com/D241166
2025-03-13 10:52:02 +00:00
Nicolas Chevobbe 013826ec51 Bug 1953377 - [devtools] Fix Debugger search matches in High Contrast Mode. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D241164
2025-03-13 10:52:02 +00:00
Hubert Boma Manilla a49867faa7 Bug 1951575 - [devtools] Use the monosapce font-family defined for devtools r=devtools-reviewers,nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D240462
2025-03-06 16:03:18 +00:00
Nicolas Chevobbe 30a9f37057 Bug 1846465 - [devtools] Make codemirror 5 built-in search UI persistent. r=devtools-reviewers,ochameau.
Overriding the search shortcut allows us to execute the findPersistent command,
which prevents the search input to be closed when the user hit Enter.

A test is added to cover the new functionality.

Differential Revision: https://phabricator.services.mozilla.com/D237232
2025-02-27 09:11:53 +00:00
Norisz Fay dc95df34af Backed out 2 changesets (bug 1945716) for causing dt failures on browser_jsterm_autocomplete_accept_no_scroll.js
Backed out changeset 958dff49c956 (bug 1945716)
Backed out changeset e472817c596b (bug 1945716)
2025-02-13 13:44:19 +02:00
Hubert Boma Manilla 4245af69dd Bug 1945716 - [devtools] Upgrade to the latest Codemirror v5 version r=nchevobbe,devtools-reviewers
This upgrades the Codemirror v5 from 5.58.1 to 5.65.18.
The codemirror js and css files and all addons are updated.

Differential Revision: https://phabricator.services.mozilla.com/D236849
2025-02-13 09:13:12 +00:00
Goloman Adrian a3d73e97ee Backed out 2 changesets (bug 1945716) for backing out the wrong revision.
Backed out changeset 09f9f0dcb7f0 (bug 1945716)
Backed out changeset 7d76fb7e4988 (bug 1945716)
2025-02-10 05:14:12 +02:00
Goloman Adrian 5c460c205d Backed out changeset 77d8ba73c064 (bug 1945716) for causing bc failures @browser_history_recently_closed_middleclick.js. 2025-02-10 05:00:32 +02:00
Goloman Adrian ed739d11cf Backed out 2 changesets (bug 1945716) for causing multiple dt failures.
Backed out changeset 09f9f0dcb7f0 (bug 1945716)
Backed out changeset 7d76fb7e4988 (bug 1945716)
2025-02-10 00:00:36 +02:00
Hubert Boma Manilla aea9b015e0 Bug 1945716 - [devtools] Upgrade to the latest Codemirror v5 version r=nchevobbe,devtools-reviewers
This upgrades the Codemirror v5 from 5.58.1 to 5.65.18.
The codemirror js and css files and all addons are updated.

Differential Revision: https://phabricator.services.mozilla.com/D236849
2025-02-09 20:14:43 +00:00
Alexandru Marc 7be1c2710e Backed out 2 changesets (bug 1945716) for causing dt failures @ browser_vimemacs.js
Backed out changeset b1b6aa5411f2 (bug 1945716)
Backed out changeset ffe9a35c0227 (bug 1945716)
2025-02-08 16:44:53 +02:00
Hubert Boma Manilla 8a4677100a Bug 1945716 - [devtools] Upgrade to the latest Codemirror v5 version r=nchevobbe,devtools-reviewers
This upgrades the Codemirror v5 from 5.58.1 to 5.65.18.
The codemirror js and css files and all addons are updated.

Differential Revision: https://phabricator.services.mozilla.com/D236849
2025-02-08 11:58:54 +00:00
Sandor Molnar fa21f9847d Backed out 2 changesets (bug 1945716) for causing dt failures @ browser_codemirror.js CLOSED TREE
Backed out changeset 85125b9112b8 (bug 1945716)
Backed out changeset 9424d7ad4424 (bug 1945716)
2025-02-07 14:46:48 +02:00
Hubert Boma Manilla 5b1fef0fb4 Bug 1945716 - [devtools] Upgrade to the latest Codemirror v5 version r=nchevobbe,devtools-reviewers
This upgrades the Codemirror v5 from 5.58.1 to 5.65.18.
The codemirror js and css files and all addons are updated.

Differential Revision: https://phabricator.services.mozilla.com/D236849
2025-02-07 11:48:43 +00:00
Nicolas Chevobbe 6915e6660b Bug 1916344 - [devtools] Tweak CodeMirror selection/matching styles in High Contrast Mode. r=devtools-reviewers,ochameau.
This makes selection visible in all the CodeMirror callsites, no matter if
they're using cm5 or cm6.
We move rules for CodeMirror selected text from (light|dark)-theme.css to mozilla.css
and use new variables for the background/text colors.

For cm5, we had to enable the mark-selection addon which wraps elements in a
class that can be targetted in CSS.

Highlighting of search results will be handled in another bug.

Differential Revision: https://phabricator.services.mozilla.com/D222943
2024-09-24 07:24:28 +00:00
Hubert Boma Manilla 2179d80f5d Bug 1897776 - [devtools] Highlight match on selection r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D215807
2024-07-08 12:33:21 +00:00
Hubert Boma Manilla 5771832323 Bug 1900741 - [devtools] Enable events for all the gutter r=devtools-reviewers,jdescottes,nchevobbe
This patch
- Adds the gutter hover styling to help indicate which lines can be clicked.
- Fix triggering events on the whole gutter panel (including the code folder).
- Fix showing hover indicators when hovering over the line number gutter
- Fix showing breakpoints on initial load
- Fix styling for breakable lines in dark theme

Differential Revision: https://phabricator.services.mozilla.com/D212752
2024-06-30 21:27:36 +00:00
Hubert Boma Manilla 34a289a9c6 Bug 1903995 - [devtools] Disable selection on the line number gutters r=devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D215067
2024-06-30 18:25:36 +00:00
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
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
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
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
Alexandre Poirot a85b82697f Bug 1792847 - [devtools] Use absolute URLs to import modules in devtools/client/shared. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D158379
2022-09-30 15:17:39 +00:00
Nicolas Chevobbe a64d1b5b08 Bug 1777787 - [devtools] Display non-printable chars in CodeMirror. r=jdescottes.
This adds some character (e.g. right-to-left override) to CodeMirror default list of
special characters (see https://codemirror.net/5/doc/manual.html#option_specialChar).
We also take this opportunity to show the unicode value for those, instead of the
default red dot CodeMirror provides.

Differential Revision: https://phabricator.services.mozilla.com/D152421
2022-07-22 16:25:00 +00:00
Cristian Tuns 7c304dab35 Backed out changeset b5ed92b74381 (bug 1777787) for causing mochitest failures on browser_styleeditor_filesave.js CLOSED TREE 2022-07-22 05:27:11 -04:00
Nicolas Chevobbe f31d2d5493 Bug 1777787 - [devtools] Display non-printable chars in CodeMirror. r=jdescottes.
This adds some character (e.g. right-to-left override) to CodeMirror default list of
special characters (see https://codemirror.net/5/doc/manual.html#option_specialChar).
We also take this opportunity to show the unicode value for those, instead of the
default red dot CodeMirror provides.

Differential Revision: https://phabricator.services.mozilla.com/D152421
2022-07-22 05:53:44 +00:00
Sebastian Zartner 246b483daa Bug 1743107 - Added support for HWB colors. r=jdescottes,kpatenio
This change doesn't cover auto-completion for "hwb" yet because it isn't added automatically when generating the properties-db.js.

Differential Revision: https://phabricator.services.mozilla.com/D132992
2021-12-19 12:56:01 +00:00
colin_czb 7149902015 Bug 1619312 - Add match highlighting to codemirror in devtools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D124130
2021-09-14 11:57:38 +00:00
Fabien CASTERS cf674728cd Bug 1721126 - [devtools] Add Code Mirror HTTP mode in SourceEditor. r=bomsy,nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D119904
2021-07-19 07:25:02 +00:00
Florian Quèze 451010e6d6 Bug 1661054 - Stop the codemirror cursor animation when it's not focused, r=nchevobbe.
The animation should only be set when the editor is focused, otherwise the
animation will continue even when devtools is in a background tab.
This happens because the cursor is hidden using visiblity: hidden rather than
display: none in codemirror.css.

Differential Revision: https://phabricator.services.mozilla.com/D106292
2021-02-25 20:25:39 +00:00
Hubert Boma Manilla b9d6ef27ab Bug 1677856 - [devtools] Update codemirror javascript mode r=nchevobbe
This patch updates the modes file for javascript.
It fixes particularly the issue with the source editors syntax highlighting issue, caused by the usage
of optional chaining inside template strings.
It also benefits of any other improvements that have been made.

Differential Revision: https://phabricator.services.mozilla.com/D98106
2020-12-01 13:13:30 +00:00
Nicolas Chevobbe 8315733c32 Bug 1668480 - [devtools] Update CodeMirror to 5.58.1. r=jdescottes. CLOSED TREE
The build script was broken because of the usage of the optional chaining operator,
which is not supported by Node yet, so we fix it.

We also move one modification that was made for Bug 1651443 directly to
codemirror.css (which should be an exact copy of what's provided by the library),
to mozilla.css, our internal, devtools-specific stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D92041
2020-10-01 13:06:55 +00:00
Razvan Maries e9c0af4e07 Backed out changeset 30d763026100 (bug 1668480) for perma failures on nsLayoutUtils.cpp. CLOSED TREE 2020-10-02 14:24:34 +03:00
Nicolas Chevobbe df32275ed9 Bug 1668480 - [devtools] Update CodeMirror to 5.58.1. r=jdescottes.
The build script was broken because of the usage of the optional chaining operator,
which is not supported by Node yet, so we fix it.

We also move one modification that was made for Bug 1651443 directly to
codemirror.css (which should be an exact copy of what's provided by the library),
to mozilla.css, our internal, devtools-specific stylesheet.

Differential Revision: https://phabricator.services.mozilla.com/D92041
2020-10-01 13:06:55 +00:00
Kyle Knaggs 8dad635dba Bug 1664531 - Adds placeholder text to the CodeMirror instances used to create conditional breakpoints and logpoints r=bomsy
Before this patch the CodeMirror instance used to create Conditional Breakpoints and Logpoints did not have placeholder text.

This patch adds placeholder text to this CodeMirror instance by:

1. Adding the CodeMirror addon responsible for creating placeholder text.
2. Updating `webpack.config.js`.
3. Regenerating `codemirror.bundle.js`.
4. Matching the color of the placholder text in these CodeMirror instances to the color of placeholder text in the rest of the Debugger.

{F2456834}

Differential Revision: https://phabricator.services.mozilla.com/D89962
2020-09-20 23:01:28 +00:00
Cameron McCormack 34d3b448a7 Bug 1620467 - Part 4: Change internal uses of -moz-appearance to appearance and -moz-default-appearance. r=emilio,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,ntim,agi,miketaylr
Uses of `-moz-appearance: none` are changed to `appearance: none`.

Uses of other values that are simply reverting the appearance back to
its default are changed to `appearance: auto`.

Uses of values in UA sheets that are defining the inherent appearance of
widgets are changed to:

  appearance: auto;
  -moz-default-appearance: <value>;

since those values are either no longer supported on (-moz-)appearance,
or are still supported but only in some limited form.

There are some uses of `-moz-appearance: textfield` on <input
type=number> elements that are renamed to `appearance: textfield`.

Differential Revision: https://phabricator.services.mozilla.com/D83430
2020-07-16 22:04:14 +00:00
Itiel 9950066af8 Bug 1651443 - Always align the codemirror lines to the left r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D82774
2020-07-09 12:04:32 +00:00
Nicolas Chevobbe d69cb05887 Bug 1620247 - Roll our own cursor blinking animation in the Editor. r=gl,rcaliman.
CodeMirror sets a setInterval function in which the cursor element
visibility is toggled on and off. This shows up in profiles, and on
slow hardware or busy situations, this can make the editor feel slow.
This patch sets the cursorBlinkingRate to 0, which won't trigger the
setInterval setup, and reimplement the blinking through CSS animation.
For the animation duration, we use a CSS custom variable which is set
in the editor setup, and will be either the value of the ui.caretBlinkTime
pref, or the CodeMirror default.

Differential Revision: https://phabricator.services.mozilla.com/D66000
2020-03-13 08:06:05 +00:00
Julian Descottes 150349d1c5 Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58243
2019-12-27 12:23:47 +00:00
Razvan Maries 0f5ce38e4c Backed out changeset 14698fa06ab8 (bug 1596686) for causing perma fails on browser_json_refresh.js. 2019-12-27 14:01:24 +02:00
Julian Descottes 3fa1b45876 Bug 1596686 - Use absolute paths for require calls r=gl
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D58243
2019-12-27 09:09:51 +00:00