Commit Graph
86 Commits
Author SHA1 Message Date
Jason Laster 78d4b4fd19 Bug 1508351 - The editor should not select the line when shift-clicking. r=dwalsh
Tags:

Differential Revision: https://phabricator.services.mozilla.com/D11875
2018-11-19 13:37:38 -05:00
Nicolas Chevobbe 33fad905b8 Bug 1505024 - Disable codeMirror search addon in JsTerm; r=Honza.
This patches fixes a bug where hitting Cmd+F while
the filter input of the console was focused was
triggering codeMirror search addon, displaying the
search UI *in* JsTerm.
To prevent this, we add the ability for any consumer
of the Editor component to disable the search addon.
In the editor, in such case, we simply don't initialize
the event listeners that activate the search addon.
A test case is added to ensure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D11037
2018-11-06 14:08:13 +00:00
Jan Odvarko cfa83f221b Bug 1477252 - Check whether editor is destroyed before using it; review=nchevobbe r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D9251
2018-10-19 14:21:23 +00:00
David Walsh 117216f48e Bug 1314057 - Remove old debugger assets. r=jdescottes 2018-10-22 17:19:00 -05:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Nicolas Chevobbe 40b36716d0 Bug 1491776 - Do not use markText to show the completion text; r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D6020
2018-09-18 19:22:01 +00:00
Nicolas Chevobbe decb40b746 Bug 1488336 - Group clear mark and markText for completion text; r=bgrins.
This way, codeMirror does not trigger so many reflows and
makes setAutocompletionText faster.
An unwanted side-effect was that it made closing the console
a lot slower. Looking at the closing code of the JsTerm, we
do call setAutocompletionText("") in the end, which we don't
really need since we destroy the editor shortly after. Removing
this call keeps closing time the same as before.

Differential Revision: https://phabricator.services.mozilla.com/D4905
2018-09-04 16:19:23 +00:00
Gabriel Luong 9d98a81796 Bug 1486298 - Update CodeMirror to 5.44.0 and add ClojureScript syntax highlighting. r=bgrins 2018-08-26 22:20:53 -04:00
Nicolas Chevobbe d7498f60c7 Bug 1481443 - Disable Alt-B & Alt-F shortcut in source editor; r=gl.
Without this patch, hitting Alt-B was adding a character **and** moving
the cursor to the previous group, while Alt-F was also adding a character
**and** moving the cursor to the next group.
We disable the shortcut to fix this and add a test to make sure we don't
regress.

Differential Revision: https://phabricator.services.mozilla.com/D2918
2018-08-21 12:29:00 +00:00
Nicolas Chevobbe 0377bffd06 Bug 1479521 - Refactor JsTerm autocompletion behavior; r=Honza.
We used to rely on different things to both display
the autocompletion text and accept an autocompletion.
This patches introduces new helper functions in order
to make the code more easy to reason about.
We also rollback our decision to show the popup when
there is only 1 item in the autocompletion list in
order to be more consistent with what Chrome does.

Differential Revision: https://phabricator.services.mozilla.com/D2824
2018-08-13 10:07:15 +00:00
Nicolas Chevobbe d931b8a53f Bug 1480709 - Fix autocomplete popup misplacement; r=Honza.
The JsTerm relies on the codeMirror "change" event to
display the autocomplete popup, and then queries the
DOM to get the cursor element which will serve as an
anchor to the autocomplete popup.
Unfortunately, the "change" event is fired by the editor
__before__ the end of an operation (i.e. the actual DOM
update). Which means that if we are fast enough to get
the autocomplete items from the server, the cursor element
was not changed in the dom, and the computation of the anchor
is erroneous.
We fix this by listening to the "changes" event, which
is fired after the actual DOM changes.
In order to do that, we pipe down the event from the code
mirror instance to the source editor.

Differential Revision: https://phabricator.services.mozilla.com/D2710
2018-08-07 14:01:55 +00:00
Nicolas Chevobbe e3d229f6ac Bug 1463674 - Add new test helpers for JsTerm; r=bgrins.
Since we are dealing with 2 versions of this component, we
introduce new helpers that abtracts how we get or assert
some values.

MozReview-Commit-ID: 1XNPcmwwsBj
2018-07-05 16:52:38 +02:00
Nicolas Chevobbe 54a2bcc177 Bug 1463674 - Refactor char and chevron width measurement; r=bgrins.
Create a separate function to measure the chevron width, and make
the function that measure the char width pure by only returning
the width.
The assignment to internal properties (_inputCharWidth, _chevronWidth),
is now done in componentDidMount which simplify reading this code.

MozReview-Commit-ID: FitY97Y03Sg
2018-07-05 16:40:03 +02:00
Nicolas Chevobbe 46fe736493 Bug 1463674 - Add shadow autocompletion text capability to the source editor; r=bgrins.
This functionnality is used in the webconsole to display to the user
what will be inserted if they hit Tab.
Since CodeMirror does not provide such feature, we take advantage of
markText to put the autocompletion text in a title attribute and
then display it using a CSS after pseudo element.
This way, we don't have to run any complex computation for positioning
nor styling.

MozReview-Commit-ID: 1tFdlR51418
2018-07-05 16:18:53 +02:00
Nicolas Chevobbe f4295cf3d6 Bug 1463674 - Allow sourceeditor consumer to have <kbd>Tab</kbd> handling; r=bgrins.
Since the source editor already defines its own extraKeys.Tab,
anything the consumer set was ignored.
This patch now also runs consumer extraKeys.Tab if defined.

MozReview-Commit-ID: 5FeMXoystAb
2018-07-05 16:15:35 +02:00
Gabriel Luong 3b159d64a5 Bug 1466558 - Provide Haxe Language Syntax Highlighting. r=bgrins 2018-06-08 12:22:57 -04:00
shindli 86c85c9091 Backed out changeset 41d517d39bdd (bug 1466558) for devtools failures in devtools/client/sourceeditor/test/browser_vinemacs.js on a CLOSED TREE 2018-06-08 20:57:01 +03:00
Gabriel Luong 3ca8b5fef3 Bug 1466558 - Provide Haxe Language Syntax Highlighting. r=bgrins 2018-06-08 12:22:57 -04:00
Csoregi Natalia 6e1ac76332 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-02 01:05:17 +03:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Jason Laster 4a18800ce4 Bug 1466062 - Update Debugger Frontend v62. r=jdescottes 2018-06-01 11:24:25 -04:00
Nicolas Chevobbe de2a22ed41 Bug 983473 - Put a CodeMirror instance in JsTerm; r=bgrins.
This is only about adding an editor in the JsTerm and making
sure we can still execute input strings.
The styles should stay the same, except that now we don't have
to do the computation for the input height, since they're already
done in CodeMirror. In-line style, history navigation and
autocompletion will be handled in separate bugs.
The creation of the editor might be done outside of the JsTerm in
the future so we can re-use it to syntax highlight Evaluation input
in the output; but not in this bug since it would need to move
jsterm.execute as well.

MozReview-Commit-ID: 75TmF055mkp
2018-05-21 10:38:47 +02:00
Nicolas Chevobbe 7a62823af2 Bug 1447715 - Remove old-event-emitter usage from sourceeditor; r=gl.
MozReview-Commit-ID: 6o8I7TtPiFU
2018-03-21 18:30:21 +01:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
yulia bd093feca1 Bug 1382605 - Fix 6 tests failures on devtools/client/shared due the EventEmitter refactoring r=nchevobbe
MozReview-Commit-ID: EaFYqaY2M79
2018-03-07 10:17:03 +01:00
Florian Quèze c5f15a4700 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Julian Descottes 78861bdf52 Bug 1397366 - restore source-editor commands controller for scratchpad & styleeditor menus;r=ochameau
MozReview-Commit-ID: Cfgws8fqgvp
2018-01-03 20:52:58 +01:00
Mark Banner e47ccbfec3 Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop
MozReview-Commit-ID: H5YVp3rnzGo
2017-10-26 11:47:01 +01:00
Gabriel Luong 55cc6bcd6c Bug 1402709 - Don't use capture for the toolbox context menu. r=bgrins 2017-09-26 08:43:22 -04:00
Yury Delendik edf926d71e Bug 1399217 - Disable wasm disassembly for non-binary source. r=jlast
MozReview-Commit-ID: KEyyOjyKXPF
2017-09-12 13:57:31 -05:00
ZER0 d78f1c54ef Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 03:47:30 +02:00
Wes Kocher aa1caed330 Backed out changeset 58f678547059 (bug 1381542) for conflicting with the incoming m-c merge a=backout
MozReview-Commit-ID: 1wKVHbOAUdc
2017-08-10 18:23:14 -07:00
ZER0 c91b128704 Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 02:43:47 +02:00
Jason Laster ff761f729e Bug 1383803 - Update debugger frontend (v0.9.0). r=jdescottes 2017-07-24 14:30:00 -04:00
Christoph Kerschbaumer 2bc9019f0b Bug 1377851 - Load code mirror frame from external file within devtools. r=pbrosset 2017-07-05 14:10:07 +02:00
Carsten "Tomcat" Book c7568d9be4 Backed out changeset 4f8bb917762c (bug 1377851) for devtools failures like browser_editor_basic.js | correct iframe is there 2017-07-04 10:41:55 +02:00
Christoph Kerschbaumer 8dbe9431b2 Bug 1377851 - Use srcdoc instead of data: URI within devtools/client/sourceeditor/editor.js. r=pbrosset 2017-07-03 12:16:13 +02:00
Frederik Braun 96b2642639 Bug 1351608 - Disable warnings for existing violations to no-unsanitize rule r=Standard8.
MozReview-Commit-ID: 7cTNL5jMtRw
2017-07-03 20:07:02 +01:00
Yury Delendik d60db968a3 Bug 1364535 - Devtools frontend WebAssembly support for wast. r=jlast
MozReview-Commit-ID: KEkXaAQCWYN
2017-06-06 20:11:00 -05:00
Matt R 8ae0c9c5f9 Bug 1355696 - convert uses of 'defer' to 'new Promise' in client/sourceeditor; r=tromey
MozReview-Commit-ID: 5b1ObMvNA2e
2017-05-20 19:14:59 +01:00
Julian Descottes aeed2ba537 Bug 1365314 - Remove link between code mirror and document when destroying editor. r=jlast
Port the fix made on Github https://github.com/devtools-html/debugger.html/pull/2129

MozReview-Commit-ID: AS0hoo2tbqL
2017-05-16 09:18:37 +02:00
Julian Descottes 9b9cd11f91 Bug 1339293 - devtools sourceeditor: calculate indentSize depending on current position;r=gl
The TAB handler for the source editor used to add indentSize - 1 spaces, unless the caret
was on the beginning of a line. This only ever works if you are pressing TAB after writing
one character. Otherwise we should always calculate the necessary spaces based on the caret
position (modulo indentSize)

MozReview-Commit-ID: EdcM4IhhyMk
2017-05-02 12:48:42 +02:00
Jason Laster 9ea4297882 Bug 1331654 - Bump Debugger. r=jdescottes
* Add update tools
* Bump with the latest changes

MozReview-Commit-ID: 65Ca3SbMQ2e
2017-01-19 22:24:32 +01:00
Florian Quèze 63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Sebastian Hengst c6d9ef3e98 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen 548b6bdbef Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Ricky Chien 1495ce88bb Bug 1328498 - Sourceeditor appendTo HTML element supports r=Honza
MozReview-Commit-ID: 1gdhH8PdIuc
2017-01-04 11:52:26 +08:00
Gabriel Luong a61285b0f2 Bug 1322028 - Avoid destructuring requires where possible in the inspector. r=jdescottes 2016-12-17 12:44:56 +09:00
Tom Tromey c5e4df9459 Bug 1316630 - move PrefObserver to devtools/shared/prefs.js; r=jdescottes
MozReview-Commit-ID: C4KxFxv2LVT
2016-11-14 15:46:19 -07:00
Julian Descottes d57c72ad2c Bug 1320053 - set height 100% on .CodeMirror element;r=gl
MozReview-Commit-ID: IKmRGwiOjwu
2016-11-25 18:36:57 +01:00