Mostly mechanical change, with some extra work where non-literal names are provided.
Also, when this is the only profiler call in a file, `#include "GeckoProfiler.h"` can be changed to `#include "mozilla/ProfilerMarkers.h"`.
Differential Revision: https://phabricator.services.mozilla.com/D89415
Ideally, the error message would be outside of the wrapping label element, which would avoid inclusion of the value in the label.
However, I didn't want to potentially mess with the visual presentation, especially given the tight timeline.
Differential Revision: https://phabricator.services.mozilla.com/D89547
The files are copied verbatim from upstream autoconf 2.13 (but only the
files we need) and old.configure is adapted to use the vendored version.
Differential Revision: https://phabricator.services.mozilla.com/D89554
I would redirect Glean-sent pings instead of suppressing them, but network
errors seem to be causing unrelated failures in
toolkit/mozapps/extensions/test/browser/browser_html_discover_view_clientid.js
Differential Revision: https://phabricator.services.mozilla.com/D88980
Some fog control APIs want to be able to not explode if the Global Glean isn't
available yet. Let's make that possible.
Differential Revision: https://phabricator.services.mozilla.com/D87279
This makes FOG self-contained and no longer reliant on Telemetry for init.
We may need to adjust the timeout of the startup idle task to init earlier,
or adjust the pre-init buffer to allow us to init later.
For now of course all of this is moot because no one's using this for anything.
Differential Revision: https://phabricator.services.mozilla.com/D87276
Depends on D85863
Follow-up for code review https://phabricator.services.mozilla.com/D81526#inline-471516
Renaming existing events emitted on behalf of `CssTransformHighlighter` to avoid conflict and confusion with the generic show/hide highlighter events introduced in HighlightersOverlay. When migrating the CssTransformHighlighter to the Fission-ready highlighters approach, these event names will go away completely.
Differential Revision: https://phabricator.services.mozilla.com/D89570
Depends on D85859
The Box Model diagram in the Layout sidebar panel of the Inspector shows a Box Model Highlighter on hover over its components parts: margin, border, padding, content.
This patch routes the calls to the highlighter to use the approach introduced in `HighlightersOverlay` in D81526
Differential Revision: https://phabricator.services.mozilla.com/D85860
Depends on D85858
The Markup view uses the highlighter in a few places:
- while hovering over nodes in the node tree
- while hovering over nodes in the breadcrumbs view under the node tree
- after clicking a node from the node tree, a highlighter is shown, then it is automatically hidden after a delay
This patch routes all calls to show and hide the highlighter to the newly implemented approach in `HighlightersOverlay` which ensures hiding existing instances before showing others regardless of target.
A slight change is made in `HighlightersOverlay` to allow passing in an option to automatically hide the highlighter after a delay. This removes the need for discrete handling of timers within the markup view (removes [_brieflyShowBoxModel](https://searchfox.org/mozilla-central/source/devtools/client/inspector/markup/markup.js#742-756)) and enables reusing this mechanism with the Node Picker after picking (see `onPickerPicked` in [this diff](https://phabricator.services.mozilla.com/D81528?vs=321451&id=332813#toc) from D81528)
`HighlightersOverlay.showHighlighterTypeForNode()` no longer skips duplicate calls with the same highlighter type and nodeFront if the options provided are different between calls. This supports scheduling autohide on an already visible highlighter. Use case: in the node tree, hover over a node (shows highlighter), then click on the node (shows highlighter again, but schedules autohide after a delay)
NOTE: This automatic hiding after a delay can cause intermittent test failures. Slow running tests can find themselves without a highlighter midway through the checks. To mitigate this, while testing, highlighters are not automatically hidden. See `HIGHLIGHTER_AUTOHIDE_TIMER` in [this diff](https://phabricator.services.mozilla.com/D81528?vs=321451&id=332813#toc) from D81528. Tests which explicitly check the autohide behavior can reinstate `inspector.HIGHLIGHTER_AUTOHIDE_TIMER`.
Tests are updated to invoke actual highlighters and listen to their events. No more mocking.
Differential Revision: https://phabricator.services.mozilla.com/D85859
Depends on D81526
This patch updates tests pertaining only to node picker behavior. Run one-by-one, they're all expected to pass.
However, running the whole Inspector test suite at this point in the commit series will fail some other tests because:
- we're updating shared test helpers here without also updating the other tests;
- there is inter-dependence in the other tests between node picker and markup view which is being migrated to the new highlighters approach in D81530
The rest of the tests are getting updated in the subsequent patches in this commit series.
Differential Revision: https://phabricator.services.mozilla.com/D81528
Depends on D81525
Introduced a centralized way in `HighlightersOverlay` to invoke highlighters by type, automatically managing previously active highlighters.
First some context.
`HighlightersOverlay` is a bit of a misnomer. It already does a few things:
- provides methods to manually invoke some highlighters (Flex/Grid/Shapes/BoxModel)
- provides a way to delegate mouse events from Rules view / Computed view / Markup and invoke highlighters based on the event's target node
- manages state of Flex/Grid highlighters to be able to restore them on page refresh
- exposes the node that is highlighted by a particular highlighter
- misc handlers for events that require hiding highlighters by type (ex mutation events)
The changes in this patch add the core functionality which will automatically manage the visibility of highlighters regardless of their node's host frame:
- `this._activeHighlighters` is a Map which maps a highlighter type to the currently visible highlighter instance and its corresponding `NodeFront`
- `showHighlighterTypeForNode(type, nodeFront, options)` invokes a highlighter type for a given `NodeFront` while toggling off any existing highlighter for that type. For situations where multiple highlighters of the same type can be visible at the same time (ex: Grid), this is where we could manage their visibility.
- `hideHighlighterType(type)` hides all highlighters of a given type; can be followed-up with a more specific `hideHighlighterTypeForNode()` when needed
- `getNodeForActiveHighlighter(type)` returns the `NodeFront` currently highlighted by a highlighter type. This is an abstracted replacement for `flexboxHighlighterShown`, `geometryEditorHighlighterShown`, etc.
##### Accommodation for tests
To mitigate the fact that many tests and some consumers expect [exact event names](https://searchfox.org/mozilla-central/search?path=&q=-highlighter-shown) to be fired, like "box-model-highlighter-shown", instead of generic shown/hidden events with the highlighter type property as event data, we introduce a temporary map, `HIGHLIGHTER_EVENTS`, from which we pick the event to fire according to the highlighter type. As we progress in refactoring, the intent is for this map to slowly go away.
##### Intent for refactoring
The intent is for all client-side consumers to invoke highlighters via these methods. For example:
```
this.inspector.highlighters.showHighlighterTypeForNode(
"BoxModelHighlighter",
nodeFront
)
```
See another example of this in the migration of `FlexboxHighligther` in D79694.
##### Future plans
In the medium-term, it's likely we'll move this part of `HighligthersOverlay` from inspector to toolbox and rename it `HighlightersManager`. This way, other consumers, like Debugger and Console can also use it [instead of the existing approach](https://searchfox.org/mozilla-central/rev/027893497316897b8f292bde48dbb6da2391a331/devtools/client/framework/toolbox.js#3503-3557). Haven't attempted this yet. Pending updates to the Flexbox, Grid, Shapes and CSS Transform highlighters so when we migrate paths from `inspector.highlighters` to ⭐️ `toolbox.highlighters` is done in one go for all tests and consumers.
Differential Revision: https://phabricator.services.mozilla.com/D81526