Commit Graph
26 Commits
Author SHA1 Message Date
Tim van der Lippe e7446350b3 Remove diff/module.json
R=andoli@chromium.org

Bug: 1127902
Change-Id: Icc937903dd2e4fdab76451b86e1d5b5be2014de8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2686665
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-15 16:57:50 +00:00
Tim van der Lippe 4d072bbb6d Remove workspace/module.json
R=andoli@chromium.org

Bug: 1127902
Change-Id: I579833ff45462768b69ad9f3fa151f74385bb176
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2686661
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2021-02-10 14:05:40 +00:00
Tim van der Lippe 5511047da1 Fix changes computation for inspector-stylesheet
The inspector-stylesheet is a special virtual file that is used
to keep track of any new CSS rules, which can be added by clicking
the "New Style Rule" button in the Elements panel. However, the
changes computation broke and was no longer showing any changes
to this file.

The most likely culprit is https://crrev.com/c/2378070 which changed
the way errors were handled. The TLDR is that the `baseline` became
an empty string, which is falsy. Hence, the diff computation bailed
and was not showing any diffs.

Instead, we should be explicitly checking of the `baseline` is `null`,
since it is legal to perform a diff computation between an empty
string and a larger string.

R=szuend@chromium.org

Fixed: 1152507
Change-Id: I1aa778e7922586a4381cbc1e1e6e543a5ccffdd9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610964
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-11 12:57:37 +00:00
Tim van der Lippe 7dcef88d8b Remove skip_compilation from module.json files
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I4c4fd280adb4f5f7b327239d08d80b2cb98b203b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560248
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-25 13:19:08 +00:00
Tim van der Lippe bf74593eff Use TypeScript-authored files in workspace_diff/
R=aerotwist@chromium.org

Bug: 1011811
Change-Id: I357d50bee15fd6d8c94f48ffb69e2e4e51b6d9b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2547283
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-18 17:29:42 +00:00
Tim van der Lippe 46e1bcace9 Remove pre_generates_legacy from module.json files
This was a temporary flag used during the build_release_applications
to GN migration.

R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I8a772bcc4bee31dbd3270bf7ef62d8c97941024a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2484716
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-19 16:12:09 +00:00
Tim van der Lippe 42fbb0aca2 Move legacy files from model modules to GN
R=aerotwist@chromium.org

Bug: 1131500
Change-Id: I28b598c770801947eace05164e5308c621f5407a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2476334
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-10-16 10:58:47 +00:00
Tim van der Lippe cac65d4fa0 Remove skip_rollup
This was a temporary flag as part of the devtools_entrypoint migration.
Since that migration has concluded, we can now remove all references
to it and clean up `build_release_applications.py`.

R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1101738
Change-Id: I3ef9ec1a99bc9fc1758532124db22b3b4b1a5e2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391140
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-09-08 15:44:09 +00:00
Tim van der Lippe 19a45dfd55 Remove is_legacy_javascript_entrypoint
This removes the now-obsolete is_legacy_javascript_entrypoint build flag,
which was used as part of the devtools_entrypoint migration.

This uncovered that accessibility was still using devtools_pre_built
and a file was missing from the GRD variable.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Fixed: 1101738
Change-Id: Ie1556ccc1d1563c855417de18e896308de0cfe19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2356305
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-08-28 12:32:29 +00:00
Tim van der Lippe 303aeedfcb Typecheck workspace_diff/WorkspaceDiff.js with TypeScript
R=szuend@chromium.org

Bug: 1011811
Change-Id: Ic1d7e7f186c19f40aff9230f177b6b4232342547
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2378070
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-08-27 10:57:45 +00:00
Tim van der Lippe a76954fdb8 [globals] self.Persistence.networkPersistenceManager
R=szuend@chromium.org

Bug: 1058320
Change-Id: I3f55aea88781fd20f429d44a3551122702e4d501
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2376823
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-08-27 10:52:55 +00:00
Jan Scheffler 702bd2a494 Migrate front_end/workspace_diff to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: I0dbfad1c60285231174abd1569b32577fda89f05
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2318229
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-07-27 10:31:07 +00:00
Tim van der Lippe 37512b0d25 Remove empty script arrays from module.json files
If the module uses `modules` to load the JavaScript files, then
we can remove the `scripts` array altogether. Note that there
are still some modules left that use `scripts`, most notably
the `lighthouse_worker`, which is a remote module.

R=aerotwist@chromium.org

Bug: 1105476
Change-Id: Ie303e9835f5ce6d42ccae7b3a305d8f3df1af84c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2302597
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-17 10:05:33 +00:00
Mathias Bynens 5e43b27e8b Reformat module.json files
This patch makes it so that all module.json files use the same
consistent indentation that matches .editorconfig and the rest
of the codebase. At the request of reviewers, one such file
(front_end/emulated_devices/module.json) has been excluded
from this patch. It will be reformatted in a separate CL.

Note that this patch does not “roll CodeMirror”, although a
pre-commit hook forces me to include that phrase in the commit
message because the module.json file in the relevant folder is
modified.

Bug: chromium:1070492
Change-Id: Ib31ed5232461e2f80bf05f31105fc919f6639b0a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2127007
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-04-14 05:35:23 +00:00
Paul Lewis 7cbdcaef5c [global] Remaps self.Workspace.workspace
Moves self.Workspace.workspace to an instance() method.

Bug: 1058320
Change-Id: I56f31b8bbba2db09ae25349516dba013ed807642
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2109760
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-03-19 11:12:32 +00:00
Tim van der Lippe c02a97ca2c Fix imports for Common.Event typedef
All references now use the fully qualified
"Common.EventTarget.EventTargetEvent". It renames it to
"EventTargetEvent" to prevent a name-clash with the native "Event" type.

Bug: 1006759
Change-Id: I13fcdfd613041da146d741a0d1f785bfc905a7a8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056481
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Tim van der Lippe b6b755afe6 Migrate workspace_diff/ to import cross-module
Bug: 1006759
Change-Id: I5748b59b045ba9fc15287743ae0a74dbc2d1f917
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019864
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-03 11:04:58 +00:00
Paul Lewis 0935d19af6 [Global] Update refs to Persistence.networkPersistenceManager
Bug: 1006759
Change-Id: I224746bc17dde8443f434f1baec96963f4a7e0a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019547
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 16:26:35 +00:00
Paul Lewis 10e83a9276 [Global] Update refs to Workspace.workspace
Bug: 1006759
Change-Id: Ic3d797a12e9c00b3b428e68bfd5be4b99a0d606c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016756
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-23 14:33:20 +00:00
Tim van der Lippe 5b259e2063 Migrate workspace_diff/ to ESM internally
Bug: 1006759
Change-Id: I7d117fc113a779efb554e53716fa689085cbfc48
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002603
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-16 13:54:17 +00:00
Tim van der Lippe f7d32ea99b Migrate workspace_diff/ to ESM
Bug:1006759
Change-Id: I48a6539e9a96ef069425d1e4498d49591073fe72
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928926
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-22 10:33:52 +00:00
Tim van der Lippe 20b29c2646 Enforce newlines at end of files
Trying to upload a CL with missing newlines at the end of files fails with the following warning:

These files should end in one (and only one) newline character:

Update the ESLint config to let the linter fix these errors.

Change-Id: Ia858b5864a1dc43144e0c6d81dedbf46376c2b8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1897679
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-11-04 15:02:44 +00:00
Rob Paveza 2eb8c14505 DevTools: Display error when source file can't load
The source editor, when it cannot load a particular file, will simply
display a blank file instead. At the bottom, this is because the APIs
used to load the files do not have a way to propagate an error up to
the call site. Rather, the callback either is never called, or is
called with just an empty string.

This refactor changes the way the project system loads file contents
by replacing the callback model with a Promise-based model. However,
in this version, rather than propagating an error (handled via
catch), the error is exposed as a property on the object passed via
the the load functions. Although it might be preferable to use
async throw/catch, because there are ~4-5 layers of redirection
through the project system, the added complexity seems to not really
justify that work. I'm open to reconsidering this design, though.

Attempting to load a file via file:// which does not exist previously
produced no error because the DevToolsUIBindings handler would just
always resolve with no content and HTTP status 200. I had previously
addressed that bug in this changeset, but I've split it out to
https://chromium-review.googlesource.com/c/chromium/src/+/1847833 .

Sample "after" screenshot: https://imgur.com/a/tlm90sg

Bug: 961940
Bug: 941035

Change-Id: If121611090e9c35eeb1de162b59f8a9f72f696d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1817677
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Commit-Queue: Lorne Mitchell <lomitch@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#705438}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 61ec2a233d9a7bf4bb4b3e610de6fc233ae0d46e
2019-10-13 18:02:38 +00:00
Tim van der Lippe 1d6e57a0e3 Always add braces to single-line if-statements
The Chromium/Google style guides does not enforce curly braces for
single-line if-statements, but does strongly recommend doing so. Adding
braces will improve code readability, by visually separating code
blocks. This will also prevent issues where accidental additions are
pushed to the "else"-clause instead of in the if-block.

This CL also updates the presubmit `eslint` to run the fix with the
correct configuration. It will now fix all issues it can fix.

Change-Id: I4b616f21a99393f168dec743c0bcbdc7f5db04a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1821526
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jeff Fisher <jeffish@microsoft.com>
Cr-Original-Commit-Position: refs/heads/master@{#701070}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e0bdbe2d7f9fc2386bfaefda3cc29c66ccc18f9
2019-09-30 11:55:34 +00:00
Joel Einbinder 4566e31350 DevTools: Right click-> Local Modifications.. to show in ChangesView
Change-Id: Ic9b10334114f075a5222248b2a00a2b6d2ce0f98
Reviewed-on: https://chromium-review.googlesource.com/1036604
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#557029}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3e3b359ce731b9974a76a1bd4ca0b30591d1d8be
2018-05-09 00:42:17 +00:00
Blink Reformat 4c46d0969f The Great Blink mv for source files, part 2.
Move and rename files.

NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
Bug: 768828
TBR=darin@chromium.org
NOTRY=true

Change-Id: I66d3b155808bc5bdbf237b80208e1e552bcf7f28
Reviewed-on: https://chromium-review.googlesource.com/1001153
Reviewed-by: Blink Reformat <blink-reformat@chromium.org>
Commit-Queue: Blink Reformat <blink-reformat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#549061}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
2018-04-07 15:32:37 +00:00