Commit Graph
27 Commits
Author SHA1 Message Date
Tim van der Lippe 05149e9772 Remove ls from legacy-defs
This adds all missing imports for `ls` to all files. After this change,
all usages of `ls` will now properly be resolved to a LocalizedString
rather than a normal string.

R=jacktfranklin@chromium.org

No-Presubmit: True
Change-Id: Icf6d8c3b8bea1f9e66f4b6b58e4ae4c7f99e6f9c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2629554
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>
2021-01-15 12:53:50 +00:00
Tim van der Lippe d7cfd14814 Fix no-implicit-coercion errors in front_end/
R=jacktfranklin@chromium.org

No-Presubmit: True
Bug: 1082789
Change-Id: Ic77884bf7e9b5dc74053915b3b10699368841b66
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2595268
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-01-07 12:40:16 +00:00
Tim van der Lippe 5e1aeb0577 Remove suppress annotations
All of these were Closure-specific.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Ia580e21cd3b06f532bb5a63a770ccfa3d7c796ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569761
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 17:27:02 +00:00
Alfonso Castaño 13dcbd22d4 Breakpoint on Trusted Type violation (Devtools)
This CL introduces a categorized sidebar pane to set breakpoints on Trusted Type violations.

DISABLE_THIRD_PARTY_CHECK=protocol change
https://docs.google.com/document/d/1rlRtq_Ai0leS9sqlRvoOL5RNc1BR6Q1yAVvLLJFasMA/
Screenshot: https://i.imgur.com/8Aythwz.png
Bug: chromium:1142804
Change-Id: I3e14e35165f1b157da922f534be52a10df9178ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2517571
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Alfonso Castaño <alcastano@google.com>
2020-11-19 11:55:14 +00:00
Alfonso Castaño 6729bed0d4 Introduce abstract class for categorized breakpoints
This CL introduces a new abstract class CategorizedBreakpointsSidebarPane.
For the moment it is only used in EventListener but in follow-up CL a new child class will be introduced.

DISABLE_THIRD_PARTY_CHECK=protocol change
Follow-up CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2517571
Bug: chromium:1142804
Change-Id: I88b984cf08bb3f1ae758ef2efd3463814e70aedb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2529160
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-11-13 13:37:45 +00:00
Sigurd Schneider 5a5b735963 Improve template types in Target/SDKModel
The Target.model method's type can be improved to convey the type of
the result (based on the constructor argument). This CL does just that.
This unlocks more checking down the line. The CL also alters the types
of the observeModel(s) methods, but in a weaker way, as closure is
apparently not able to instantiate the template correctly for method
invocations.

Bug: chromium:1011811
Change-Id: Ic466cfd946c30f3fcfb4ce24a8a0e1bc542e7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2445776
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-05 12:21:48 +00:00
Tim van der Lippe 321dcca8b2 [globals] self.SDK.domDebuggerManager
R=aerotwist@chromium.org

Bug: 1058320
Change-Id: I523b32d769c6e240ce678e6657a66cd54e2c4c8d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391244
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-09-08 13:17:19 +00:00
Wolfgang Beyer 5e736fbd7e Port DOMDebuggerModel to ts
Bug: chromium:1011811, chromium:1079233
Change-Id: I3806174e9e8e89be299ec363a56f96583c50fec0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2207322
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-20 09:27:27 +00:00
Tim van der Lippe dc9d2515c5 Add @ts-nocheck annotations to sdk and typecheck sdk/Connections.js
To enable full parallelization of all files in sdk/, we can add the
@ts-nocheck annotation to all files. This suppresses existing
TypeScript errors in these files.

We can then one-by-one remove these annotations and fix the issues
reported in these files. This allows us to parallelize the work
and work on many files at the same time.

As a starter, I typechecked sdk/Connections.js to verify that
typechecking works while all other files are not checked yet.
I did do so by locally suppressing all TypeScript errors in
SDKModel.js and remove the `instance` method on `TargetManager`.
I then confirmed that rebuilding with TypeScript correctly
fails on the missing method, but does not require SDKModel.js
itself to be typechecked.

Bug: 1011811
Change-Id: I46de3839f7d837e951967dd932218bda00c6ad5b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2156352
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-22 13:17:59 +00:00
Paul Lewis 2d7d65c5e8 [global] Remaps self.Common.settings
This CL changes references to self.Common.settings (the global
instance of SDK.Common.Settings) over to
Common.Settings.Settings.instance(). To keep both TypeScript and
Closure happy we must make a method on the Settings class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I04afc8caf64acf29cdda13ef03ad05cfff4786a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2091450
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-16 22:04:07 +00:00
Paul Lewis daac106699 [global] Remaps self.SDK.targetManager
This CL changes references to self.SDK.targetManager (the global
instance of SDK.SDKModel.TargetManager) over to
SDK.SDKModel.TargetManager.instance(). To keep both TypeScript and
Closure happy we must make a method on the TargetManager class itself,
since it only allows private constructors to be accessed by static
methods on the class.

Bug: 1058320
Change-Id: I6ca35024c21cf24254fd6273138a1ab3e163ee00
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2088092
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-05 14:58:03 +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 5ed0fb968c Fix internal bindings in sdk/
These were some left-over fixes that regressed while doing phase 3 of
ESM. It includes fixing the typedefs in sdk-legacy to be in the proper
file and exported.

Bug: 1006759
Change-Id: I939d4287a78888fba65d4baed04ee90f14c88e23
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2055065
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +00:00
Tim van der Lippe d41d863344 Migrate sdk/ to import cross-module
Bug: 1006759
Change-Id: I1f4d365ca078007f9d5e5b005e748bac3993e8da
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016757
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-23 16:10:20 +00:00
Paul Lewis 6bcdb18044 [Global] Update refs to Common.settings
Bug: 1006759
Change-Id: Ie1943b50ba8ba23fae4f52f958ae6f8c7b6a7d3f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016744
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 11:29:11 +00:00
Paul Lewis 4ae5f4f5ce [Global] Update refs to SDK.targetManager
Bug: 1006759
Change-Id: I0686ef929b89e75c2ea8a731c593d955eca85935
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2015119
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-23 10:56:40 +00:00
Tim van der Lippe 9293af7230 Migrate sdk/ to ESM internally
Bug: 1006759
Change-Id: I2bb0c8eaa4fdc89edd8da2b12d9fd0e08d427174
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003327
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-17 15:17:17 +00:00
Ella Ge f7fd2ebed0 Add pointerrawupdate to event listener breakpoints
pointerrawupdate is shipped in chrome from M77(crbug.com/873684) but
was missing from devtool's EventListenerBreakpoints list.


Change-Id: I5599b3a3020c2ddcd520d43159e7e1d0d2c9785c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1926316
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-12-11 14:08:44 +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 9b7d21d126 Migrate sdk/ to ESM
Bug: 1006759
Change-Id: I3f5917ab3f5b3fb823ca460c395301ba19eed2df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841792
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#703381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5a7c8d13f806d781e8edb96a9b1f152d4fe1258a
2019-10-07 18:48:07 +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
François Beaufort eb91034862 Reland "Add Picture-in-Picture debugger breakpoints in DevTools."
This is a reland of e01d8c1f7806a56806ac57372e8cbadd1828896d

This CL makes sure video is always playing before requesting PiP in
tests. It also add slow tests detected by findit.

Original change's description:
> Add Picture-in-Picture debugger breakpoints in DevTools.
>
> This CL makes sure enterpictureinpicture, leavepictureinpicture, and
> resize events are listed in a new "Picture-in-Picture" section in the
> Event Listeners Breakpoints panel.
>
> Screenshot: https://i.imgur.com/7YsiVsb.png
>
> Change-Id: I7e5eae713e5ad3998b33d953dbf56753819a86ab
> Reviewed-on: https://chromium-review.googlesource.com/c/1261395
> Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#598057}

Change-Id: I5e728e10e98494c4320358969fe8654a00124276

TBR=dgozman@chromium.org

Bug: 893947
Change-Id: I5e728e10e98494c4320358969fe8654a00124276
Reviewed-on: https://chromium-review.googlesource.com/c/1272818
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Olga Sharonova <olka@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598265}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2bdcfc79b7cbe59f256b34e6e7df3fff986c517c
2018-10-10 09:37:39 +00:00
Findit 57b0dec534 Revert "Add Picture-in-Picture debugger breakpoints in DevTools."
This reverts commit e01d8c1f7806a56806ac57372e8cbadd1828896d.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 598057 as the
culprit for flakes in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/flake/flake-culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyQwsSDEZsYWtlQ3VscHJpdCIxY2hyb21pdW0vZTAxZDhjMWY3ODA2YTU2ODA2YWM1NzM3MmU4Y2JhZGQxODI4ODk2ZAw

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.mac/Mac10.13%20Tests%20%28dbg%29/5683

Sample Failed Step: webkit_layout_tests on (none) GPU on Mac

Sample Flaky Test: virtual/video-surface-layer/http/tests/devtools/sources/debugger-breakpoints/breakpoints-ui-in-multiple-workers.js

Original change's description:
> Add Picture-in-Picture debugger breakpoints in DevTools.
> 
> This CL makes sure enterpictureinpicture, leavepictureinpicture, and
> resize events are listed in a new "Picture-in-Picture" section in the
> Event Listeners Breakpoints panel.
> 
> Screenshot: https://i.imgur.com/7YsiVsb.png
> 
> Change-Id: I7e5eae713e5ad3998b33d953dbf56753819a86ab
> Reviewed-on: https://chromium-review.googlesource.com/c/1261395
> Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#598057}

Change-Id: I915d441aac893247ea4f4ff13a7f1267af4e9576
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 893947
Reviewed-on: https://chromium-review.googlesource.com/c/1272069
Cr-Original-Commit-Position: refs/heads/master@{#598209}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ff4a8c01cf386f5cc81de0c1c2e6e1bd36025454
2018-10-10 04:21:57 +00:00
François Beaufort 81eb282e3c Add Picture-in-Picture debugger breakpoints in DevTools.
This CL makes sure enterpictureinpicture, leavepictureinpicture, and
resize events are listed in a new "Picture-in-Picture" section in the
Event Listeners Breakpoints panel.

Screenshot: https://i.imgur.com/7YsiVsb.png

Change-Id: I7e5eae713e5ad3998b33d953dbf56753819a86ab
Reviewed-on: https://chromium-review.googlesource.com/c/1261395
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598057}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e01d8c1f7806a56806ac57372e8cbadd1828896d
2018-10-09 20:12:25 +00:00
Alexey Kozyatinskiy 330bffbda3 DevTools: remove callbacks from RemoteObject.js
We have two version of a lot of methods: method and methodPromise.
It makes searching of methods usages in codebase a little harder, this
CL replaces all callback based methods with promisified one.

R=luoe@chromium.org

Bug: none
Change-Id: If30da32e1b062734d7db54b9c5a87ece73ef1d39
Reviewed-on: https://chromium-review.googlesource.com/1235212
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593291}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6abe7663589214aa561a1a674c20a570effdeff1
2018-09-21 19:20:18 +00:00
Hongchan Choi 787cec6ee6 Add EventListenerBreakPoints for AudioContext operation
This CL adds EventListenerBreakPoints for the AudioContext constructor,
AudioContext.close(), AudioContext.resume() and AudioContext.suspend().

Bug: 848473
Change-Id: Ifbbccfd1e21dc8b5b444993c7143e869a56d7e6c
Reviewed-on: https://chromium-review.googlesource.com/1089200
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#568197}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5cc93793d9819f9b0d9e6fde47cdeb8e9c481ae4
2018-06-18 22:24:36 +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