Commit Graph

200 Commits

Author SHA1 Message Date
Alexandre Poirot
0b8aff48d5 Bug 1351266 - Test preview and font tooltips by faking mouse events. r=jdescottes
MozReview-Commit-ID: LdaTXmo9Eb6
2017-03-28 15:51:08 +02:00
Patrick Brosset
bb1f37bc46 Bug 1356873 - Insert inline text nodes between open and close tags; r=gl
MozReview-Commit-ID: 9bWm0EP7Wrp
2017-04-16 18:11:14 +02:00
Julian Descottes
e3ca23cf09 Bug 1355886 - fix regression when undoing delete node next to a whitespace sibling;r=pbro
MozReview-Commit-ID: GDYzsbCiQcI
2017-04-12 18:59:28 +02:00
Patrick Brosset
f5d60234ab Bug 1355064 - Build the markup-view DOM manually rather than with templater; r=jdescottes
MozReview-Commit-ID: LbULOa7UGq2
2017-04-10 14:55:58 +02:00
Alexandre Poirot
ab19f22a50 Bug 1320939 - Lazy load tooltip event helpers. r=jdescottes
MozReview-Commit-ID: 1FXSUprpCN7
2016-12-06 03:50:57 -08:00
Julian Descottes
de2fed25f3 Bug 1345529 - fix inspector DocumentWaler children() method;r=pbro
The inspector's DocumentWalker had several issues when trying to retrieve
children for a given node, especially if the starting node was filtered
out by the filter function of the walker.

If the starting node was provided by options.center or options.start
and if this starting node was filtered out by the walker's filter
then the walker would fallback to the first valid parent of this node.

eg with
parent1 > parent2 > [valid-node, invalid-node, valid-node]

When asking for the children of parent2, if the walker started on
"invalid-node", then the walker would instead use parent2 and in turn
we would retrieve the children of parent 1

To fix that we can either tell the walker wether it should fallback to a
sibling of the starting node or to a parent, or make sure that the nodes
provided to the walker are valid.

A second issue was with the utility methods _readForward and _readBackward.
They both use the next/previousSibling() methods of a walker in order to
collect all the valid siblings of the walker's current node. But they were
always including the current node of the walker in their return array. And
there is no guarantee that the walker's currentNode is actually valid for it's
filter.

eg with a walker containing [invalid-node-1, invalid-node-2, valid-node].
Let's say the walker is currently on valid-node and we call previousSibling
The walker will do 3 steps:
- this.walker.previousSibling() > returns invalid-node-2, fails filtering
- this.walker.previousSibling() > returns invalid-node-1, fails filtering
- this.walker.previousSibling() > returns null, stop looping and return null

But at this stage the internal walker still points to the last visited node
(invalid-node-1). So if _readForward/Backward blindly add the current node
of the walker, we might be returning invalid nodes.

MozReview-Commit-ID: 72Be7DP5ky6
2017-04-06 23:17:03 +02:00
Phil Ringnalda
667614e01d Backed out changeset fda9bea59c6f (bug 1345529) for timeouts in browser_markup_mutation_01.js 2017-04-10 08:18:03 -07:00
Julian Descottes
d0cbbccb43 Bug 1345529 - fix inspector DocumentWaler children() method;r=pbro
The inspector's DocumentWalker had several issues when trying to retrieve
children for a given node, especially if the starting node was filtered
out by the filter function of the walker.

If the starting node was provided by options.center or options.start
and if this starting node was filtered out by the walker's filter
then the walker would fallback to the first valid parent of this node.

eg with
parent1 > parent2 > [valid-node, invalid-node, valid-node]

When asking for the children of parent2, if the walker started on
"invalid-node", then the walker would instead use parent2 and in turn
we would retrieve the children of parent 1

To fix that we can either tell the walker wether it should fallback to a
sibling of the starting node or to a parent, or make sure that the nodes
provided to the walker are valid.

A second issue was with the utility methods _readForward and _readBackward.
They both use the next/previousSibling() methods of a walker in order to
collect all the valid siblings of the walker's current node. But they were
always including the current node of the walker in their return array. And
there is no guarantee that the walker's currentNode is actually valid for it's
filter.

eg with a walker containing [invalid-node-1, invalid-node-2, valid-node].
Let's say the walker is currently on valid-node and we call previousSibling
The walker will do 3 steps:
- this.walker.previousSibling() > returns invalid-node-2, fails filtering
- this.walker.previousSibling() > returns invalid-node-1, fails filtering
- this.walker.previousSibling() > returns null, stop looping and return null

But at this stage the internal walker still points to the last visited node
(invalid-node-1). So if _readForward/Backward blindly add the current node
of the walker, we might be returning invalid nodes.

MozReview-Commit-ID: 72Be7DP5ky6
2017-04-06 23:17:03 +02:00
Julian Descottes
9ec43d704c Bug 1344504 - do not catch click events closing the event tooltip;r=gl
MozReview-Commit-ID: 3ebzs0RwbJo
2017-03-15 18:47:27 +01:00
Julian Descottes
41c85f5c76 Bug 1344504 - handle rejected promise when showing/hiding box model in markup view;r=gl
MozReview-Commit-ID: C3aGIk1RUOU
2017-03-15 08:44:31 +01:00
Michael Brennan
a656ef7a40 Bug 1327683 - Avoid refocusing attribute if focus moved after editing. r=jdescottes 2017-03-07 23:47:58 +01:00
Florian Quèze
b15de4893d Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
Florian Quèze
c7eae86054 Bug 1344711 - script-generated patch to remove try blocks around get*Pref calls, r=jaws. 2017-03-07 15:29:48 +01:00
Tooru Fujisawa
e4497bd249 Bug 1317400 - Part 3: Fix devtools tests. r=till 2017-03-04 20:37:14 +09:00
Tooru Fujisawa
7e94637dd8 Bug 1319638 - Part 2: Change line number of a function created by Function constructor to start from 1. r=shu 2017-03-01 13:34:45 +09:00
Masatoshi Kimura
4f2e64ad3d Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg
2017-02-23 06:10:07 +09:00
Florian Quèze
26d4e63a09 Bug 1334199 - make the no-useless-parameters eslint rule report getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:01 +01:00
Florian Quèze
aac9c05258 Bug 1334250 - adapt the no-useless-removeEventListener rule to handle the listener being added and removed with the same variable + some hand fixes, r=jaws. 2017-01-27 10:47:57 +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
Geoff Brown
828ad789f9 Bug 1328915 - Skip linux32/debug devtools tests in clipboard and gpu subsuites; r=me 2017-01-16 11:58:13 -07: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
Michael Ratcliffe
3c278ae0d4 Bug 1322873 - Bug 1322873 - Add React event bubbles to the Markup View r=miker
MozReview-Commit-ID: 5uGOROUTrn2
2016-12-24 21:41:15 +00:00
Wes Kocher
b7f42ce9c4 Backed out changeset ff9a07a874fd (bug 1322873) for failing the tests it added a=backout 2016-12-23 16:00:18 -08:00
Michael Ratcliffe
26e575bbdc Bug 1322873 - Bug 1322873 - Add React event bubbles to the Markup View r=tromey
DevRel have made it clear that one of the number one complaints they hear is that we are not supporting React in our tools.

So how about we have our event bubbles include React events and allow people to go to the event listener source in the debugger?

I don't believe that any other tool does this so it is totally worth doing... and in time for Christmas as well ;)

Works just fine in development and production versions of React.

It also works in the browser toolbox so it can be used to debug events in our own tools e.g. The Debugger.

The files under devtools/client/inspector/markup/test/ are either test or React library files so they only really need a cursory glance.

This means that you should focus on the following files when reviewing:
 - devtools/client/locales/en-US/inspector.properties
 - devtools/client/shared/widgets/tooltip/EventTooltipHelper.js
 - devtools/server/actors/inspector.js
 - devtools/server/event-parsers.js

Now allowed the use of JSX in mochitests and fixed all eslint errors.

MozReview-Commit-ID: AtxhainieQe
2016-12-19 11:23:49 +00:00
Gabriel Luong
a61285b0f2 Bug 1322028 - Avoid destructuring requires where possible in the inspector. r=jdescottes 2016-12-17 12:44:56 +09:00
Julian Descottes
ab9aa9dcbe Bug 1323193 - markupview: show an ellipsis character in collapsed nodes;r=gl
MozReview-Commit-ID: 50iNPTLMK2b
2016-12-13 17:47:46 +01:00
Alexandre Poirot
c9206ab97d Bug 1323550 - Lazy load and setup HTML editor from the markup view. r=jdescottes
MozReview-Commit-ID: Cunz2hIsXaE
2016-12-14 09:52:26 -08:00
Ruturaj K. Vartak
c4ab0d7a9f Bug 1318259 - Firebug theme - Adjust UI of markup view in Inspector panel. r=ntim 2016-12-09 04:10:00 +01:00
Julian Descottes
3a4cf68bbf Bug 1321509 - use devtools-local-toolbox to load the inspector in content;r=bgrins,tromey
Add package.json to devtools/client/inspector
Integration with devtools-local-toolbox:
- provides development server
- default webpack config
- landing page to select a tab

In this patch:
- bin/dev-server-js contains the inspector specific routes
- webpack/*-sham.js : inspector dependencies that had to be mocked
  ideally, decoupling work should continue and the inspector client
  should only ever require files that require no chrome priviledged
  APIs.
- toolbox.js contains the interface with devtools-local-toolbox bootstrap
  and the inspector panel initialization
- configs/development.json is the inspector config for the devtools-local-toolbox

MozReview-Commit-ID: 7YQLUlgSyDX
2016-12-07 18:24:51 +01: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
Michael Ratcliffe
8929f73c5a Bug 1315639 - Event listener popup needs rewriting r=gerv,pbro
Changes:
  - Removed 5 lines from toolkit/content/license.html as requested by gerv.

MozReview-Commit-ID: COFNoCDVyp6
2016-11-04 17:16:50 +00:00
Alexandre Poirot
934d9a6a05 Bug 1151909 - Fix browser_markup_load_01.js race by listening for events before executing the action that trigger them. r=pbro
MozReview-Commit-ID: B7gA7CBxWam
2016-11-09 09:21:17 -08:00
Alexandre Poirot
58d04774c5 Bug 1151909 - Make the inspector actor wait for DOMContentLoaded instead of load. r=pbro
MozReview-Commit-ID: IV4v5ql8GJ9
2016-11-07 16:07:26 -08:00
Geoff Brown
376056d933 Bug 1251516 - Increase timeout for browser_markup_html_edit_01.js; r=pbro 2016-11-25 11:25:02 -07:00
Tom Schuster
9dbf6d683f Bug 755821 - Parse arguments of Function constructor properly. r=shu 2016-10-15 11:47:00 +09:00
Sebastian Hengst
0987a78eea Backed out changeset a01303a5f2be (bug 1205371) for failing devtools test browser_markup_void_elements_html.js. r=backout 2016-11-13 14:05:39 +01:00
Tim Nguyen
851f32a13b Bug 1205371 - Multi-state pseudo-class lock indicator. r=gl
MozReview-Commit-ID: L3qt5xICIUM
2016-02-26 14:09:00 +00:00
Tom Tromey
1976c3df85 Bug 1312041 - remove requireRawId rewriting in favor of Loader paths; r=jryans
MozReview-Commit-ID: 6OSszbKpp74
2016-10-25 21:30:18 -06:00
Tom Tromey
8b3e8ed91f Bug 1314047 - remove some unnecessary eslint "globals" from inspector; r=gregtatum
MozReview-Commit-ID: EUYMiF7dNKz
2016-10-27 05:34:33 -06:00
Wes Kocher
20d9f9713d Backed out 2 changesets (bug 1312041) for mass failures a=backout
Backed out changeset c4f42d7d5453 (bug 1312041)
Backed out changeset 9bfbc8480d43 (bug 1312041)
2016-11-01 10:30:45 -07:00
Tom Tromey
d1b2d82846 Bug 1312041 - remove requireRawId rewriting in favor of Loader paths; r=jryans
MozReview-Commit-ID: 6OSszbKpp74
2016-10-25 21:30:18 -06:00
Alexandre Poirot
f698f65fa8 Bug 1249119 - Prevent exception when opening inspector on a loading document. r=pbro
MozReview-Commit-ID: 9TNRUblT0SW
2016-10-19 05:26:40 -07:00
Phil Ringnalda
bd8c30d361 Merge f-t to m-c, a=merge
MozReview-Commit-ID: 2EvSTWDWg4t
2016-10-19 18:27:04 -07:00
Phil Ringnalda
770d92a74f Merge autoland to m-c, a=merge
MozReview-Commit-ID: 3nuTAHtJkkD
2016-10-19 18:25:54 -07:00
Phil Ringnalda
82387edd0e Merge m-c to m-i
MozReview-Commit-ID: Ihd0iacfcIW
2016-10-18 19:45:02 -07:00
Xue Fuqiao
d623793a35 Bug 1111599 - Shift-click while in picker mode selects the element but doesn't stop the picker; r=pbro
MozReview-Commit-ID: 2yUKBJylxF1
2016-10-18 15:50:51 +08:00
Greg Tatum
c3ca469ef1 Bug 1224304 - Handle canceling the element picker better r=gl
This changes the behavior of the element picker so that when it is
cancelled the previously selected DOM node is re-scrolled into view.
Additionally the existing behavior of the keyboard shortcuts for the
element picker was broken when the devtools toolbox was docked. The main
content area was not being focused, so the keyboard shortcuts for the
element picker were not being used. When the toolbox is detached, the
focus event is still not fired, as it's not desirable to have the
content pop into view over the devtools.

Finally there is now an additional implementation of the Escape shortcut
when the devtools are focused. The console Escape shortcut is ignored
until the element picker has been disabled making disabling the element
picker consistent irrelevant of the context.

MozReview-Commit-ID: HxENmPBoTcD
2016-10-06 13:40:53 -05:00
Mark Banner
233309fbe2 Bug 1251003 - Change .eslintrc files to .eslintrc.js to avoid obsolete config file format. r=mossop
MozReview-Commit-ID: JrbFxQ5rj6I
2016-10-18 08:38:10 +01:00