Commit Graph
17 Commits
Author SHA1 Message Date
Tim van der Lippe bfa40d4e91 [globals] General cleanup
Some issues I found scattered around the codebase that should have been
cleaned up in the previous CLs, but were left behind.

R=jacktfranklin@chromium.org

Bug: 1058320
Change-Id: Ic2709b35fc5f81087aafe226b0e9e31b28a82abf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2398825
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-09 07:53:21 +00:00
Tim van der Lippe d1a00aacb9 [globals] self.UI.context
R=jacktfranklin@chromium.org

Bug: 1058320
Change-Id: Icc1d806782e7624fff02e719670a2cca59070ddd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2364594
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-08-19 16:24:38 +00:00
Simon Zünd 716ab01c84 [ts] Type-check ui/ForwardInputEventHandler.js with TypeScript
Note that extracting the globals into local variables with the
correct type, allows TypeScript to correctly check their usage.

R=jacktfranklin@chromium.org

Bug: chromium:1011811
Change-Id: Ia07686bc8f5a14e3e301c689a77a73adb61306ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2351777
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-08-12 10:15:57 +00:00
Sigurd Schneider 46da7db785 Remove unnecessary @unrestricted annotations from front_end/ui
This CL removes 29 unnecessary @unrestricted annotations from
classes in front_end/ui.

Bug: chromium:1011811, chromium:1079233
Change-Id: I83c8898e7974db54dd156927cfe45d44c45a7fd7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209084
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-05-20 14:34:33 +00:00
Tim van der Lippe ee97fa3e34 Add ts_library definitions and ts-nocheck for Karma tests
In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2102717
we are updating the Karma configuration to use the Ninja output for
all unittests. This CL includes all existing unittests in relevant
ts_library definitions and adds the corresponding (previously missed)
dependencies as ts_library as well.

Since most of these dependencies are actually not compiling with
the TypeScript compiler (the original intent of the CL linked above),
we are adding the @ts-nocheck annotation for now. Of course, we should
remove these annotations as soon as possible, but that is a bit more
work, as the tests involved are primarily UI driven.

R=jacktfranklin@chromium.org

# Windows presubmit breaks with large CLs
No-Presubmit: true
Bug: 1061125
Change-Id: Ic67dbbc805642eaa618340a67ea0975eaacffc24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2162850
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-23 16:33:00 +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
Tony Ross 0051f88e45 DevTools: Fix forwarding keyboard shortcuts from target page
This was regressed by crrev.com/c/devtools/devtools-frontend/+/1942290
which removed an unused variable in response to a linting rule. That
variable referenced a call to construct a ForwardedInputEventHandler
instance. That constructor has a side-effect of registering event
listeners with the host and still needs to be run.

Restoring the call to the constructor fixes the issue.

Bug: 1049910
Change-Id: I6338164fcbbce6cae688d90c6d11cd76ed719f1e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2043060
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Tony Ross <tross@microsoft.com>
2020-02-07 17:31:30 +00:00
Paul Lewis 05eb37fad0 [Global] Update refs to UI.shortcutRegistry
Bug: 1006759
Change-Id: I7f5e50e80ec49429698737f79c555472c44fb68f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019549
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 15:34:35 +00:00
Paul Lewis d990734442 [Global] Update refs to UI.context
Bug: 1006759
Change-Id: I4a405fb1d80f6a384a311a3482c37f943238b73f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019137
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 14:25:48 +00:00
Paul Lewis 0fd43719d8 Removes global Host refs from ui
Bug: 1006759
Change-Id: Ia489ce849be02ae08e48a03a176859b4c8728cda
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991502
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-08 17:49:55 +00:00
Paul Lewis 9950e186c4 Migrates internal refs of ui/ to esm
Please note: ESLint and Closure have different opinions on the
necessity of imports, thus // eslint-disable-line no-unused-vars
was added to imports used only for Closure types.

Bug: 1006759
Change-Id: Idd32e12d23a636f1e0fdcb90742e4b706e3cef77
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967134
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 16:52:27 +00:00
Tim van der Lippe c96ccd99f0 Remove unused globals
By using the script in crrev.com/c/devtools/devtools-frontend/+/1942289
we can prune all globals that are not actually global. Most of these are
internal private variables that are now module-scoped. Some variables
were also completely unused, which ESLint nicely reported.

Change-Id: I43689ac7544ad1239acc7d0eeec4dcd563d7fea9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-29 16:38:40 +00:00
Tim van der Lippe 0830b3daa4 Convert ui/ to ESM
- ViewManager has been extracted from View
- Action has been extracted from ActionRegistry
- ContextFlavorListener has been extracted from Context

Bug: 1006759
Change-Id: Iff41f3a7db4dcbd6da90fd5752923e32af03bac8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1827294
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#702390}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0ffd51ccac853da7c8ec3d91ae868bc61626b29b
2019-10-03 13:20:07 +00:00
Tim van der Lippe 50cfa9b19d Migrate host/ to ESM
Bug: 1006759
Change-Id: Ib72e0acbb20c4579e708cd79a67ffd0bc2073b70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829102
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#701509}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b2641f7a9893b50ab7f74d8bc5b7ca7743b0a530
2019-10-01 10:40:58 +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
Tim van der Lippe 7b190160cd Move InspectorFrontendHostAPI to externs
This was an interface that was already treated as an extern, but was not
explicitly in the externs.js file.

Bug: 1006759
Change-Id: I95301c059cc1213931498788cff553f955abb646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829098
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#700724}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c6c1bf57acb1c9ed7304674e7d5df51122cb22b1
2019-09-27 15:10:44 +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