Commit Graph
252 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
Florens Verschelde 88cdf65dff Bug 1507941 - Style CodeMirror folding buttons with the theme-twisty arrow; r=pbro
Differential Revision: https://phabricator.services.mozilla.com/D12185
2018-11-19 10:27:22 +00: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
yulia 7bb7129828 Bug 1495388 - Fix test failures associated with async inspector initalization; r=ochameau
Depends on D8707

Differential Revision: https://phabricator.services.mozilla.com/D8992
2018-10-30 14:51:40 +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
Florens Verschelde 7cf0dc594d Bug 1471163 - Remove devtools floating scrollbars and set scrollbar-color on Linux; r=jdescottes
Remove the floating scrollbar implementation used on Linux now that CSS scrollbar-color
landed for Linux. Also force scrollbar-color for the DevTools light theme on Linux, to
avoid visual conflicts with dark GTK themes.

Differential Revision: https://phabricator.services.mozilla.com/D7858
2018-10-14 17:14:10 +00:00
yulia 8cf0c5f96e Bug 1487428 - Use target.getFront in server browser tests; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D6768
2018-09-28 05:46:29 +00:00
Bogdan Tara f1651eb098 Backed out changeset e7624782898d (bug 1487428) for test_inspector-insert.html failures CLOSED TREE 2018-09-27 23:38:04 +03:00
yulia 1cded80d53 Bug 1487428 - Use target.getFront in server browser tests; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D6768
2018-09-27 15:18:08 +00:00
Alexandre Poirot cce577ae01 Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-24 09:52:57 -07:00
Alexandre Poirot 0ccb191bef Bug 1485676 - Connect to local server from TargetFactory.forTab and make TabTarget always remote-like. r=yulia
Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4078

MozReview-Commit-ID: JAwiySsBZBu
2018-09-24 09:52:55 -07:00
shindli dbbcc1c04f Backed out 9 changesets (bug 1485676) for failures in browser/tools/mozscreenshots/devtools/browser_devtools.js CLOSED TREE
Backed out changeset d358feec4ca1 (bug 1485676)
Backed out changeset ed554dbb062f (bug 1485676)
Backed out changeset 6e78058df94d (bug 1485676)
Backed out changeset 3a6f1b0e71f4 (bug 1485676)
Backed out changeset 16d2403aa787 (bug 1485676)
Backed out changeset 454eddf52157 (bug 1485676)
Backed out changeset 926f725f2183 (bug 1485676)
Backed out changeset fb03f174bd5f (bug 1485676)
Backed out changeset ceb93dd1799a (bug 1485676)
2018-09-24 15:27:27 +03:00
Alexandre Poirot 5502b1399b Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-24 01:25:02 -07:00
Alexandre Poirot ded1511af6 Bug 1485676 - Connect to local server from TargetFactory.forTab and make TabTarget always remote-like. r=yulia
Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4078

MozReview-Commit-ID: JAwiySsBZBu
2018-09-24 01:25:01 -07:00
Gurzau Raul a532c08398 Backed out 9 changesets (bug 1485676) for failing at damp inspector/cold-open.js on a CLOSED TREE
Backed out changeset 4de2e71debfe (bug 1485676)
Backed out changeset e63025150c7a (bug 1485676)
Backed out changeset f9ef30ae3f7f (bug 1485676)
Backed out changeset a83636fab16a (bug 1485676)
Backed out changeset b1fd24929e09 (bug 1485676)
Backed out changeset acb27b915742 (bug 1485676)
Backed out changeset ba2157632772 (bug 1485676)
Backed out changeset d1d6b9bc2372 (bug 1485676)
Backed out changeset d7646ea8640b (bug 1485676)
2018-09-22 19:42:04 +03:00
Alexandre Poirot ef7fa3ed18 Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-22 08:34:21 -07:00
Alexandre Poirot a9337c9d24 Bug 1485676 - Connect to local server from TargetFactory.forTab and make TabTarget always remote-like. r=yulia
Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4078

MozReview-Commit-ID: JAwiySsBZBu
2018-09-22 08:34:20 -07:00
arthur.iakab 12a839773f Backed out 9 changesets (bug 1485676)for perma failures in devtools/client/canvasdebugger/test/browser_canvas-actor-test-01.js CLOSED TREE
Backed out changeset 9f5ec2aa7109 (bug 1485676)
Backed out changeset 0d530c1316a4 (bug 1485676)
Backed out changeset 03278e6fe685 (bug 1485676)
Backed out changeset 275463260056 (bug 1485676)
Backed out changeset 4c5a956b33f7 (bug 1485676)
Backed out changeset d8fe80bb0e3c (bug 1485676)
Backed out changeset 56240996921f (bug 1485676)
Backed out changeset ec0a322f5cc9 (bug 1485676)
Backed out changeset f0f4f9407970 (bug 1485676)
2018-09-21 12:48:48 +03:00
Alexandre Poirot 7d9e6c4418 Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Differential Revision: https://phabricator.services.mozilla.com/D6161
2018-09-21 08:08:11 +00:00
Alexandre Poirot 6bdb907e8d Bug 1485676 - Connect to local server from TargetFactory.forTab and make TabTarget always remote-like. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D4078
2018-09-21 08:07:48 +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
yulia 5e4d38002f Bug 1447494 - remove all instances of commandline/helpers; r=ochameau
Removed remaining imports of commandline helpers, as they are no longer used anywhere

Differential Revision: https://phabricator.services.mozilla.com/D3412
2018-08-16 14:06:07 +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
Julian Descottes de5cde2836 Bug 1480384 - Remove unused theme option for autocomplete-popup;r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D2666
2018-08-02 15:05:50 +00:00
Nicolas Chevobbe 767d3664e3 Bug 1478435 - Apply photon-styling to autocomplete popup; r=nchevobbe.
This removes the border-radius from the autocomplete popup (and
its items) and refines the spacing.
Since we have more padding for the autocomplete items, we need
to adjust the xOffset when showing the popup.
The yOffset of the webconsole autocomplete is tweaked a bit so
we see its border; the xOffset of the markup search input is also
tweaked to consider the left padding we use to display the search
icon in the input.

MozReview-Commit-ID: JyLySLBUgGy
2018-07-26 09:08:10 +02:00
Kris Maglione 694a81a216 Bug 1474139: Follow-up: Fix test that relied on Timer.jsm being implicitly imported. r=bustage,test-only CLOSED TREE 2018-07-17 15:27:46 -07: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 83ad17067e Bug 1475659 - Update Codemirror to 5.39.0. r=bgrins 2018-07-13 18:11:01 -04:00
Julian Descottes 181be94d3f Bug 1471162 - Style codemirror scrollbar corners correctly in dark-theme;r=gl
MozReview-Commit-ID: 875fTgrmpJO
2018-06-29 16:03:22 +02:00
Sebastian Hengst 4124655c70 Bug 1469872 - update bugzilla products and components in moz.build files: devtools. r=nalexander
MozReview-Commit-ID: 6bs0jkTP6rP
2018-06-20 21:34:40 +03: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
Gabriel Luong 3ce0b06c59 Bug 1465810 - Update Codemirror to 5.38.0. r=bgrins 2018-06-01 15:58:04 -04:00
Julian Descottes 9456167901 Bug 1454696 - Fix leftover issues for prefer-const;r=yulia
MozReview-Commit-ID: JwOXoqw2mks
2018-06-01 12:19:35 +02: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
Jason Laster f58c3ca970 Bug 1465080 - Render breakpoints with CM.runMode (v60). r=dwalsh
MozReview-Commit-ID: HmYfF8gm2Bd
2018-05-29 13:50:08 -04:00
Cosmin Sabou fecab7ed33 Merge inbound to mozilla-central. a=merge 2018-05-04 20:37:47 +03:00