Commit Graph

241 Commits

Author SHA1 Message Date
Alexandre Poirot
fc8714580a 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
082e20e693 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
51a3c01ced 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
796f22b354 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
631e7bfdf9 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
ad28ad0169 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
8724260e30 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
48f5790c9b 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
6877b6a75c 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
c023333832 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

--HG--
extra : moz-landing-system : lando
2018-09-21 08:08:11 +00:00
Alexandre Poirot
196d295b46 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

--HG--
extra : moz-landing-system : lando
2018-09-21 08:07:48 +00:00
Nicolas Chevobbe
4064742f1a Bug 1491776 - Do not use markText to show the completion text; r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D6020

--HG--
extra : moz-landing-system : lando
2018-09-18 19:22:01 +00:00
Nicolas Chevobbe
eef06be71f 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

--HG--
extra : moz-landing-system : lando
2018-09-04 16:19:23 +00:00
Gabriel Luong
66153e02ba 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
08f60bed59 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

--HG--
extra : moz-landing-system : lando
2018-08-21 12:29:00 +00:00
yulia
9334e84033 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

--HG--
extra : moz-landing-system : lando
2018-08-16 14:06:07 +00:00
Nicolas Chevobbe
01f2cedfe4 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

--HG--
extra : moz-landing-system : lando
2018-08-13 10:07:15 +00:00
Nicolas Chevobbe
ddc7aad4e0 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

--HG--
extra : moz-landing-system : lando
2018-08-07 14:01:55 +00:00
Julian Descottes
92987d7581 Bug 1480384 - Remove unused theme option for autocomplete-popup;r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D2666

--HG--
extra : moz-landing-system : lando
2018-08-02 15:05:50 +00:00
Nicolas Chevobbe
f9ab7b5c1a 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

--HG--
extra : rebase_source : 04d0e1335447c576f7e23f4b8a2280337695ac46
2018-07-26 09:08:10 +02:00
Kris Maglione
c29a462c0b 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
6227906abb 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

--HG--
extra : rebase_source : 5b916fe9ad953ce80c058be1ea2eb8894c625c8e
2018-07-05 16:52:38 +02:00
Nicolas Chevobbe
c09c80f824 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

--HG--
extra : rebase_source : d35caaf19b14d9a5cfbddaf58d20bc6c7aeb4aaa
2018-07-05 16:40:03 +02:00
Nicolas Chevobbe
1ab949fecd 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

--HG--
extra : rebase_source : aa728e3ee3254e2ef7eb1768e3f8621decca0535
2018-07-05 16:18:53 +02:00
Nicolas Chevobbe
a47aba9281 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

--HG--
extra : rebase_source : 4d57be89965691948609c9037ef60d8850cea8af
2018-07-05 16:15:35 +02:00
Gabriel Luong
5075420858 Bug 1475659 - Update Codemirror to 5.39.0. r=bgrins 2018-07-13 18:11:01 -04:00
Julian Descottes
d27be980f4 Bug 1471162 - Style codemirror scrollbar corners correctly in dark-theme;r=gl
MozReview-Commit-ID: 875fTgrmpJO

--HG--
extra : rebase_source : 6291c64f72fc33a4ecb99130085410b1d09628cf
2018-06-29 16:03:22 +02:00
Sebastian Hengst
82bbb42c90 Bug 1469872 - update bugzilla products and components in moz.build files: devtools. r=nalexander
MozReview-Commit-ID: 6bs0jkTP6rP

--HG--
extra : rebase_source : 4e554f8e710aea1fb372a0f21d7539cf568baa17
2018-06-20 21:34:40 +03:00
Gabriel Luong
365d961370 Bug 1466558 - Provide Haxe Language Syntax Highlighting. r=bgrins 2018-06-08 12:22:57 -04:00
shindli
ac62ac7d2e 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
388b23d8ab Bug 1466558 - Provide Haxe Language Syntax Highlighting. r=bgrins 2018-06-08 12:22:57 -04:00
Csoregi Natalia
e2f48890e1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-02 01:05:17 +03:00
Gabriel Luong
6a3f757203 Bug 1465810 - Update Codemirror to 5.38.0. r=bgrins 2018-06-01 15:58:04 -04:00
Julian Descottes
7fdc2c153f Bug 1454696 - Fix leftover issues for prefer-const;r=yulia
MozReview-Commit-ID: JwOXoqw2mks

--HG--
extra : rebase_source : a3f07665a42c2779a85b7901a07206266a9d1616
extra : source : ae946f375e0d0f4f0f0fc859c54040fef42cbc2c
2018-06-01 12:19:35 +02:00
Julian Descottes
640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Jason Laster
917492cdcf Bug 1466062 - Update Debugger Frontend v62. r=jdescottes 2018-06-01 11:24:25 -04:00
Nicolas Chevobbe
6a3954e6e8 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

--HG--
extra : rebase_source : ec7edb17ffb13c757ed51e03a1174399ea2bcbde
2018-05-21 10:38:47 +02:00
Jason Laster
bff4a75c01 Bug 1465080 - Render breakpoints with CM.runMode (v60). r=dwalsh
MozReview-Commit-ID: HmYfF8gm2Bd
2018-05-29 13:50:08 -04:00
Cosmin Sabou
dc4e10c449 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/profiles/prefs_general.js => testing/profiles/common/user.js
2018-05-04 20:37:47 +03:00
Andrea Marchesini
b4b5d38767 Bug 1458883 - Remove File.lastModifiedDate, r=qdot 2018-05-04 14:39:53 +02:00
Michael Ratcliffe
764c4c8578 Bug 1098374 - Telemetry: Stop all monkey patching in devtools telemetry tests r=yulia
Changes and notes:
  - Created `devtools/client/shared/test/telemetry-test-helpers.js`, which
    contains test helpers to aid in creating and running telemetry tests.
  - Removed any telemetry monkeypatching as it is not dependable and no longer
    needed (there is some left in GCLI but the test is now disabled because
    we are removing GCLI soon anyhow).
  - Because `telemetry-test-helpers.js` is imported by `shared-head.js` I
    have had to make it available everywhere that shared-head.js is used.
  - All telemetry tests have been rewritten to use the new helper.
  - shared-head.js cannot be imported by tests inside
    `devtools/client/performance/test/` because perf have custom `once` and
    `waitFor` implementations that act differently from the ones inside
    `shared-head.js`. This means I had to import the telemetry helpers into
    `devtools/client/performance/test/head.js`
  - Created `devtools/client/shared/test/browser_telemetry_misc.js` to be sure
    to catch `DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER` (we catch a few
    others to be thorough).
  - Disabled `browser_inspector_menu-02-copy-items.js`, which was failing to
    test some expired scalars. I also corrected the way the scalars are logged
    because it was completely wrong.

MozReview-Commit-ID: JjQEGM6hT61

--HG--
extra : rebase_source : cd1214d01bd11908f69167839975cd93ecb83421
2018-05-01 18:06:14 +01:00
Xidorn Quan
5050b395ae Bug 1434130 part 13 - Use Servo code to back GetCSSValuesForProperty. r=emilio,gl
This causes various changes to properties-db.js and also many devtools
tests get updated.

There are two changes affect multiple tests:

* `calc` gets removed from everywhere. We never have it listed in all
  properties which deserve it, and doing so without much false positive
  (i.e. properties don't deserve but get it) can be pretty tricky.
  So they are just removed for now.

* The complete color keyword list is no longer included, and instead,
  "COLOR" is prepended to the list directly. We can probably remove
  the related code which replaces color keywords with "COLOR" from
  devtools. Note that, with stylo enabled, the list is already unrelated
  to what the parsing code uses. We should eventually re-enable the
  disabled test here after we can get the color list from cssparser
  in bug 1456715.

Other changes to properties-db.js seem to be valid, some of them also
affect tests:

* `{-webkit-,}align-{content,items,self}` get `first baseline`, `safe`,
  `unsafe`, and lose `left` and `right`.

* `{-moz-,-webkit-,}{animation,transition}{,-timing-function}` has a
  new `frame` keyword which is a function value in `<timing-function>`.

* `{background,{-webkit-,}mask}-position-x` lose `top` and `bottom`, and
  correspondingly `{background,{-webkit-,}mask}-position-y` lose `left`
  and `right`.  They don't deserve those values.

* `{background,{-webkit-,}mask}{,-size}` get `auto`.

* `border` shorthand loses `<image>` values as well as other keyword
  values for `border-image-*` subproperties, because they aren't parsed
  on the shorthand.

* `{-moz-,}border-image{,-width}` get `auto`.

* `-moz-context-properties` gets `none`.

* `cursor` get some -moz-prefixed values as well as `url`.

* `fill` and `stroke` get the color keywords.

* `{-webkit-,}filter` get the keywords and function names.

* `font` shorthand loses values from many of `font-variant-*` properties
  because they are not parsed there.

* `font-variant` and `font-variant-alternates` get function values of
  the longhand.

* `font-variant-{east-asian,ligatures,numeric}` get `normal`, and
  `font-variant-ligatures` in addition gets `none`.
  `font-{feature,variation}-settings` also get `normal`.

* `grid` and `grid-template-{areas,columns,rows}` get `none`.

* `grid`, `grid-template`, and `grid-template-{columns,rows}` get
  `auto`, `fit-content`, `minmax`, and `repeat`.

* `grid-auto-{columns,rows}` get `auto`, `fit-content` and `minmax`.

* `-moz-image-region` gets `auto` and `rect`.

* `{-webkit-,}justify-content` lose `baseline`, `last baseline`, and
  get `safe` and `unsafe`.

* `{justify,place}-items` get `first baseline`, `legacy`, `safe`,
  `unsafe` and lose `auto`.

* `{justify,place}-self` and `place-content` get `first baseline`,
  `safe`, and `unsafe`.

* `outline{,-style}` get `hidden`.

* `scroll-snap-coordinate` gets `none`, and `scroll-snap-points-{x,y}`
  gets `none` and `repeat`.

* `shape-outside`, `text-emphasis{,-style}` get all the keyword values
  and function names they deserve.

* `stroke-dasharray` gets `none`.

* `text-combine-upright` drops `digits` which we never implemented.

* `{-moz-,-webkit-,}transform` and `-moz-window-transform` get their
  transform function list. `accumulatematrix` and `interpolatematrix`
  aren't real CSS value but they have `#[css(function)]` specified.
  We should probably remove them at some point.

* `will-change` gets `auto`.

* All properties accept `<image>` value now gets -webkit-prefixed
  gradient function names, including
  * `background{,-image}`,
  * `{-moz-,-webkit-,}border-image{,-source}`, and
  * `{-webkit-,}mask{,-image}`.

MozReview-Commit-ID: E7Y0CFUFYgW

--HG--
extra : source : bab732c8c531cfca1bcd233f769c25bb2e373773
2018-04-29 09:03:31 +10:00
Gabriel Luong
7331bdb85a Bug 1456143 - Update Codemirror to 5.37.0. r=bgrins 2018-04-24 14:34:58 -04:00
Alexandre Poirot
9b2fdcf8bb Bug 1453712 - Use a preference to set the testing flag. r=jryans
MozReview-Commit-ID: 1cjSQnXtc4h

--HG--
extra : rebase_source : 55c0c9fa81a8dc17b92cba721dcc5912b07d0fab
2018-04-12 09:22:42 -07:00
Noemi Erli
1270a21724 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-23 01:00:18 +02:00
Nicolas Chevobbe
cc8ba2597e Bug 1447715 - Remove old-event-emitter usage from sourceeditor; r=gl.
MozReview-Commit-ID: 6o8I7TtPiFU

--HG--
extra : rebase_source : b46861934dc9ee223b12d5c991cc3f8d2ca6ab81
2018-03-21 18:30:21 +01:00
Oriol Brufau
b76ef6c3e0 Bug 1445807 - Remove unsafe CPOWs in Source Editor tests r=jryans
MozReview-Commit-ID: 8OaDw0HSTx

--HG--
extra : rebase_source : c7557af34c286e8c6d99021b9c4615ed12f370a6
2018-03-20 21:52:13 +01:00
Boris Zbarsky
837dc7eaaa Bug 1446711 part 8. Get rid of nsIDOMMouseEvent. r=qdot
MozReview-Commit-ID: 2FK1MA4LGZj
2018-03-20 00:16:07 -04:00
Kris Maglione
313b707b2e Bug 1443964: Part 3 - Remove no-cpows-in-tests rule. r=mconley
The shims that this rule tests for no longer exist.

MozReview-Commit-ID: DMgP7Hczavc

--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
2018-03-07 19:31:28 -08:00
Kris Maglione
83957914cc Bug 1445551: Part 1b - Whitelist unsafe CPOW use in existing tests. r=mconley
MozReview-Commit-ID: 4ojwvjw9XGT

--HG--
extra : rebase_source : f7b79ad5998f1138266e89767ee1b434e4797b30
2018-03-14 14:35:05 -07:00