With Stylo, an import rule from a cycle _will_ have a `styleSheet` object, so we
need to also check the sheet's ancestors to see if the URL is unique.
MozReview-Commit-ID: B33REaSGGYU
--HG--
extra : rebase_source : d6113d802d5197c73510ac3fa3b6cfb31d29c609
This adds a method that can be called by the toolbox to log something to
the web console.
MozReview-Commit-ID: GpZtWwNVVGO
--HG--
extra : rebase_source : 37d2336bc1dbf5a8fd35d280c349044f1d06cd4c
This adds an `ownSymbols` and an `ownSymbolsLength` properties to the
grip `preview` property so we can retrieve them in the frontend.
This also refactors the newly introduced test for symbols and add a
function which test the content of the preview property in the grip.
The console test packet stubs files were updated to take this into account.
MozReview-Commit-ID: 7rPxFcS5uXE
--HG--
extra : rebase_source : dcd1189904b8f10ffb27df4c2290ac391a4f08ed
Click and drag markers, circle edges, and radius edges to move them.
Double click on a polygon edge to add a new point.
Double click on a polygon point to remove it.
MozReview-Commit-ID: EbPH1pVVBOT
--HG--
extra : rebase_source : 754d9f75e55f327f448d826123c0b522d0bbe7df
Stylo might be enabled by either env var or pref. Use the existing
DOMWindowUtils method to test for Stylo instead of the pref to get an accurate
value.
MozReview-Commit-ID: 8p22xCBjHjo
--HG--
extra : rebase_source : 1a5524e22be07a712838ac5a2ac0bec0cc65dfa7
If a SourceMap response header was saved on a style sheet, use it in the
style sheet actor.
MozReview-Commit-ID: GRLCdRCaP5Q
--HG--
extra : rebase_source : 6632acb69a4d1a85ea6ccf3897c0e3be7ae51edd
Stylo doesn't have a good equivalent for restyle hints to expose in markers and
the ones exposed for Gecko aren't very accurate either, so we don't want to
expose the restyle hint anymore.
At the same time, several animation restyle tests currently use the hint inside
the marker to check when animation-only restyles have happened. We can preserve
this by changing the data inside the marker to be a flag for whether the restyle
is animation only, which we know for both Gecko and Stylo.
MozReview-Commit-ID: 8L8KU8Ush7P
--HG--
extra : rebase_source : 4eef80653c1ef79ee1539d27fe6a70fbfaf441ad
Here we make updates on reflow slower (with a throttle) cause we don't
really need to update live.
We also filter all reflows that do not cause either the list of grids or
the current outline to change.
Finally, we also attach NodeActors to GridActor forms (when they are know)
in order to avoid one more round-trip to the server.
Globally, this makes performance of the grid panel far better on pages that
cause many reflows.
Note that this commit also fixes a debounce vs. throttle confusion that
existed in an inspector utils file. The throttle function there was actually
a debounce function, so it was renamed, and an actual throttle function
was added.
MozReview-Commit-ID: GeqgZR0o0E6
--HG--
extra : rebase_source : 6b9719379dcbd4479bded26014aa3742bd75208e
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.
MozReview-Commit-ID: 1buqgX1EP4P
--HG--
extra : rebase_source : 3a9ea310d3e4a8642aabbc10636c04bfe2e77070
Also convert markers to SVG path to better handle zoom
MozReview-Commit-ID: 8h9WWOLvFfG
--HG--
extra : rebase_source : 338155d2420183b17b9507b1fbedc7bda307d16b
On Skia / OS X using a large number as workaround for infinite lines makes
the canvas really slow; here I removed the hack, calculating the proper
intersection with the canvas' boundaries for the infinite lines. That should
greatly improve the performance for transformed grid.
MozReview-Commit-ID: Ae1GyxIhf3l
Used the new chrome-only API to obtain the transformation matrix of the current
node, relative to the inspected window's root element.
That also includes all the transformations from the element's ancestor; plus
the method is more robust and we can simplify the current code, removing also
some hack.
Deleted also the test for dom_matrix_2d, since one of the method was testing
now doesn't exist anymore, and the second it's just a map to native method
that has its own tests on platform.
MozReview-Commit-ID: 35rs34RSMYA
Used the new chrome-only API to obtain the transformation matrix of the current
node, relative to the inspected window's root element.
That also includes all the transformations from the element's ancestor; plus
the method is more robust and we can simplify the current code, removing also
some hack.
MozReview-Commit-ID: 35rs34RSMYA
These fixes are in preparation of making browser-chrome tests fail when there are unhandled Promise rejections.
MozReview-Commit-ID: JTMgC2XwzX2
--HG--
extra : rebase_source : 4d0b0465641b2286d01f872b0cf8052af5573939
extra : amend_source : 75dacab1ff06bcab2a05e6e744845b151f97d06c
extra : intermediate-source : 047e38fdb0c889e7e7dc0c2cd5a4e6dc6aa7fe22
extra : source : b59573695517b2a464f22e00bd3792c50dcf371a
The Grid Cell highlighting should take transformation into account
Added utility functions for a better handling of points and boundaries;
especially when a transformation is applied.
The SVG path description's points are now properly transformed.
Grid's infobars are now positioned in the same way of box model infobar, since
we pass a more accurate `bounds` object.
MozReview-Commit-ID: CNknsC0ufZj
--HG--
extra : rebase_source : 373032eacbfeacf1e6b870cbbe59be539be916b8
Currently doesn't handle zooms or transforms, or rounded corners for inset().
MozReview-Commit-ID: J9ZTjhn9Ki0
--HG--
extra : rebase_source : 62a8952fe18e1493ba9f31e85a4d9bc7d558167c
This patch applies all the changes needed to the devtools actors
and the toolbox-process-window, to be able to debug a webextension
running in an extension child process (as well as a webextension
running in the main process).
The devtools actor used to debug a webextension is splitted into
3 actors:
- the WebExtensionActor is the actor that is created when the
"root.listTabs" RDP request is received, it provides the addon
metadata (name, icon and addon id) and two RDP methods:
- reload: used to reload the addon (e.g. from the "about:debugging#addons" page)
- connectAddonDebuggingActor: which provides the actorID of the actor
that is connected to the process where the extension is running
(used by toolbox-process-window.js to connect the toolbox to the needed
devtools actors, e.g. console, inspector etc.)
- the WebExtensionParentActor is the actor that connects to the
process where the extension is running and ensures that a
WebExtensionChildActor instance is created and connected
(this actor is only the entrypoint to reach the WebExtensionChildActor,
and so it does not provide any RDP request on its own, it only connect
itself to its child counterpart and then it returns the RDP "form" of
the child actor, and the client is then connected directly to the
child actor)
- the WebExtensionChildActor is the actor that is running in the same
process of the target extension, and it provides the same requestTypes
of a tab actor.
By splitting the WebExtensionActor from the WebExtensionParentActor, we are
able to prevent the RemoteDebuggingServer to connect (and create
instances of the WebExtensionChildActor) for every addon listed by
a root.listAddons() request.
MozReview-Commit-ID: L1vxhA6xQkD
--HG--
extra : rebase_source : 7ed7735084d9351ff32ab1ad822e53dd0828dace
This patch applies all the changes needed to the devtools actors
and the toolbox-process-window, to be able to debug a webextension
running in an extension child process (as well as a webextension
running in the main process).
The devtools actor used to debug a webextension is splitted into
3 actors:
- the WebExtensionActor is the actor that is created when the
"root.listTabs" RDP request is received, it provides the addon
metadata (name, icon and addon id) and two RDP methods:
- reload: used to reload the addon (e.g. from the "about:debugging#addons" page)
- connectAddonDebuggingActor: which provides the actorID of the actor
that is connected to the process where the extension is running
(used by toolbox-process-window.js to connect the toolbox to the needed
devtools actors, e.g. console, inspector etc.)
- the WebExtensionParentActor is the actor that connects to the
process where the extension is running and ensures that a
WebExtensionChildActor instance is created and connected
(this actor is only the entrypoint to reach the WebExtensionChildActor,
and so it does not provide any RDP request on its own, it only connect
itself to its child counterpart and then it returns the RDP "form" of
the child actor, and the client is then connected directly to the
child actor)
- the WebExtensionChildActor is the actor that is running in the same
process of the target extension, and it provides the same requestTypes
of a tab actor.
By splitting the WebExtensionActor from the WebExtensionParentActor, we are
able to prevent the RemoteDebuggingServer to connect (and create
instances of the WebExtensionChildActor) for every addon listed by
a root.listAddons() request.
MozReview-Commit-ID: L1vxhA6xQkD
--HG--
extra : rebase_source : f9438b4a9842c1dd504edf2fcd87857c670f411f
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
The infobars needs to be not hidden when the `moveInfobar` function is called,
otherwise the computed style won't work as expected; therefore I switched the
functions' call related to that.
I added an optional `options` argument to the `moveInfobar` function in order
to support forced position and make the infobar hide if offscreen.
MozReview-Commit-ID: 81dxkMGt7vT
--HG--
extra : rebase_source : 5f64ea62368a85b020b4ad964e749c74fa337d9c
ActorPool.removeActor expects an actor instance, not an ID string.
MozReview-Commit-ID: 366sD7uvHbg
--HG--
extra : rebase_source : 91665450684fbfbf732f6e78c0bd6158a59301b2
Grid fragments returned by the chrome-only el.getGridFragments() API
may sometimes in fact be empty. When they are, the returned object still
looks like a fragment, but has either no rows or no columns.
So this commit simply adds a quick check on this in the css grid highlighter
before attempting to highlight a grid fragment.
MozReview-Commit-ID: GjsGu9hpU5G
--HG--
extra : rebase_source : 355073b26035ce02db11f51497c74f7746d35a77
- Fixed a bug on `getNodeBounds` that would makes the calculation wrong in case
of nested frames.
- Centralized all the transformation in `updateCurrentMatrix` function,
including the scaling due the zoom and display's pixel ratio, and the
translation to the top left corner of the node inspected.
- Added the transformation from the inspected node to the `currentMatrix`.
- Added `drawLine` and `drawRect` functions, that takes a matrix as argument.
- Position the line's number to the grid itself even when we've infinite lines
(it's not a regression, it is intended since if a grid is transformed, we
could have weird results otherwise, so we decided to uniform the behaviors).
MozReview-Commit-ID: 7OUfb6u63Qj
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
The URLs will have the following format:
wasm: [<uri-econded-filename-of-host> ":"] <64-bit-hash>
MozReview-Commit-ID: 3diYgRWhki1
--HG--
extra : rebase_source : 2603ab4dc41aad0ae4f49184d89ad912516d3d6a
Changlist:
- Added Jim Palmer's well proven natural sort algorithm.
- Added natural sort license (MIT).
- Use natural sort everywhere inside TableWidget.js wherever we use .sort()
- Changed browser_storage_overflow.js so that the test is faster and more maintainable. The test now also tests column sorting (ascending and descending).
- Use natural sort everywhere inside storage.js wherever we need to slice the array. Without natural sort here we get e.g. row-1, row-10, row-100, row-2 etc.
MozReview-Commit-ID: FUY7pcLIYml
--HG--
extra : rebase_source : 6e25cc962a7ab89aeb361e4036af90dcecd24b02
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
--HG--
extra : rebase_source : 31e7d3321abef04243b741196d4ca6279cefd53a
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
--HG--
extra : rebase_source : 6230899f57b624ad8dd374f8f9e712f430acf9df
Adds a new `getRoot` request to the root actor which lists the global actors
only (leaving out the tabs). This is a much better fit for callers who want to
access some global actor only, since it avoids visiting every tab, which could
be a very expensive operation.
MozReview-Commit-ID: 1lIAuaV7zoF
--HG--
extra : rebase_source : bf64ee1298591f26ffa4c6a660cca52145084b66
node.isConnected (see https://dom.spec.whatwg.org/#dom-node-isconnected) returns true if the node is
in the DOM tree (including in a shadowDOM tree), which can be used in the frontend to display additional
tools and information.
MozReview-Commit-ID: LjUbkc7VPcB
--HG--
extra : rebase_source : b43644cf869663412a9ed6b956093e7a41afb01f
This adds higher level protection to ignore exited browser actors, so we don't
end up triggering methods like `form` on them, since they won't make much sense
anyway.
MozReview-Commit-ID: KgUCA04N2fY
--HG--
extra : rebase_source : 4dbf0dfe0a21755796625106840209bed0f9db82
A virtual canvas is basically a canvas that seems bigger than is actually is.
The technique consists in moving a fixed sized canvas during the scrolling, when
is needed, to give the illusion that it always covers the entire document.
MozReview-Commit-ID: Hp4cUZaBdm8
--HG--
extra : rebase_source : 536891732a6247103734d60f9d8720dc2131815f
This adds a new highlighter to our collection of highlighters.
This one is a simple overlay on top of the page and a message at the
top.
It will be used by the debugger to signal to users that script execution
is paused.
In later versions, the message at the top will also contain stepping and
resuming buttons.
MozReview-Commit-ID: JNGWrVjMzkm
--HG--
extra : rebase_source : 2006068b82f808c284aebe9f1f364970bda428c5
- Added `getViewportDimensions`
- Added `getComputedStylePropertyValue` to `CanvasFrameAnonymousContentHelper`
- Refactored totally `moveInfobar` to works with both APZ enabled and new
positioned absolutely highlighters
- Updated `AutoRefreshHighlighter` for having a `scrollUpdate` method.
- Updated tests
MozReview-Commit-ID: 5m31ZzRzLXr
--HG--
extra : rebase_source : c5abac64217ee0b86413594461fb6a50d5df655e
- Added `getViewportDimensions`
- Added `getComputedStylePropertyValue` to `CanvasFrameAnonymousContentHelper`
- Refactored totally `moveInfobar` to works with both APZ enabled and new
positioned absolutely highlighters
- Updated `AutoRefreshHighlighter` for having a `scrollUpdate` method.
- Updated tests
MozReview-Commit-ID: 5m31ZzRzLXr
--HG--
extra : rebase_source : 8c599a323ff51f1e032405fae47674b695c75b86
The parent and content processes can have different temp directories
when sandboxing is enabled, so the process that creates the file for a
heap snapshot must also determine the snapshot ID.
MozReview-Commit-ID: 2UuncT54NXc
--HG--
extra : rebase_source : 350e49bf7c570abfdde457a89ee8922f8cdb8b7d