`Element#createChild()` and `DocumentFragment#createChild()` are heavily
used throughout our codebase, and many uses required a cast to a subtype
of `HTMLElement`. These casts was even wrong in some cases (as a result
of refactorings).
We now apply the same type definition as `document.createElement()` to
`createChild()`, which means it utilizes the `HTMLElementTagNameMap` and
will therefore also work out of the box with our proper custom elements.
Drive-by-fix: Also remove the third parameter from `createChild()`,
which was still provided for custom elements v0, which we are about to
migrate off as part of implementing the UI Engineering Vision anyways.
For now, I fixed these three uses in the codebase to explicitly go
via `document.createElement('div', {is: '...'})` instead.
Fixed: 386494205
Change-Id: I7314b99607cc6aa670390f43032b9fe625eecb83
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6127376
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Allow to pass in the `jslogContext` to avoid having to repeat the
setAttribute() calls afterwards throughout the codebase. Also remove
the unused `alternativeEvent` parameter, and move the last three
parameters into an options object to make the call sites more readable.
Drive-by-fix: Improve the visual logging instrumentation of various
panels (Issues, Application, Elements, Network, Security, Sensors,
Sources, Webauthn, Lighthouse) along the way.
Bug: chromium:1467464, b:308381586, b:308382096, b:308382451
Bug: b:308382451, b:308382291, b:308381599, b:308381997
Bug: b:308381403, b:301589099
Change-Id: I92ee95321bf48fb373ccb4cabedb96151f198083
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5185376
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
1. Remove the `NodeConnectionsPanel` singleton.
2. Remove the `ChangesView` singleton together with the unused
`DiffUILocation` and its revealer.
3. Remove the `IssuesPane` singleton and use the revealer in the
Elements panel to avoid tight coupling.
Bug: chromium:1379221
Change-Id: I3fcae6aa8c740dd3ded01d01f6855e9aec021c7e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5111179
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
This CL adds the eslint-plugin-jsdoc plugin and enables just one rule,
`jsdoc/check-alignment`, which ensures that all the lines in a comment
are correctly aligned. For example:
```
/**
* foo
* bar
*/
```
Would fail the check and be corrected to:
```
/**
* foo
* bar
*/
```
DISABLE_THIRD_PARTY_CHECK=deliberate install + use of
eslint-plugin-jsdoc node_module
Bug: none
Change-Id: I969983cd550653654a334ede3409b8c850467245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4110906
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
- Add Performance panel to node_app & js_app, and put behind experiments
How to test (this CL needs to be tested with the parent CL):
1) run `deno run --inspect-brk --allow-read --allow-net https://deno.land/std@v0.50.0/http/file_server.ts`
2) Open devtools and then click the green icon at top-right corner. Or go to chrome://inspect and click "inpect" or " Open dedicated DevTools for Node".
3) Click the three-dot menu at the top-right corner, and choose the "More tools" > "Performance"
4) Record in "Performance" tab
Bug: 1362840
Change-Id: Idac53a90016bbdd7ff1dfd093c715caf659b2c4a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3892770
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
This CL does a couple of things to preserve the current behavior:
- It folds `node_main` into `node_app`, since we no longer require that
distinction (this was only required prior where we used `autostart` for
`node_main`, which we no longer do)
- It removes as much side-effect instantiation from various modules and
moves them into `node_app.ts`. The order is a bit awkward, but the calls
at the end of `node_app.ts` is the order of side-effect calls as it
exists currently. After we cleaned up all entrypoints, we can remove
some of the calls and clean it up further, but let's keep them here
explicitly to ensure we retain existing behavior.
- Folds `node_app-meta.ts` into `node_app.ts` for simplicity
- We now roll up everything into `node_app.ts` directly, rather than
having a separate meta script. Since this is an entrypoint, we can do
that here. Since the entrypoint will always eagerly load, we don't need
an explicit difference between the meta file and the module
implementation.
R=jacktfranklin@chromium.org
Bug: 1127902
Change-Id: Ida1cee76ae04b3d590dcd16d0225f65852bce5a5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3306499
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Shell no longer has any content, so we can remove it from all
entrypoints. We still want to share the contents of the meta files and
all, so keep these in. However, since we are no longer processing the
`shell.js` file `build_release_applications`, we can now fold in
`shell-meta-files.ts` into `shell.js`.
Ideally, we also change `shell` to be TypeScript-authored, but we can
only do that after all entrypoints that import it (in their respective
`.js` files) are TypeScript. So we will have to do that last.
R=jacktfranklin@chromium.org
Bug: 1127902
Change-Id: I47239286f6f1dbff63ce69cf8ca4c78bd4761030
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3306497
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>