Commit Graph

104 Commits

Author SHA1 Message Date
Matteo Ferretti
199353dcee Bug 1359028 - added encodeURIComponent and fixed css class typo; r=pbro
The patch of bug 1353005 removed by mistake a leading dot in a css class, and
the `encodeURIComponent` calls (so the # in the color definition was considered
the hash part in the url).
Also, it appears autoland rejected the last commit from Bug 1353005, so this
patch includes those changes as well.

MozReview-Commit-ID: 2aVW3hYHhSr
2017-04-25 16:35:08 +02:00
Matteo Ferretti
e36bf2991f Bug 1353005 - removed sdk/content/mod and replaced with DOMWindowUtils calls; r=pbro pbro
MozReview-Commit-ID: 7aj8C0zYr6C
2017-04-10 21:47:39 +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
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
Rahul Chaudhary
67ebe412d6 Bug 1332090 - Added a contrast ratio component to the Color Widget. r=pbro
MozReview-Commit-ID: 9FA0h9ST62E
2017-02-20 22:27:22 -05:00
Gabriel Luong
cbd52e8456 Bug 1350894 - Check if the node is dead in getOffsetParent. r=pbro 2017-03-30 00:10:40 -04:00
Stanford Lockhart
41f2b4f7d1 Bug 1345119 - Part 3: Display offset parent of absolutely positioned node in box model. r=gl
MozReview-Commit-ID: 102vRTuIhEh
2017-03-17 23:07:06 -03:00
Stanford Lockhart
7d1eb6f350 Bug 1345119 - Part 2: Server side for retrieving offset parent of DOM node. r=pbro
MozReview-Commit-ID: I51NHlxv6Mp
2017-03-17 23:05:27 -03:00
Iris Hsiao
206cfb29fd Backed out 5 changesets (bug 1345119) dor mochitest failure in test_inspector_getOffsetParent.html
Backed out changeset c9be65ad95f6 (bug 1345119)
Backed out changeset 4e4817e5b6d4 (bug 1345119)
Backed out changeset 6a01debcc43c (bug 1345119)
Backed out changeset 2c6f67f420d0 (bug 1345119)
Backed out changeset ba020c15393d (bug 1345119)
2017-03-24 15:01:47 +08:00
Stanford Lockhart
be0a7b560b Bug 1345119 - Part 3: Display offset parent of absolutely positioned node in box model. r=gl
MozReview-Commit-ID: 102vRTuIhEh
2017-03-17 23:07:06 -03:00
Stanford Lockhart
d3b71c2a75 Bug 1345119 - Part 2: Server side for retrieving offset parent of DOM node. r=pbro
MozReview-Commit-ID: I51NHlxv6Mp
2017-03-17 23:05:27 -03:00
Sebastian Hengst
cd5e9f96fd Backed out changeset 9c1ee3920ea3 (bug 1345119) 2017-03-23 22:00:26 +01:00
Sebastian Hengst
2ba83c0a8d Backed out changeset 14ff5693848f (bug 1345119) 2017-03-23 22:00:22 +01:00
Stanford Lockhart
d3d66bdc66 Bug 1345119 - Part 3: Display offset parent of absolutely positioned node in box model. r=gl
MozReview-Commit-ID: 102vRTuIhEh
2017-03-17 23:07:06 -03:00
Stanford Lockhart
a87fb2b6a6 Bug 1345119 - Part 2: Server side for retrieving offset parent of DOM node. r=pbro
MozReview-Commit-ID: I51NHlxv6Mp
2017-03-17 23:05:27 -03:00
Florian Quèze
c8cf49999e Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Patrick Brosset
d045689e66 Bug 1323700 - Adding a copy full path option to the inspector menu; r=gl
MozReview-Commit-ID: IvRnek7e7Xq
2017-01-17 14:14:41 +01:00
Jared Wein
d082f94cb9 Bug 1323618 - Allow locking off of psuedo-classes through inIDOMUtils. r=heycam
MozReview-Commit-ID: DppYTmILpwy
2017-01-12 12:10:07 -05:00
Sebastian Hengst
2c0af86386 Backed out changeset 6c4807171f00 (bug 1323618) on jaws' request. r=backout 2017-01-12 18:45:39 +01:00
Jared Wein
4da6b820c7 Bug 1323618 - Allow locking off of psuedo-classes through inIDOMUtils. r=heycam
This patch doesn't currently work. The test fails in two test cases. Right now the styles for a 'locked-off' psuedo class are still being applied.

MozReview-Commit-ID: DppYTmILpwy
* * *
[mq]: temp

MozReview-Commit-ID: 74iIOQumfrw
2017-01-12 12:10:07 -05: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
Florian Quèze
361ec85a2e Bug 1329182 - remove trailing newURI null parameters in devtools/, r=jaws. 2017-01-09 20:27:26 +01: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
Julian Descottes
a5e7ff68ee Bug 1306937 - enable inspector eyedropper when viewing images;r=pbro
MozReview-Commit-ID: BlJPMYMQb8j
2016-11-30 14:35:28 +01: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
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
Alexandre Poirot
6c52d41429 Bug 1154645 - Simplify inspectNode implementation by passing CSS selector instead of node reference. r=pbro
MozReview-Commit-ID: 3yeDk3OniFj
2016-11-09 09:23:36 -08:00
Alexandre Poirot
b1fb773627 Bug 1154645 - Move findCssSelector from server to shared. r=pbro
MozReview-Commit-ID: DjEO1hjFSc5
2016-11-09 09:22:42 -08:00
J. Ryan Stinnett
ca28966f00 Bug 1315391 - Rename all disconnect methods to destroy in actors. r=ochameau
Ever since protocol.js was added as a way to create DevTools actors, we've had
lots of confusion about the correct way to implement actor destruction.  If your
actor's _parent_ was the legacy kind, you had to use `disconnect`.  If it was
protocol.js, you had to use `destroy`.

There is no reason for this madness, which makes reasoning about destruction
quite hard.  Here we rename `disconnect` to `destroy` so there is only one name
for every destruction path.

MozReview-Commit-ID: C1Yw9NfUUR2
2016-11-11 18:24:58 -06:00
Wes Kocher
1aa5b280a6 Merge inbound to central, a=merge 2016-11-08 13:58:20 -08:00
Gabriel Luong
1f1693d9e2 Bug 1308257 - Part 2: Implement LayoutActor and GridActor r=pbro, jryans 2016-11-08 20:51:13 +09:00
Alexandre Poirot
c22a135dc3 Bug 985517 - Remove pseudo class locks of children to prevent ending up with broken pseudo class state. r=pbro
MozReview-Commit-ID: LAh6HdKKJsk
2016-11-02 06:44:48 -07:00
Alexandre Poirot
6f918f16ac Bug 985517 - Only allow one node to be pseudo class locked per pseudo. r=pbro
MozReview-Commit-ID: HF7Thklh0bZ
2016-11-02 04:49:06 -07:00
Gabriel Luong
b8da371ddc Bug 1308257 - Part 1: Move ReflowActor to reflow.js r=pbro 2016-11-01 11:51:58 +09: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
Alexandre Poirot
a432112702 Bug 1249119 - Fix inspector startup when opening it on a loading document r=jdescottes
MozReview-Commit-ID: 5d4K6VFLTgE
2016-10-19 05:25:26 -07:00
Julian Descottes
321ebace1a Bug 1309212 - display highlighter infobar for #text nodes;r=pbro
MozReview-Commit-ID: HBaLSFyz6LR
2016-10-13 19:28:34 +02:00
Patrick Brosset
4d235c5270 Bug 1304685 - Show empty text nodes in markupview if they impact layout; r=jdescottes
When the inspector actor walks the DOM in order to find nodes to be
displayed in the inspector panel, it ignores text nodes that contain
only whitespace characters (in order to avoid cluttering the panel with
useless information).

This commit changes this logic so that whitespace text nodes are only
ignored when the node in fact has no layout at all (all text collapsed).
Inside inline formatting contexts, whitespace text nodes may have layout
and therefore push elements further apart. So seeing these nodes in the
panel actually help debugging issues.

MozReview-Commit-ID: GvNMsqsT3w6
2016-10-11 16:29:20 +02:00
Gabriel Luong
cced658201 Bug 1302496 - Refactor LayoutView to a Box Model component r=jdescottes 2016-09-13 16:35:16 -04:00
Florent Fayolle
809fef90b2 Bug 1222586 - Don't assume document to be HTML when pasting markup into the markup-view; r=pbro 2016-09-10 00:59:00 +02:00
fbdb0dae94 Bug 1295171 - Reintroduce the old Actor/FrontClass constructors. r=jryans
Heintroduce the old Actor/FrontClass constructors.
2016-08-22 16:25:57 +02:00
b0fa44c98a Bug 1288423 - Rename Actor/FrontClassWithSpec to Actor/FrontClass. r=fitzgen 2016-08-10 17:36:04 +02:00
Wes Kocher
29771f4f17 Merge fx-team to m-c a=merge 2016-08-07 00:16:15 -07:00
James Long
24266d6355 Bug 1267365 - move various flags out of DevToolsUtils and don't depend on that module so much r=tromey 2016-08-05 17:41:01 -04:00
Tom Tromey
6892a50d74 Bug 1292574 - make CSS a global rather than a module in devtools loader; r=gregtatum
MozReview-Commit-ID: 5RYwDAW4wxt
2016-08-05 08:32:59 -06:00