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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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