gecko-dev/devtools/shared/inspector
Nicolas Chevobbe d0f503f1f1 Bug 1733537 - [devtools] Replace usage of NodeFront#getAllSelectors with a command. r=jdescottes,devtools-backward-compat-reviewers.
`getAllSelectors` was used to retrieve a given nodeFront selector from the top
window (e.g. it would go up through documents).
This doesn't work with nodeFronts in remote frames, as we wouldn't be able to
reach for cross-process parent documents.
This patchs adds a new inspector command that computes the selector, reaching the
different documents.
All usages of `NodeFront#getAllSelectors` are switched to the new command, which
allows us to delete the method and another function that was only used there.
With the new command doing a bit more work, this highlighted some issue in our
codebase. Some consumers were relying on `selectionCssSelectors`, without waiting
for it to be updated when a new node was selected.
As a result a few tests were failing because of this.
So where it's possible and not perf critical, we simply compute the selector again.
We also emit a new event, `selection-css-selectors-updated`, so tests can wait
until it's properly set before doing further actions.

Differential Revision: https://phabricator.services.mozilla.com/D127928
2021-11-04 08:58:05 +00:00
..
css-logic.js Bug 1733537 - [devtools] Replace usage of NodeFront#getAllSelectors with a command. r=jdescottes,devtools-backward-compat-reviewers. 2021-11-04 08:58:05 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
utils.js