Commit Graph
44 Commits
Author SHA1 Message Date
Wolfgang Beyer 8d9bfd8c98 Prevent visual duplication when assigning file name with special chars
This fixes the character encoding of the UrlString returned by
`urlsFromParentUrlAndName()`, which is called by `WorkspaceImpl`'s
`renameUISourceCode()`, to match the encoding of filenames as they are
received via `fileSystemFilesChangedAddedRemoved()` from the backend.

Without a matching encoding, the UISourceCode will not be found when
looking it up by URL, which in turn leads to the creation of an
additional duplicate UISourceCode.

Fixed: 1320717
Change-Id: I39a6bda366da3ee681a77f28bb1ad3bcccc86fa5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613869
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-05-05 10:08:31 +00:00
Kim-Anh Tran f58a83ed9c Reland "Enable synchronization on instrumentation breakpoints"
This is a reland of commit 1b596f3b4b.

Changes:
1. Gated behind an experiment
2. Removed changes that are currently not used since it's gated
   (i.e. test changes)

Original change's description:
> Enable synchronization on instrumentation breakpoints
>
> This CL introduces the synchronization point for setting
> breakpoints on new scripts using instrumentation breakpoints.
>
> Instrumentation breakpoints will trigger at the first statement
> of a newly run script. Afterwards we wait for all resources
> that we need to set a breakpoint (if one is cached for that
> particular script), set it, and resume.
>
> Note: this will not correctly synchronize the case where we
> just opened DevTools or just created a new target, as at this
> point some scripts might have started running. For this, we
> need to synchronize the Debugger.enable call, which is something
> that is left to take care of.
>
> Bug: chromium:1229541, chromium:1133307, chromium:1300509
> Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I19553ddac9530fa3ccac6b245a3dd89da88c6d51
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3542248
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-04-21 07:43:46 +00:00
Danil Somsikov 83ee912f56 Unit tests for the changes to StylesSidebarPane and WorkspaceDiff.ts from crrev.com/c/3466037
Bug: 1268754
Change-Id: I63a55c4edcf4670888425cbba4d443c5a8241eef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3560418
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-03-30 12:05:29 +00:00
Kateryna Prokopenko 684d26dccd Type all path and URL variables in models/persistence to Branded Types
Bug: 1299776
Change-Id: I7fa3cc202a2d230e6fbde6c0472ab6750012fa49
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3542251
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-28 12:00:19 +00:00
Danil Somsikov e4e83a5a1b A unit test for the change to BreakpointManager from crrev.com/c/3361035
Bug: 1229541, 1133307
Change-Id: I92dc9732912e83aa53f8ff93e241c2910eb16525
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3553100
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-03-25 21:08:43 +00:00
Kateryna Prokopenko c64378bc34 Type path and URL vars in ContentProviderBasedProject to Branded Types
Return type of fullDisplayName cannot be set to Branded Type as it depends on the type of uiSourceCode.nameInternal, which can be any of Branded Types

Bug: 1299775
Change-Id: I84ce9b3a5535c6614b4d3486a6af7b979aa19da3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484208
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-22 16:20:40 +00:00
Kateryna Prokopenko 639a9de9d1 Type all URL and path variables in UISourceCode to Branded Types
Bug: 1299780
Change-Id: I133ae77524d058cddcecb220fec1f7bd52116183
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484202
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-22 11:27:28 +00:00
Kateryna Prokopenko 2a1b3a93b0 Type all path and URL variables in WorkspaceImpl to Branded Types
Bug: 1299780
Change-Id: I1dffe6edc834cf5914d48c4e331510b1866f78b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484200
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-22 10:45:29 +00:00
Kateryna Prokopenko 380fdfac97 Type all URL and path variables in FileManager to Branded Types
Bug: 1299780
Change-Id: I65c083c166ea4e57938f14e4d9ff3b96b2c03083
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484197
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-16 17:26:57 +00:00
Kateryna Prokopenko ac21da4db6 Type path in createFile as EncodedPathString
Bug: 1253323
Change-Id: Icc520f383e032a8a6be8cbaffded2d2896ac4d37
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470238
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-14 13:04:15 +00:00
Kateryna Prokopenko 43b58939ab Remove casts to EncodedPathString from ScriptSnippetFileSystem
Bug: 1299786
Change-Id: I8b874211d44bc203391819a4653447a67b8c2fe1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470236
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-03-14 09:33:46 +00:00
Kim-Anh Tran bbb5232d14 Revert "Enable synchronization on instrumentation breakpoints"
This reverts commit 1b596f3b4b.

Reason for revert: closed the tree, more blink tests to adapt

Original change's description:
> Enable synchronization on instrumentation breakpoints
>
> This CL introduces the synchronization point for setting
> breakpoints on new scripts using instrumentation breakpoints.
>
> Instrumentation breakpoints will trigger at the first statement
> of a newly run script. Afterwards we wait for all resources
> that we need to set a breakpoint (if one is cached for that
> particular script), set it, and resume.
>
> Note: this will not correctly synchronize the case where we
> just opened DevTools or just created a new target, as at this
> point some scripts might have started running. For this, we
> need to synchronize the Debugger.enable call, which is something
> that is left to take care of.
>
> Bug: chromium:1229541, chromium:1133307, chromium:1300509
> Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I9eccdf065820854746ec7ad4643362859c9960e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3506653
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Owners-Override: Kim-Anh Tran <kimanh@chromium.org>
2022-03-08 13:45:41 +00:00
Kim-Anh Tran 1b596f3b4b Enable synchronization on instrumentation breakpoints
This CL introduces the synchronization point for setting
breakpoints on new scripts using instrumentation breakpoints.

Instrumentation breakpoints will trigger at the first statement
of a newly run script. Afterwards we wait for all resources
that we need to set a breakpoint (if one is cached for that
particular script), set it, and resume.

Note: this will not correctly synchronize the case where we
just opened DevTools or just created a new target, as at this
point some scripts might have started running. For this, we
need to synchronize the Debugger.enable call, which is something
that is left to take care of.

Bug: chromium:1229541, chromium:1133307, chromium:1300509
Change-Id: I44e9b053a7cf64cc1f477a68ce9389cd92a1d05d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3470237
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-03-08 12:08:41 +00:00
Wolfgang Beyer 27a5b849e1 Improve handling of file name changes for local overrides
One can change the file type of a file in the local overrides folder by
renaming the file. Such a rename can cause a different viewer to be
more appropriate for handling this file (e.g. when renaming a html-file
into a jpg, the file should now be handled by an image viewer). This CL
makes sure that in this scenario, the existing editor tab is closed and
a new one with an editor of the correct type is opened.

Unsaved changes in the file are not lost and it is ensured that there
is no unnecessary dialog popping up with a warning about external
changes to the file.

Bug: 1297532
Change-Id: I95098e15455c2ca328be00515941fe0950e5e3e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3468521
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-02-22 12:20:26 +00:00
Kateryna Prokopenko 9d068e57a8 Remove some casts to UrlString and move some up the call stack
Bug: 1253323
Change-Id: Idb5150deabffe26a8c21987a55206729b3781655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3423898
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-02-16 09:08:28 +00:00
Jaroslav Sevcik 0ee4cd1f42 Move scope names resolver to models
The patch makes the resolver usable by the console.
There should be no functional changes.

Bug: chromium:1297047
Change-Id: I020375c4c5587d1053a801dbf1b9c6a850e367aa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3461555
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-02-15 21:40:01 +00:00
Kateryna Prokopenko 89b6f6d75e Remove cast to UrlString from WorkspaceImpl
Bug: 1253323
Change-Id: Iba59eb081e5fa87e4aec315fc62dbcc995a7df91
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3420335
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-02-15 15:05:48 +00:00
Kateryna Prokopenko 3aba969ba6 Add .js extension to snippets url when handling Save as
Bug: 1137218
Change-Id: Ie9eebf8fbf7d1e96a43d3e41a345bec78dd127cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3418501
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-02-15 09:19:49 +00:00
Kateryna Prokopenko 3671fa6556 Fix path encodings
Bug: 1253323
Change-Id: Iefa0517bb39d2f000f5abf1f184887325702c52a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3344916
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-02-14 08:10:56 +00:00
Simon Zünd 72eb091458 [cleanup] Turn 'Project' into a true interface
This CL changes 'Project' from an abstract class into an interface
and makes 'ProjectStore' an abstract base class instead. This removes
the awkward usage of an abstract class in an "implements" clause as
well as the awkward cast of 'this' to 'Project' inside 'ProjectStore'.

R=kimanh@chromium.org

Bug: 1290254
Change-Id: I9a2617557dc02743f4fe0c5c965dc9ea6bf7e675
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3423904
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-01-31 15:00:39 +00:00
Simon Zünd 4cd7f0dba4 [cleanup] Use 'projectTypes' enum instead of string
R=kimanh@chromium.org

Bug: 1290254
Change-Id: I17dc97ca240bf5ffcdb97744b8f8683189b2aab2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3423903
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-01-31 14:38:23 +00:00
Wolfgang Beyer b4228b0d04 Optional chaining for UISourceCode.ts
Bug: none
Change-Id: Ia253535915f3735b669e8cd677c3c4e2ba87aa69
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3418497
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Auto-Submit: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-01-27 09:15:15 +00:00
Tim van der Lippe 6bcbe0f26d Use window.setTimeout to avoid TS errors in VS Code
R=aerotwist@chromium.org

Bug: none
Change-Id: I632aa0beb0e157197f5c2f982c2082a6d67f87f4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3380595
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-01-11 19:17:48 +00:00
Tim van der Lippe 2d9a95ce7b Suppress all existing promise races
To suppress the races, we mark these invocations with `void` per
the instructions of `no-floating-promises`. This explicitly marks
these statements as side-effect promises.

Engineers can later analyze these void statements and determine
whether the promise races are intentional or accidental.

R=jacktfranklin@chromium.org

Bug: 1239617
Change-Id: I6b7a24cf21029d6ff73b112b3e8255ebab8c60ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3366467
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-04 16:08:08 +00:00
Kateryna Prokopenko cae13bb94a Remove all DevToolsPath types as some of them might be incorrect
In order to avoid additional difficulties when typing paths in DevTools
discard the previous (possibly incorrect).

Bug: 1253323
Change-Id: Id4076900a44e9f06440cbfb4b99bed90f1ceb1f0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3297832
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2021-11-24 08:51:25 +00:00
Tim van der Lippe b5fb91dfa5 Move legacy file loading to legacy_test_runner
DevTools startup has slowed down a bit over the last year. The main
suspect that we have is the amount of files that are loaded at startup.
We have historically made significant improvements by removing file
loading out of the critical path, for example by removing the `module.json`
files from various modules. These have all attributed to improvements.

For our shell, we were still loading these legacy files. However, now
that we are fully type-checked with TypeScript, we have for the most part
removed our reliance on globals. There are only a handful of places where
we still rely on globals, most notably `MainImpl` for instantiation of
singletons and a single declaration in `ui/legacy/Panel.ts` which sets
values on `UI.panels`. Other than that, there don't appear to be anymore
usages of globals.

Therefore, we can move these legacy files out of our main shell and into
the legacy_test_runner. Doing so, our production build will now include
fewer files and hopefully also boot faster, while we still load the
legacy files for our layout tests (which still rely on globals).

It isn't clear what the performance impact will be, but cleaning this up
is good and we are relatively confident this will alleviate at least
some of the performance problems that have been reported.

R=yangguo@chromium.org

Bug: none
Change-Id: Ie34fbf6b82f3d1ba11bed623a9cc3d2a03c4c0c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264212
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-11-15 14:39:55 +00:00
Tim van der Lippe c1ab112d90 Port the sources panels to CM6
R=tvanderlippe@chromium.org

Bug: 1241848
Change-Id: Idfe1658c9c2948b5c79c2845b9fd9472746a62b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3247435
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-12 16:47:28 +00:00
Brandon Walderman 666b40a5b6 Add column number to linkified sources in the performance panel
This changes updates the Linkifier with an option to include the column
number in the link text if available. Also taking the opportunity to
remove some run-time type checks that are no longer needed thanks to the
TypeScript migration.

Including the column number in source links helps developers who are
looking at a performance profile "offline" find the function that was
called within the source file. When only a line number is given, this
is more difficult, especially for minified JavaScript files where there
may be many function definitions on the same line.

Bug: 1252049
Change-Id: I1e33583010c8f5d62789e4341ca5b4f6b2c9cd58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3176625
Commit-Queue: Brandon Walderman <brwalder@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-10-19 21:03:44 +00:00
Kateryna Prokopenko 6b831e3f67 Retype incorrect types from UrlString to RawPathString
Bug: 1253323
Change-Id: Ie1c0504db44583b39d3c9df4cb971e573f6d332f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3229762
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2021-10-19 09:36:51 +00:00
Kateryna Prokopenko 0623fac554 Remove casts to UrlString from PersistenceAction
Bug: 1253323
Change-Id: I09531fb20ad71c3bd4ffa79ca829d26afedd8f84
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3222665
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-10-14 12:53:56 +00:00
Simon Zünd c6f0c825f7 Prepare DevTools for removal of default 'any' from ObjectWrapper
Includes minor cleanups like removing ObjectWrapper as a base class
where no events are sent, forgotten type parameters and some
casting in test classes.

For Settings we introduce an explicit cast that improves ergonomics
for listening to setting changes.

R=pfaffe@chromium.org

Bug: 1228674
Change-Id: Ie0cd98ea22c82e23c6031dcd58ba63e94920dbd0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3172978
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-09-21 19:07:50 +00:00
Simon Zünd 109b5cc818 Use type-safe events for InspectorFrontendHost
This CL adds types for host bindings events that go in the direction of
"Chromium backend -> DevTools frontend". There is already a
similar structure called `EventDescriptors` that fufills a different
purpose. `EventDescriptors` is used to translate the host binding
event parameters, that arrive in an array, to `EventTarget` events,
that are objects with a single "data" property. `EventDescriptors`
doesn't contain any type information for the event parameters and
it is used at runtime. The new `EventTypes` type on the other hand
only contains type information and is not used at runtime.

Please note that `EventTypes` can't be used to check the "dispatch"
side, as the event translation + dispatch happens in a dynamic
fashion.

R=pfaffe@chromium.org

Bug: 1228674
Change-Id: I1dbe6ba6b0a494963bf443f25dedc860fa3e28e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3171012
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2021-09-20 08:20:09 +00:00
Kateryna Prokopenko d82fcf7258 Pass EventTypes as a generic argument to FileManager
Bug: 1228674
Change-Id: I8e47ea3b932a6f110cb1bd04438f1fb2114383c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3097208
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com>
2021-08-16 14:22:35 +00:00
Kateryna Prokopenko 799d1e2b59 Use type-safe events for WorkSpaceImpl
Bug: 1228674
Change-Id: Ib3a67154c3933df4f840a20a77f20d7f42bc046f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3090971
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-08-13 06:59:25 +00:00
Kateryna Prokopenko 9fb8069c9d Use type-safe events for UISourceCode
Bug: 1228674
Change-Id: Iee1d957b14111660c1441e8b2cb9e4e8f8572c31
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3083711
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-08-10 13:36:51 +00:00
Jan Scheffler 744e3fb5cd [Underscore Migration] Migrate models
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.

Bug:chromium:1207342
Change-Id: Ia25ac337cf7be99e2b18b95cf15f19eb559f22fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3077389
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-10 11:10:51 +00:00
Kateryna Prokopenko 8a0986cc53 Make enum non-const again and add comment back.
Bug: 1228674
Change-Id: Ie9996c5d6f470faf9800fe56d6c687711ccf69eb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3083708
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2021-08-10 08:43:39 +00:00
Kateryna Prokopenko 15476328d2 Use type-safe events for FileManager
Bug: 1228674
Change-Id: I9daa26f61f0cbd65cc5ba07f09d2c0e2b39158c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3081724
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@google.com>
2021-08-10 06:44:49 +00:00
Jan Scheffler f33718c8f8 [Underscore Migration] Migrate models/workspace
This patch is part of the underscore migration that adds the private
keyword to all properties that start with an underscore and removes the
underscore.

Bug:chromium:1207342
Change-Id: Ibf3cf7532343b02abb76b8d6df153c049c932b18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3078241
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-06 17:38:47 +00:00
Tim van der Lippe e19929dc74 Add tests for SourceFormatter
This requires us using the environment, as the SourceFormatter relies
on numerous singletons related to workspaces, projects and documents.

This CL gets us to about 50% code coverage. The missing coverage is
mostly in the two mapping classes at the end of the file, which are
more difficult to test. We will do that in a follow-up CL.

R=szuend@chromium.org

Bug: 1009443
Change-Id: I8412b5f6e8053d72cea5110a3b82458388fb9e95
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3056378
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-07-29 10:49:19 +00:00
Tim van der Lippe 300f2b3d7b Add GN visibility for models/
Downstream projects can define the devtools_models_visibility in
their `default_args` in their `.gn` file to add any other
dependencies.

R=jacktfranklin@chromium.org

Bug: 1202788
Change-Id: I7e9ab02d3bcb0f76b170f3a5ffe67afb790d6285
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854687
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>
2021-04-28 13:07:14 +00:00
Tim van der Lippe eea44828fe Add GN visibility to all legacy targets
R=jacktfranklin@chromium.org

Bug: 1202788
Change-Id: I47b05c25df571de948ab59e9abcc6a62d0146ff2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2854677
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-28 09:57:04 +00:00
Tim van der Lippe bbb43fbe74 Consolidate owners in models/
Not every single person was present in all folders, but these owners
were present in a majority of all folders.

R=yangguo@chromium.org

Bug: 1187573
Change-Id: I4ed38d3e118715ab3ed14bd261095b0c8d54e6e6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2848235
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-26 13:51:40 +00:00
Tim van der Lippe 99aeaf3724 Move workspace to models/workspace
R=jacktfranklin@chromium.org

No-Presubmit: true
Bug: 1187573
Change-Id: Ia4bf7cb736dca976fb30d9e94beeda3e28115dce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2815118
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-09 15:32:33 +00:00