Commit Graph

53 Commits

Author SHA1 Message Date
Alexandre Poirot
2c044cf33c Bug 1284259 - Prevent exception while dismissing event tooltip details. r=jdescottes
MozReview-Commit-ID: 4BjCwSv8QdB
2016-07-13 13:15:01 +02:00
Julian Descottes
9c689d6870 Bug 1285206 - Enable xul panel for some devtools tooltips;r=bgrins
Set useXulWrapper to true for markup view image previews and rule view
tooltips.

Also slightly changed the logic in HTMLTooltip.js so that useXulWrapper is only
true when we are in a XUL context.

MozReview-Commit-ID: 9EkQYLLAn7C
2016-07-08 15:46:42 +02: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
Greg Tatum
04061ecb15 Bug 1226898 - Make autoscroll distance depend on the document height r=pbro 2016-07-05 11:52:25 -07:00
Steve Melia
70589f1d77 Bug 1269226: Explicitly handle node deletion in inspector breadcrumbs. r=pbro 2016-05-25 00:06:28 +01:00
Tom Tromey
20736966f0 Bug 1264654 - Use DOMParser in devtools. r=bgrins
MozReview-Commit-ID: BB829YyUBh7
2016-06-20 06:34:32 -06:00
Tom Tromey
55d301f4b4 Bug 1273941 - replace uses of promise.defer in devtools/client/inspector; r=jryans
MozReview-Commit-ID: CBKDIFYL9Ij
2016-06-09 09:05:41 -06: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
2e11b982f8 Bug 1266450 - part6: migrate EventDetails tooltip;r=bgrins
For now this is a 1 to 1 migration of the existing Tooltip
helper method from XUL to HTML.

MozReview-Commit-ID: 9YiJLgibV9h
2016-05-31 11:25:43 +02:00
Julian Descottes
ce41dce5f4 Bug 1266450 - part2: remove iframe container for HTML tooltip;r=bgrins
In order to have tooltips with a variable height, the tooltip container
should be allowed to resize itself on the fly, which cannot be achieved
with an iframe.

This changeset makes the HTMLTooltip rely on a HTML container inserted
in the XUL document directly. This allows to go back to a synchronous
API which also simplifies the implementation.

MozReview-Commit-ID: EDcsnVSKmeU
2016-05-30 23:02:58 +02:00
Julian Descottes
33785e2ef3 Bug 1107658 - fix undo for delete node when next sibling is a pseudo element;r=pbro
Check that the stored sibling is a valid target for insertBefore, update existing
test to cover this use case.

MozReview-Commit-ID: 6yvLfSQMAJw
2016-06-02 22:27:24 +02:00
Julian Descottes
f53bd5b9dd Bug 1202458 - part1: inline text nodes in markupview only if they are short enough;r=pbro
The markup view will now inline a textnode in its container if and only if:
- the text node is the only child (pseudo elements included)
- the text node length is smaller than a predefined limit

If a container is expanded, its text nodes will now always be rendered in full,
no longer as a short version with an ellipsis. When selecting or navigating on
a textnode, the layout will no longer be modified on the fly.

MozReview-Commit-ID: HcDMqjbOesN
2016-06-02 10:41:49 +02:00
James Long
d86f63cef0 Bug 1265854 - replace uses of nsiDOMNode constants in devtools frontend r=tromey 2016-06-03 09:47:58 -04:00
Carsten "Tomcat" Book
d83db65f33 Backed out changeset f3bdf3ebaf4c (bug 1202458) for test failures in test_inspector-mutations-value.html - missed that changeset in the backout before, sorry 2016-06-02 16:32:05 +02:00
Julian Descottes
57f9c7e9d0 Bug 1202458 - part1: inline text nodes in markupview only if they are short enough;r=pbro
The markup view will now inline a textnode in its container if and only if:
- the text node is the only child (pseudo elements included)
- the text node length is smaller than a predefined limit

If a container is expanded, its text nodes will now always be rendered in full,
no longer as a short version with an ellipsis. When selecting or navigating on
a textnode, the layout will no longer be modified on the fly.

MozReview-Commit-ID: HcDMqjbOesN
2016-06-02 10:41:49 +02:00
Ryan VanderMeulen
0c0394915c Backed out changeset 9cfc40ea2dbd (bug 1269226) for browser_inspector_delete-selected-node-02.js timeouts. 2016-05-26 12:53:04 -04:00
Steve Melia
c80af8ad65 Bug 1269226 - Explicitly handle node deletion in inspector breadcrumbs. r=pbro 2016-05-25 00:06:28 +01:00
moby
74e752c9cb Bug 1127572 - Fade item in the markup view when that element is hidden with "H". r=jdescottes 2016-05-25 11:12:00 -04:00
Julian Descottes
9b74db5fce Bug 1266448 - part3: use HTML tooltip for markupview image previews;r=ochameau
MozReview-Commit-ID: E45sJPVAsxj
2016-05-15 14:45:51 +02:00
Julian Descottes
c1a40a3163 Bug 1266448 - part2: markup view: use dedicated Tooltip instance for image previews;r=ochameau
In preparation for using the HTML Tooltip in the markup view, we use now
a different tooltip instance for the image previews.

MozReview-Commit-ID: EOoVg6Syntj
2016-05-18 23:36:31 +02:00
Julian Descottes
92424a7bcb Bug 1266448 - part1: fix remaining TooltipToggle callback;r=ochameau
In bug 1270462 we changed the expected return value of the hover callback
used for the toggle tooltips. All callbacks were migrated except one in
markup.js. This changeset fixes this as well as a test which was depending
on it.

MozReview-Commit-ID: 1FZmxT6gIoS
2016-05-16 18:11: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
Tom Tromey
86974842a1 Bug 1265869 - Add task.js and use in devtools. r=jryans
MozReview-Commit-ID: G5UuAh2RiZZ
2016-05-17 13:07:55 -06:00
Nicolas Chevobbe
deedc3ec29 Bug 1270215 - Ensure we display properly cased node names all across the devtools. r=jdescottes
Add a displayName property on the NodeActor, which compute from Element.prefix + Element.localName.
The computation is made by a getNodeDisplayName function which can be imported wherever needed.
Edit some tests to ensure we correctly display node names.

MozReview-Commit-ID: 6z0G3ynbMoU
2016-05-12 07:18:58 +02:00
Tom Tromey
858739706b Bug 1266826 - Turn Templater.jsm into a .js. r=jryans
MozReview-Commit-ID: 4T4YiOiU0oZ
2016-05-12 09:06:38 -06:00
Alexandre Poirot
b51a17c59e Bug 1268441 - Convert markup view key shortcuts to use the shortcut helper module. r=bgrins 2016-05-12 03:07:56 -07:00
J. Ryan Stinnett
44259f9611 Bug 1270596 - Fix devtools after ESLint 2.9.0 upgrade. r=tromey
MozReview-Commit-ID: 7LmcHCcIv1Q
2016-05-06 10:49:44 -05:00
Julian Descottes
468c098d3f Bug 1270462 - part2: tooltip toggle callback can resolve(false);r=bgrins,jsnajdr
Previously, the targetNodeCb used in TooltipToggle had an inconsistent API. If
returning synchronously, "false" would prevent the tooltip from appearing.
However, if using a promise, resolving "false" would still show the tooltip.
It was needed to reject the promise in this case to prevent the tooltip from
being displayed.

This commit makes TooltipToggle always expect a consistent return value from
this callback, whether it is synchronous, or using promises.
- true -> show the tooltip on the event target
- DOM node -> show the tooltip on the provided node
- false (or falsy value) -> do not show the tooltip

MozReview-Commit-ID: 7PIPwBJxjWO
2016-05-05 20:25:08 +02:00
Tom Tromey
3a49936872 Bug 1265876 - don't directly use Timer.jsm or timers.js in devtools; r=ochameau
MozReview-Commit-ID: HzbnNvTc5db
2016-05-04 08:02:03 -06:00
Carsten "Tomcat" Book
4efb017bcf Merge mozilla-central to fx-team 2016-05-02 11:39:08 +02:00
Aryeh Gregor
c4a3296430 Bug 1264270 - Parser should output attributes in source order, not reversed; r=hsivonen,bgrins 2016-05-01 15:15:26 +03:00
Michael Kohler
66cee776b4 Bug 1255542 - markupView.more.showAll should use a proper plural form. r=pbro, r=flod 2016-03-15 14:25:00 +01:00
Nicolas Chevobbe
1b22d1c477 Bug 820926 - Hide void-element's closing tag if the page is an HTML page. r=pbro
Though, if the element has pseudo-elements, and thus can be expanded, show
the closing tag when the void element is expanded.

MozReview-Commit-ID: 7UMMlVjYqLX
2016-04-28 01:51:46 -07:00
Carsten "Tomcat" Book
74de773d2c Backed out changeset 797e8190073f (bug 1265876) for memory leaks in browser_markup_mutation_02.js 2016-04-28 08:13:42 +02:00
Tom Tromey
323443bd29 Bug 1265876 - don't directly use Timer.jsm or timers.js in devtools; r=ochameau
MozReview-Commit-ID: HzbnNvTc5db
2016-04-21 11:20:14 -06:00
J. Ryan Stinnett
8aa03a5d4d Bug 1263258 - Require space before paren for anonymous functions. r=pbro
MozReview-Commit-ID: 2F0j45Vxn2I
2016-04-27 09:06:15 -05:00
Nicolas Chevobbe
85f25eff6d Bug 1232806 - Change mouse events' target to window in the markup view to keep track of the dragging even when the cursor is outside the window. r=jdescottes
Add some tests in the `mousemove` handler to keep the dragged node inside the markup panel.

MozReview-Commit-ID: LSlzTeJyc9D
2016-04-13 13:16:00 +02:00
Patrick Brosset
1de169539a Bug 1262491 - Focus the newly inserted node in the markup-view when clicking the add button. r=jdescottes
MozReview-Commit-ID: FOyFBXT20Du
2016-04-14 13:06:41 +02:00
Dave Townsend
4ac1a46d5e Bug 1257246: Update devtools for eslint 2. r=pbro
ESLint 2 now flags anonymous generator functions according to
generator-star-spacing. Most of the changes here are correcting that.

MozReview-Commit-ID: 9xg2Gmlaz94
2016-04-05 11:31:19 -07: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
Matteo Ferretti
1824e57a3a Bug 1139187 - Allow moving and resizing elements in content; r=pbro
MozReview-Commit-ID: EmmFBXW22dk
2016-03-17 10:59:03 -04:00
Patrick Brosset
98b14d1329 Bug 1239047 - Make comment nodes draggable in the markup-view; r=miker
MozReview-Commit-ID: 9kb8EIn2egH
2016-03-08 10:21:36 +01:00
Julian Descottes
610e6a6b39 Bug 1230325 - markup-view: skip keyboard shortcuts if any modifier;r=pbrosset
Bail out from the markup view onKeyDown handler if any modifier is currently
true. All shortcuts specified in this handler are intended to be used without
modifier, so for now this approach is fine.

Added a test checking the use case mentioned in Bug 1230325, with the S
shortcut. In order to write the test, had to create an additional method on
the test actor to be able to wait for events in the window of the content process.

MozReview-Commit-ID: 67icou0HkfA
2016-03-04 18:15:32 +01:00
Alexandre Poirot
4f9be42328 Bug 1252346 - Fixes missing Services definition or tweaked eslint to figure out where does it comes from. r=jryans 2016-03-01 14:00:28 -06: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
Patrick Brosset
865eaf0a2b Bug 1250205 - Clean remaining eslint warnings in devtools/client/inspector/markup/markup.js; r=miker
MozReview-Commit-ID: 1EOSQWWItaO
2016-02-22 19:23:28 +01:00
Nicolas Chevobbe
983520c6a5 Bug 1248381 - Inspector panel should display properly capitalized node name; r=miker
MozReview-Commit-ID: ESlN5Qp9xHj
2016-02-17 18:25:59 +01:00
Hugo Arregui
6d0d9196f0 Bug 1225063 - add option (devtools.markup.collapseAttributes) to enable/disable attribute collapsing from settings panel;r=bgrins 2016-01-25 16:02:31 -08:00
Gabriel Luong
47f2d55d6d Bug 1242278 - Eslint cleanup of Inspector markup view r=pbro 2016-01-25 15:00:04 -05:00
Brian Grinstead
d820e101f9 Bug 1240860 - Escape attribute name before passing into querySelector;r=tromey 2016-01-19 15:30:46 -08:00