Commit Graph
50 Commits
Author SHA1 Message Date
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
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
Jared Wein 21fc75d491 Bug 1326479 - Fix 'indent' eslint errors now that eslint scans multiline array and object definitions. r=Gijs
MozReview-Commit-ID: 99mWjxu8PPn
2017-01-03 10:07:50 -05:00
Patrick Brosset ee4a9fbf43 Bug 733880 - Add the missing copy/paste/cut menus on all text boxes in inspector; r=jdescottes
This change makes use of the toolbox's textBox menu in all of the
inspector's text fields.
Previously, right-clicking in a text field in the inspector would give
various results: either the tool's context menu would open, or nothing
would happen, or the usual copy/paste/cut menu would open.

Now, right-clicking in any text field in the inspector always shows the
copy/paste/cut menu.

MozReview-Commit-ID: DwkhBqY7Qzj
2016-09-23 19:21:09 +02:00
Greg Tatum 88c911b2cd Bug 1289425 - Allow sourceeditor to fallback to client-side css properties; r=tromey
MozReview-Commit-ID: Khak8Av1v67
2016-08-12 15:01:42 -05:00
Greg Tatum 696677b27c Bug 1289425 - Remove domUtils from the InplaceEditor; r=tromey
MozReview-Commit-ID: D9thpWSNwKC
2016-08-05 11:40:51 -05:00
Tom Tromey 44ebe29d9c Bug 1290227 - add replacement module for DOM_VK_ constants; r=bgrins
MozReview-Commit-ID: INmMxfP8ZuL
2016-08-08 15:41:37 -06:00
Greg Tatum 5ecf2bffa5 Bug 1275939 - replace domUtils.getCSSValuesForProperty in inplace-editor.js r=tromey
MozReview-Commit-ID: KtuAWnNsnaq
2016-08-01 09:34:00 +02:00
Tom Tromey 6589041a89 Bug 1278473 - use Services.focus, not nsIFocusManager, in devtools; r=gregtatum
MozReview-Commit-ID: Ep3G0S62clm
2016-07-25 12:24:36 -06:00
Julian Descottes 5bc2788731 Bug 1266456 - part9: use HTMLTooltip for autocomplete-popup;r=bgrins
Modify the devtools autocomplete-popup to rely on a HTMLTooltip instance
instead of a XUL panel.

Other than the straightforward migration to HTML, the main difference with
the new implementation is that the richlistbox has now been replace with a
simple HTML list element. The former XUL widget used to be able to take the
focus from the input it was linked to.

This is no longer the case. Most autocomplete users were always keeping the
focus in the input, except for the inspector-search, which was moving the
focus back and forth between the input and the autocomplete's richlistbox.
Now the focus is always in the input. A practical example to illustrate how
this changes the UX: before when the user had the focus on the first element
of the list, pressing "DOWN" would keep the element selected but visually move
the focus in the input. Now the selection simply cycles to the next item.

Even though this introduces a difference in behaviour compared to the previous
implementation, it makes the inspector search UX consistent with the other
autocomplete widgets used in devtools.

Another difference is about the display for the inspector-search. The position
of the autocomplete popup used to be above the input. This is now impossible to
achieve because the search input is at the top of the toolbox and the HTML tooltip
can not exceed the limits of the toolbox.

For this #2 issue, either we manage to use XUL panel wrappers, in which case, the
autocomplete will be displayed as it used to. Or we can invert the order in which
items are inserted and explicitly ask for the autocomplete to be displayed below the
input. I prefered not to change this here in order to make the code change easier to
understand, but it should be addressed in a follow-up.

MozReview-Commit-ID: jH9aXm9Jvz
2016-07-07 16:32:42 +02:00
J. Ryan Stinnett 169c44d5f6 Bug 1193390 - Remove single arg Cu.import from /devtools. r=tromey
A few miscellaneous linting issues also addressed near the lines involved.

MozReview-Commit-ID: 9t1RwxdSS2X
2016-06-09 14:10:07 -05:00
Julian Descottes f35ef554de Bug 1270494 - fix autocomplete popup offset for multiple values input;r=pbro
Fixed regression from Bug 1168246 and added a unit test to loosely check that
the autocomplete popup moves along with autocompleted query.

MozReview-Commit-ID: H7t5WjkwBE4
2016-06-06 12:10:13 +02:00
Julian Descottes c778afb7c0 Bug 1254070 - inspector: trigger autocomplete if nextchar is not a word character;r=gl
For the style attribute CSS autocompletion, suggestions will now be provided
when the character after the caret is a non-word character. As opposed to the
current behavior where suggestions would only be displayed if the next character
was the end of the input or a space.

This allows to show suggestions when the user's caret is next to ";" or '"', which
can frequently happen when editing style attributes.

MozReview-Commit-ID: Bvz6koikbqR
2016-03-08 19:27:25 +01:00
Julian Descottes 6b7d986d94 Bug 1275081 - Part 2: Add inplace editor tests using mocked CSS property/values suggestions. r=tromey
In order to keep testing indexes & total number of displayed suggestions,
added two tests relying on mocked suggetions list.

The inplace-editor API has been modified to allow mocking the suggestions.

Helper methods in devtools/client/shared/test have been moved to a new
test helper helper_inplace_editor.js, loaded by all inplace-editor
tests of this test suite.

CLOSED TREE

MozReview-Commit-ID: LuXelKF0kY
2016-05-25 23:24:28 +02:00
Ricky Chien 4e9501248c Bug 1178967 - Collapse autocomplete popup when pressing Home/En. r=jdescottes
MozReview-Commit-ID: GqF75PItgf5
2016-05-24 18:33:00 +08:00
Carsten "Tomcat" Book ea6b128335 merge mozilla-inbound to mozilla-central a=merge 2016-05-24 14:52:23 +02:00
Tom Tromey 8f1292bce5 Bug 1270994 - Fix ESLint errors in devtools/client/shared/*.js; r=jryans
MozReview-Commit-ID: 1od43gBnUq1
2016-05-19 08:35:45 -06:00
J. Ryan Stinnett 530b903fcf Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.

To generate this patch, I ran:

./mach eslint devtools --no-ignore --fix

After this, I reverted any changes to third party files that we really do want
to ignore.

MozReview-Commit-ID: 6Q8BApkAW20
2016-05-18 12:49:23 -05:00
Nicolas Chevobbe e72e59a6cc Bug 1271191 - Add support CSS #rgba and #rrggbbaa color syntax in the inspector. r=miker
Add support for both syntax in CssColor
Add support in value increment
Edit several tests to make sure we handle these syntaxes all across the inspector (display swatch,
color increment, unit switching, …).

MozReview-Commit-ID: FLw9va3i8H0
2016-05-10 13:54:08 +02:00
Yura Zenevich 19cad809d2 Bug 1242694 - improving inspector markup view accessibility (semantics and keyboard). r=gl
MozReview-Commit-ID: 4EvLALR4NIv
2016-05-19 16:50:23 -04:00
Julian Descottes c38fcb8804 Bug 1260419 - part2: do not hide inplace editor autocomplete popup when scrolling;r=pbro
MozReview-Commit-ID: W5N9tFCyOM
2016-05-04 16:39:29 +02:00
Julian Descottes afba11f7a8 Bug 1260419 - part1: ruleview shows more CSS suggestions, with better sorting;r=pbro
Usability changes to the ruleview autocomplete:
- max suggestions is now capped to 500 to make sure as many suggestions as possible
  as possible are displayed
- vendor-prefixed properties are moved to the end of the list
- !important is no longer the first suggested item

MozReview-Commit-ID: AOfHyqS3n8s
2016-04-07 00:43:30 +02:00
Julian Descottes 8b9b1355a0 Bug 1178462 - Cancel inplace editor autocomplete on window blur;r=gl
MozReview-Commit-ID: BI9LHtUKta
2016-04-27 09:55:18 +02:00
Patrick Brosset e88d43e414 Bug 1069829 - 1 - Remove a usage of domUtils.cssPropertyIsValid in inplace-editor; r=tromey
cssPropertyIsValid was used only to find a compatible css unit when a number
was being incremented/decremented.
Because units are unlikely to be different between debuggees, a local DOM
node was used to validate the tested unit by applying and getting style on
the DOM node.

MozReview-Commit-ID: K0ldOgNRalg
2016-04-15 10:42:31 +02:00
Julian Descottes ec481775ce Bug 1261317 - part2: prevent autocomplete on arrow keys in multiline editor;r=pbro
Check if the CSS inplace editor is currently using several lines
to display its value. When using several lines, prevent increment,
decrement and autocomplete features.

The autocomplete can still be triggered by typing a value at the end
of the input (or before a space). When the autocomplete popup is
opened, UP/DOWN still allow to cycle through the suggestions.

MozReview-Commit-ID: DapCdhjx444
2016-04-01 17:26:58 +02:00
Julian Descottes d84d990348 Bug 1261317 - part1: inplace-editor: small refactor of keypress event handler;r=pbro
Refactor the keypress event handler to make it easier to read.

MozReview-Commit-ID: 4yvlg7GIYMK
2016-04-01 17:44:39 +02:00
Julian Descottes c02a0587ed Bug 1261827 - inplace-editor: copyTextStyles should not copy line-height property;r=pbro
Only text styles should be copied between the replaced element and the input.
Other styles are still copied between the input and the measurement element.

MozReview-Commit-ID: 7YSWtjLgH2z
2016-04-04 16:26:37 +02:00
Julian Descottes d674a11fd0 Bug 1143742 - part3: multiline inplace-editor autocomplete behavior;r=gl
The default inplace-editor autocomplete behavior is not userfriendly
when combined with a multiline inplace-editor. Navigating up/down might
trigger an autocomplete suggestion.

Also, the autocomplete popup is not displayed at the correct position and
should take the multiline into account.

MozReview-Commit-ID: JTiCQ3HK5bn
2016-03-30 22:58:41 +02:00
Julian Descottes 2b8ac3a5ab Bug 1143742 - part2: multiline inplace-editor should support a maxWidth option;r=gl
The inplaceEditor now supports a maxWidth configuration option which can either
be a number or a method returning a number. This maxWidth will be applied to the
hidden element used in order to autosize the input.

MozReview-Commit-ID: JTiCQ3HK5bn
2016-03-31 00:59:16 +02:00
Julian Descottes d1898ddbbc Bug 1168246 - part3: ES lint fixes for inplace-editor and autocomplete-popup;r=pbrosset
MozReview-Commit-ID: GbEGN3aNhxz
2016-03-29 16:01:48 +02:00
Julian Descottes 9ea3cfba5a Bug 1168246 - part1: CSS autocomplete picks most popular prop;r=pbrosset
Based on the original patch from danemacmillan.

* suggestion-picker.js
Add a new shared util to find the most popular css property in an array.
The list of popular css properties is extracted from chrome devtools code.
* autocomplete-popup.js
Can specify selected item index when opening the popup or setting items.
* inplace-editor.js
Use the suggestion-picker to select a default property.


MozReview-Commit-ID: JuWZzbBSBqX
2016-03-29 16:08:17 +02:00
Julian Descottes 7402670bec Bug 1155465 - part2: inplace-editor: disable increment on up/down for PLAIN_TEXT;r=miker
This patch forces the increment step to 0 when the type of the inplace-editor is
PLAIN_TEXT.

This type is used by:
- markup view for editing text and comment nodes
- rule-view to edit selectors
- projecteditor resource tree to create or rename a file

All other inplace editors will still benefit from the increment/decrement feature.

MozReview-Commit-ID: 8tZiFMwmWM3
2016-03-09 22:09:29 +01:00
Julian Descottes f62a070cf9 Bug 916582 - skip autocomplete suggestions if style attribute already closed;r=tromey
When editing the style attribute, do not trigger autocomplete suggestions if the style attribute
was already closed by a set of matching double or single quotes.

Added a new test and moved common test functions to a dedicated helper.

MozReview-Commit-ID: 5AfkNXWvqTA
2016-03-08 19:26:17 +01:00
Alexandre Poirot bb787b541e Bug 1245530 - Use require(Services) instead of Cu.import(Services.jsm). r=jryans 2016-02-27 04:51:10 -08:00
Julian Descottes 21dc2c1ad8 Bug 1243695 - ensure caret is visible in ruleview prop editor;r=miker 2016-02-12 01:43:44 +01:00
Julian Descottes 491bcaed99 Bug 1166956 - add valid unit when incrementing CSS value "0";r=tromey 2016-02-11 14:49:52 +01:00
Julian Descottes 1430bfb3dd Bug 1030712 - Ruleview: Skip apply() after clicking suggestion. r=pbro
When using the inplace editor, clicking on an autocomplete suggestion
no longer triggers apply() and no longer calls the done() callback.
This way the inplace editor behavas similarly when using the keyboard
and when using the mouse.
2016-01-28 21:22:33 +01:00
Julian Descottes 2df0c6b4cb Bug 1243695 - reduce inplace editor size in ruleview;r=miker 2016-01-28 12:17:57 +01:00
Julian Descottes 6cabc1c470 Bug 1198326 - Prevent event propagation on click events of the inplace editor;r=bgrins 2016-01-20 01:49:50 +01:00
J. Ryan Stinnett 75deba7cf2 Bug 1226661 - DevTools client JSM global tweak for B2G. r=ochameau 2015-11-23 18:10:11 -06:00
Tom Tromey 98a369151e Bug 1179318 - fix css property name completion. r=pbrosset 2015-10-27 09:12:00 +01:00
J. Ryan Stinnett 687866dde2 Bug 1203159 - Rewrite DevTools resource URLs. r=ochameau 2015-10-21 12:48:53 -05:00
jarjun ecac0e270b Bug 1039482 - Properly position and style the file name edit field in the projecteditor. r=bgrins
---
 devtools/client/projecteditor/lib/tree.js          | 41 +++++++++++++++++++---
 .../test/browser_projecteditor_rename_file.js      |  2 +-
 devtools/client/shared/inplace-editor.js           | 11 ++++--
 .../client/themes/projecteditor/projecteditor.css  |  2 +-
 4 files changed, 48 insertions(+), 8 deletions(-)
2015-10-09 12:46:13 -07:00
Michael Ratcliffe a638984ea2 Bug 1203520 - We need a DevTools ESLint plugin containing our ruleset r=gps 2015-09-30 14:44:48 +01:00
J. Ryan Stinnett 2dada8f365 Bug 912121 - Rewrite require / import to match source tree. rs=devtools
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location.  Here we rewrite all require and import calls to match the new
location that these files are installed to.
2015-09-21 12:04:18 -05:00
J. Ryan Stinnett a3073e0420 Bug 912121 - Migrate major DevTools directories. rs=devtools
Move major DevTools files to new directories using the following steps:

hg mv browser/devtools devtools/client
hg mv toolkit/devtools/server devtools/server
hg mv toolkit/devtools devtools/shared

No other changes are made.
2015-09-21 12:02:24 -05:00