Commit Graph
6 Commits
Author SHA1 Message Date
Brandon Goddard 1e2c0032da CSP: remove unsafe inline
This CL removes 'unsafe-inline' from the DevTools CSP to help tighten
CSP.

Bug: 1259386
Change-Id: I996d74c1a122774fb084e45f6706169a869ee0d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3218274
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-10-13 10:53:17 +00:00
Tim van der Lippe 7b347ca16f Move entrypoints to sub-folder
All JavaScript files for each entrypoint are put in their respective
sub-folder of front-end. The HTML files load from the new location and
build_release_applications has been updated to load from the correct
location.

R=aerotwist@chromium.org

Bug: 1187573
Change-Id: I4b93f3a2127ef2d3ce7dccefe03f70e79dac1c19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2818379
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-04-12 12:04:18 +00:00
Mathias Bynens 98fec0188d Simplify and re-order entrypoint HTML document
This patch improves the <head> ordering as discussed in [1], and
applies some further simplifications (such as omitting optional tags)
in line with Google’s HTML Style Guide [2].

[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575084/1..5/front_end/entrypoint_template.html#b10
[2]: https://google.github.io/styleguide/htmlcssguide.html

Change-Id: Icda88e0e29591398d35e888c43190f9b3730dbe8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581931
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2020-12-10 10:23:38 +00:00
Mathias Bynens c3ea632dc5 Add <title> to entrypoint HTML document
Although InspectorFrontendHostAPI dynamically updates document.title on
inspectedURLChanged, per the discussion on the bug screen readers
also benefit from there being a <title> right from the start.

Also-By: Dominic Mazzoni <dmazzoni@chromium.org>
Bug: chromium:864768
Change-Id: I907f0950250378ce951d9c2d2dcb9d0342df4e02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575084
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
2020-12-09 18:52:37 +00:00
Tim van der Lippe 3387bd4064 Move startup files to GN
There previously were two special files that were handled
by `build_release_applications`: root.js and RuntimeInstantiator.js.
Both files are explicitly part of the startup process of DevTools
and its various entrypoints.

To remove the copying from `build_release_applications`, we have
to move these to the relevant `devtools_entrypoint`. Since a
`devtools_entrypoints` bundles all subdirectories, we can't keep
these files in `front_end/` directly. Instead, we move these files
to `startup/` to denote their special-casing in the startup process.

Next to that, we have to fix all usages of these files in the entrypoints.
For all JavaScript entrypoint files, all side-effect legacy files
that are loaded by `startup.js` (previously known as `root.js` and renamed
to prevent confusion with the `root/` module) are removed. All
"additional" legacy files that a particular entrypoint requires are
still loaded as-is.

The RuntimeInstantiator is moved to become an implementation detail
of `startup/`. Therefore, all of the usages that were previously
importing from `RuntimeInstantiator` now import via `startup.js`.

In the end, the special-casing of these files are removed and renamed
for clarity. In the future, we want to remove the complicated
entrypoints startup process, but we are not ready for that yet.
That will require additional cleanups with `resources` in `module.json`
before that change can happen.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I198d5a62d2aab70f842c68d9b4c0871fde1587a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2485072
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-20 12:55:34 +00:00
Tim van der Lippe 96e056291f Generate HTML entrypoints dynamically
This removes the duplication of the multiple HTML entrypoint files
that were defined. It makes sure that all entrypoints honor the
dark mode styling, as well as the proper no-referrer (there were
some files that had these fixes missing).

R=aerotwist@chromium.org

Change-Id: If5022e46c69050d8a7fd3ea695a644d42f4d822c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2410227
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-09-15 11:23:52 +00:00