Commit Graph
35 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
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
Nicolas Chevobbe 95737b5bfe Bug 1591404 - Remove unused tern and show-hint CodeMirror addons. r=gl.
Differential Revision: https://phabricator.services.mozilla.com/D50937
2019-10-30 06:58:51 +00:00
Nicolas Chevobbe ce25c3f455 Bug 1519103 - Remove Scratchpad panel. r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D50583
2019-10-27 09:05:58 +00:00
Nicolas Chevobbe b9102f3c4f Bug 1590707 - Don't display outline on CodeMirror scrollbars. r=fvsch.
Differential Revision: https://phabricator.services.mozilla.com/D50201
2019-10-23 12:41:12 +00:00
Florens Verschelde 80e4b9a839 Bug 1589233 - Align CodeMirror line-height with Debugger in Inspector, Style Editor and Console editor; r=gl,nchevobbe
We have a few CodeMirror instances where we're using the default line height (`line-height: normal`), resulting in a line-height in the 13-14.5px range (depending on the font, OS, resolution). By contrast, the Debugger uses 15px explictly, and that's a style we're trying to generalize.

This patch sets a 15px line-height for:
- Inspector: the CodeMirror instance used in the markup view for "Edit as HTML" and in event tooltips
- Style Editor: the main editor instance
- Console: the jsterm but only in editor mode (since the output uses a 14px line-height on purpose, the jsterm in standard mode keeps this 14px line-height to minimize visual jumps when sending a command)

Differential Revision: https://phabricator.services.mozilla.com/D49593
2019-10-21 14:18:07 +00:00
Florens Verschelde 6cae09ed1f Bug 1588796 - New search-in-file highlight style in Debugger and Style Editor; r=davidwalsh,gl
Differential Revision: https://phabricator.services.mozilla.com/D49439
2019-10-16 22:12:30 +00:00
Gabriel Luong ae9a71157f Bug 1583278 - Upgrade CodeMirror to 5.49.0. r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D46826
2019-09-23 18:47:42 +00:00
Jason Laster 0f89c25938 Bug 1560572 - Format Rust files. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D35557
2019-06-25 15:43:34 +00:00
Florens Verschelde 488da0dfc9 Bug 1543324 - Part 3: Remove --theme-comment-alt variable; r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D27108
2019-04-18 19:17:03 +00:00
Florens Verschelde 8d9e907b45 Bug 1543324 - Part 1: Replace --theme-content-color1,2,3 variables; r=ntim
Differential Revision: https://phabricator.services.mozilla.com/D27106
2019-04-18 19:18:43 +00:00
Nicolas Chevobbe c48c5496a8 Bug 919711 - Add a CodeMirror inputStyle to make it accessible; r=bgrins.
This copies what's done in Chrome DevTools to make codeMirror more accessible.
A new input mode is added which overrides the default `textarea` one.

This makes the "Edit as HTML" feature usable for people relying on screen readers.
This may be used in the future in the console, where we could remove the legacy
console input and serve the CodeMirror instance for everyone.

Differential Revision: https://phabricator.services.mozilla.com/D24930
2019-04-05 13:43:10 +00:00
Nicolas Chevobbe c53c9b0c13 Bug 1530255 - Load keyMap files on demand; r=bgrins.
We use to include all the keyMap files in the
codeMirror bundle, but these files can be
pretty large, and are useless if the user did
not select a custom key mapping in the settings
panel.
This patch changes this to only load those files
when they are needed, either when a new editor
is created, or when the user changes the key mapping
preference. The files are only loaded once.

Differential Revision: https://phabricator.services.mozilla.com/D22977
2019-03-12 14:56:24 +00:00
Nicolas Chevobbe 05be70cf58 Bug 1527322 - Move the sourceeditor folder under devtools/client/shared; r=gl.
Differential Revision: https://phabricator.services.mozilla.com/D19641
2019-02-13 15:37:08 +00:00