Toolbox's Selection instance listens for `mutations` walkerFront event in order to detect if the selected node
was removed from the DOM tree, and in such case, emits a `detached-front` event that can be consumed by
the markup view.
But, when an iframe gets removed and EFT (or Fission for a remote iframe) is enabled we don't get the `mutations` event.
To fix this, we add a `onTargetDestroyed` method to `Selection`, that we call from the toolbox.
This fixes the browser_inspector_delete-selected-node-* tests when EFT is enabled.
Differential Revision: https://phabricator.services.mozilla.com/D127224
`waitForFrameLoad` was waiting for the `DOMContentLoaded` if the document `readyState`
wasn't "complete".
But `readyState` can be "interactive", which means `DOMContentLoaded` was already
emitted. In such case, `waitForFrameLoad` would wait forever.
This would cause blank markup view in the inspector panel if a node was selected
in an iframe and the page would be passed the "loading" `readyState`, but still
in the "interactive" phase.
The fix is simple: only wait for `DOMContentLoaded` if `readyState` is "loading".
The existing test we have for checking selecting node in iframe and reloading
is modified; we include a slow loading image in the iframe, which will make it
stay in the "interactive" state a bit longer.
Without the fix, the test was failing nicely, highlighting the issue.
Differential Revision: https://phabricator.services.mozilla.com/D127282
We take this opportunity to refactor the `_authenticate` method.
Since it's already an async function, we don't have to explicitely return
Promise objects.
Differential Revision: https://phabricator.services.mozilla.com/D127283
The top-level target walker was used to find elements, where we should use the
walker front of the nodeFront we have at hand.
The function was also checking if the node we're searching was associated with
this walker, which, with EFT, won't be the case as soon as we have to go through
an iframe.
Differential Revision: https://phabricator.services.mozilla.com/D126909
With EFT, tests using the eyedropper were failing because of the isXul check
done when the eyedropper gets hidden: the document.documentElement property
was null at this point and the isXul method was throwing.
This patch replace the isXul check with a check on the presence of an abortController
property, which we do now set in the `show` method.
Differential Revision: https://phabricator.services.mozilla.com/D126808
`isRemoteFrame` was used as a way to know if an iframe was tracked by its own target.
Since we can now have dedicated targets for every iframe, we need to check if a given
iframe is tracked by its dedicated target.
Differential Revision: https://phabricator.services.mozilla.com/D126805
This removes the componentDidCatch in the PriamryPanes Component which swallows errors
of its child components.
As we have the AppErrorBoundary Component now, all debbuger errors show bubble all the way up.
Differential Revision: https://phabricator.services.mozilla.com/D127247
The top-level target walker was used to find elements, where we should use the
walker front of the nodeFront we have at hand.
The function was also checking if the node we're searching was associated with
this walker, which, with EFT, won't be the case as soon as we have to go through
an iframe.
Differential Revision: https://phabricator.services.mozilla.com/D126909
With EFT, tests using the eyedropper were failing because of the isXul check
done when the eyedropper gets hidden: the document.documentElement property
was null at this point and the isXul method was throwing.
This patch replace the isXul check with a check on the presence of an abortController
property, which we do now set in the `show` method.
Differential Revision: https://phabricator.services.mozilla.com/D126808
`isRemoteFrame` was used as a way to know if an iframe was tracked by its own target.
Since we can now have dedicated targets for every iframe, we need to check if a given
iframe is tracked by its dedicated target.
Differential Revision: https://phabricator.services.mozilla.com/D126805
This patch adds the animation-timeline longhand property. For
shorthand, we will do that in the next patch.
This patch includes the aut-generated code in
devtools/shared/css/generated/properties-db.js, by `./mach devtools-css-db`.
Note:
1. we will use this property in Bug 1676791. For now, only make sure
we parse it and serialize it correctly.
2. The syntax of animation-timeline may be updated, based on the spec
issue: https://github.com/w3c/csswg-drafts/issues/6674.
However, it's not a big problem to update it later, so we still can
prototype this property based on the current version of spec.
Differential Revision: https://phabricator.services.mozilla.com/D126450
The associated plugin is added to the babel config (and different locations where
we're using babel parsing).
The existing class for the getSymbols jest test is modified to include a few of
the latest class syntax (public and private properties, static block, ...).
Differential Revision: https://phabricator.services.mozilla.com/D126771
In order to include the class statick block plugin, babel-core needs to be updated.
And as babel-core is updated, other packages relying on it also need to be updated.
One of them is jest, which requires a few changes in the test setting + a workaround
for CodeMirror test.
A few snapshots are updated as some methods changed their return values.
Finally, we're forcing the workerjs babel core dependency so it doesn't use a different
version. We should probably either update the dependency on jlast's repo, or directly
put the workerjs in tree, but we can do that on a dedicated bug.
Differential Revision: https://phabricator.services.mozilla.com/D126770
The change in the NodeFront caused one test to fail. Switching getLongString function
to an async function fixes the test (and makes it easier to read).
Depends on D127077
Differential Revision: https://phabricator.services.mozilla.com/D127078