Commit Graph
23 Commits
Author SHA1 Message Date
Vidal Guillermo Diazleal Ortega 83edb474b3 [Loc] Migrate Sources to Localization V2
- Migrate sources to use Localization V2 APIs.
- Removed sources grdps

Tested with en-XL.json
https://imgur.com/a/vDrfTAv

Bug: 1136655
Change-Id: I01d4fcdc3f115e9edb3fae933c7d5c6b9ffb77c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692743
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-02-16 19:14:49 +00:00
Brian Cui 37fb5ece29 Fix Pretty-Print Infobar not working
This CL fixes the Pretty-Print Infobar not formatting the source file
when the Pretty-Print button is pressed. The bug was caused by a subtle
change to the button delegate when it was updated to support TypeScript
causing it to no longer invoke the format function.

The CL slightly modifies the ScriptFormatterEditorAction to have button
a event handler to absorb the unused 'event' argument, so the Infobar
does not need to pass one to toggleFormatScriptSource.

Bug: 1159531
Change-Id: I8e1876e8ce0ebc1e498e81a619a905a007cabdf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2596121
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Brian Cui <brcui@microsoft.com>
2020-12-21 18:13:26 +00:00
Tim van der Lippe e4d64e7ae0 Remove unrestricted from comments that include other annotations
For all comments that contained both the unrestricted annotation
and any other potential annotation, remove only the unrestricted
annotation.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: I27dd67f657cdb1a9233d768eea81cabe2591f5f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569759
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-02 15:31:52 +00:00
Peter Marshall 1d8da1fddb Don't instantiate a SourceFormatter when modules are imported
This was causing problems when trying to write a unit test that
included a file which transitively included formatter.js, which was
instantiating a SourceFormatter, leading to a chain of unfortunate
events which relied on some other module already being loaded, which
it wasn't.

To avoid the dependency chain between the imports, expose a function
getSourceFormatter which lazily instantiates a shared instance.

Bug: 1136848
Change-Id: I7c255186e53e131127ba00b7f719f2f1b34301c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2456592
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
2020-10-13 08:36:28 +00:00
Tim van der Lippe 29d0d79372 Typecheck sources/ScriptFormatterEditorAction.js with TypeScript
R=szuend@chromium.org

Bug: 1011811
Change-Id: I02f81464badc8d7ada9e4b87b1925fc7047b02ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2449592
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-05 12:42:29 +00:00
Tim van der Lippe cc37f9b04b [globals] self.Persistence.persistence
R=aerotwist@chromium.org

Bug: 1058320
Change-Id: I04e6fca49686bf445489719cad1b7bdfa16cc890
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2391246
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 15:01:39 +00:00
Jan Scheffler e1a1b0fbbf Migrate front_end/sources to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: I79bcbb35ccf48f6336cde80858f0177427703795
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2332224
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
2020-07-31 14:33:20 +00:00
Benedikt Meurer 36c50114f1 [sources] Don't show pretty-print infobar for Wasm disassembly.
Content for .wasm files is fetched as Base64-encoded string and served
like that all the way up to the UI layer. Thus the minified script de-
tection logic often thinks that this is a minified JavaScript file and
would offer to format it, which doesn't make any sense, and also doesn't
really work anyways. This changes the predicate to not even consider
Wasm wire bytes for formatting all together.

Fixed: 1094880
Bug: 1071432
Change-Id: I6bda7969eea1ddf8039b22f9c509ed922fc5843c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2246502
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-06-16 09:45:28 +00:00
Jose Leal Chapa a7815f1bad Devtools bug fix: Pretty print info bar
After clicking the 'Pretty print' button on the info bar
a new formatted file appears and the info bar is shown again.

This happens because a verification for formattable code is missing.
That is the same logic used by the button in the toolbar, so in this CL I'm adding that check for the infobar as well.

Before:
https://imgur.com/a/Cu2tkFp

After:
https://imgur.com/a/GaU1QHH

Bug: 1072251
Change-Id: I4be317ef0f8ba0321e31d29a070380d6e6018953
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2156054
Commit-Queue: Jose Leal <joselea@microsoft.com>
Reviewed-by: Brian Cui <brcui@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
2020-04-20 19:47:30 +00:00
Brian Cui 715c8c459f Infobar Improvements
This CL makes several improvements to the Infobar component.

Most notably, action(s) can now be taken directly from the Infobar
itself. Clients of the Infobar component can pass any number of action
buttons during construction depending on the context.

Infobar has three uses presently in DevTools;
two of those use cases are actionable and have been upgraded with
this new experience:

 - "Pretty print this minified file?" now has a "Pretty-print" button
   where users can directly pretty-print the file.

 - "This script is blackboxed in the debugger" now has an "Unblackbox"
   button, plus a "Configure" button that opens Blackboxing settings.

The layout has been updated to reflow responsively for narrow
window widths and high zoom. Accessibility considerations include:

 - Keyboard navigation: Infobar itself can now gain focus and be
   dismissed by pressing the Esc key. Pressing the Enter key will
   open the Learn More section.

 - Screen reader support: Infobar contents are read aloud in a natural
   and predictable fashion. The ARIA "alert" role is used on the Infobar
   text content.

 - High contrast support: Infobar text and buttons are visible in high
   contrast view. Note, the icons are not high-contrast compliant;
   HC icon updates throughout DevTools is a future task.

Demo: https://i.imgur.com/kNjI4pA.gif

Bug: 1056348
Change-Id: Id2e695af367fb8f5a1c489fa8d3d94c8974458fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981175
Commit-Queue: Brian Cui <brcui@microsoft.com>
Reviewed-by: Fabio Rocha <fabio.rocha@microsoft.com>
2020-03-11 00:00:43 +00:00
Tim van der Lippe 37a35fff86 Reland "Typecheck Object.js"
This reverts commit f996a1c537.

Reason for revert: Fixed incorrect refactoring in this CL.

Original change's description:
> Revert "Typecheck Object.js"
>
> This reverts commit 258665aca5.
>
> Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
> Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?
>
> Original change's description:
> > Typecheck Object.js
> >
> > To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> > that were using addEventListener or removeEventListener incinsistently.
> >
> >
> >
> > Bug: 1011811
> > Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Commit-Queue: Jose Leal <joselea@microsoft.com>
>
> TBR=szuend@chromium.org,joselea@microsoft.com,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1011811
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>

Bug: 1011811
Change-Id: I19ebbe0345a5c7380ed69d1ba2921adf0385228e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2084580
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-03 14:09:44 +00:00
Simon Zünd f996a1c537 Revert "Typecheck Object.js"
This reverts commit 258665aca5.

Reason for revert: Suspected of breaking the roll (https://crrev.com/c/2083712)
Bot failure: https://ci.chromium.org/p/chromium/builders/try/linux-rel/322462?

Original change's description:
> Typecheck Object.js
> 
> To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
> that were using addEventListener or removeEventListener incinsistently.
> 
> 
> 
> Bug: 1011811
> Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Commit-Queue: Jose Leal <joselea@microsoft.com>

TBR=szuend@chromium.org,joselea@microsoft.com,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: I30e3d75eee463362107d6e6ad25df2b7d50f9d54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2081824
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-03 05:59:28 +00:00
Jose Leal Chapa 258665aca5 Typecheck Object.js
To typecheck the file Object.js with Typescript I had to fix the type errors from all other classes
that were using addEventListener or removeEventListener incinsistently.



Bug: 1011811
Change-Id: I2fccbbd07ef3d9a581baa34233580bc6a9dbbfc3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2079794
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jose Leal <joselea@microsoft.com>
2020-03-02 18:15:06 +00:00
Simon Zünd b867043d77 Prepare SourceFormatter.js for asynchronous live locations
To support asynchronous source mapping, live locations must support
asynchronous updates. This CL prepares SourceFormatter.js for
asynchronous live location updates by properly {await}ing calls to
{updateLocations} on the different binding models.

R=sigurds@chromium.org

Bug: chromium:1032016
Change-Id: I347c69ffdd8d9d4870e62bf3bda17cd8dacb250c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2071877
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-03-02 07:51:53 +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 fbbf981a34 Migrate sources/ to import cross-module
Bug: 1006759
Change-Id: I9b91ba0c24a14ca4d30cf3dd4469d5e162bc96db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2054548
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-13 17:11:00 +00:00
Tim van der Lippe 011fa18146 Add javascript source formatting e2etest
This is part of the tests that live in
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/devtools/startup/sources/debugger/drc=77578ccb4082ae20a9326d9e673225f1189ebb63?originalUrl=https:%2F%2Fcs.chromium.org%2F

Bug: 1044632
Change-Id: I2ecd7d7f42608f320152fc8b1c13977422698360
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2046553
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-12 18:32:42 +00:00
Paul Lewis 509e7a650a [Global] Update refs to Persistence.persistence
Bug: 1006759
Change-Id: Ibd16fdca19f3ee21255c439aff360dc302676d92
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019543
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-24 14:49:16 +00:00
Paul Lewis 39944955e0 Migrates sources/ to ESM internally
Bug: 1006759
Change-Id: Ie1ca01eaadde94191431217f297b108dde5e8adf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002596
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-22 17:15:48 +00:00
Tim van der Lippe 8987f8f14e Migrate sources/ to ESM
Bug: 1006759
Change-Id: I509e05a6e4f4c974dbcdd8224f0439d7b1b98aec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985672
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-06 12:57:13 +00:00
Sigurd Schneider 810aa6cba2 [coverage] Fix formatting from coverage list view
We won't support cyclic dependencies, so after the introduction of
the CoveragePlugin in source, the SourceFormatter must move to a
package up in the hierarchy to be usable by both Source.* and
Coverage.*.

Bug: chromium:1004203, chromium:1034005
Change-Id: Ia5fcf0e7b2caa6d44620b6e4dc712086df49ef0b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1964332
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 10:13:57 +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
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