Commit Graph
58 Commits
Author SHA1 Message Date
Kim-Anh Tran c4c1fba6f0 Revert "Add helper functions for adding breakpoints in sources"
This reverts commit 2fe6522550.

Reason: Causing flaky tests on waterfall

Bug: chromium:1178804
Change-Id: I38e46d9e786467e9bbdcbbf7301da1e363bd0f57
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2697200
Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Almothana Athamneh <almuthanna@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2021-02-16 14:52:45 +00:00
Andres Olivares 53a3aa0328 [module.json extensions] @SourceFrame.LineDecorator
Bug: 1134103
Change-Id: I5548d5d4af8a60ecb1c178c4cc3041e8cfaec5ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2692888
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-15 15:48:02 +00:00
Almothana Athamneh 2fe6522550 Add helper functions for adding breakpoints in sources
Bug: chromium:1169599, chromium:1112692
Change-Id: I80b2711a006b94b170d9e270cb7afb64a5a7e920
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2643505
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
2021-02-09 15:42:01 +00:00
Alfonso Castaño 8c42bf00df Make Issue Message in Source Tab link to Issues tab
Design-doc: https://docs.google.com/document/d/1TgMAUsruc_xAPAseG96H0-NHRT_PiXciedD58hgq1e4/
Bug: chromium:1150883
Change-Id: Ibe320de74ff726f5d649007e7c7b298a50892301
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562353
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-12-21 11:33:15 +00:00
Alfonso Castaño 3a28946876 [Frontend] Show Issue next to corresponding line in Source Tab
This CL contains the changes related with displaying the messages.

Design-doc: https://docs.google.com/document/d/1TgMAUsruc_xAPAseG96H0-NHRT_PiXciedD58hgq1e4/
Screenshot: https://i.imgur.com/2iOUMqK.png
Bug: chromium:1150883
Change-Id: I1ec91ead2d102e397b5d0f18f9f96c10f91230ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567969
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-12-11 11:19:27 +00:00
Simon Zünd 5ed854f3f2 Move Icon component from 'elements' to 'ui/components' module
R=jacktfranklin@chromium.org

Change-Id: I49997ec89954ebcf84931af355942f5196ff190f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581932
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-12-10 11:09:48 +00:00
Tim van der Lippe 2e38eeaf9f Remove all comments with only the unrestricted annotation
The unrestricted annotation is Closure-specific and can be removed.
This patch removes all comments with only the unrestricted annotation
in them.

R=szuend@chromium.org

No-Presubmit: True
Bug: 1011811
Change-Id: Iba0723644f53f5307c3077d341271af86becc32a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2569758
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 15:25:32 +00:00
Tim van der Lippe 3fa8654ce6 [DarkMode] Migrate files without color definitions
For all of these files, there was no occurrence of the word "color"
in them. Therefore, most of these files were complete noops.

There were two exceptions: some white backgrounds and a box shadow
used for image previews in the sources panel. For the latter, a new
CSS variable is extracted into themeColors.css

R=jacktfranklin@chromium.org

Bug: 1152736
Change-Id: I40f2f1e28cc3c7038b831003f1eb32cc923b411a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567113
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-02 14:52:49 +00:00
Alfonso Castaño ff2d4dc7d0 Refactor UISourceCodeFrame to use Icon component
Now it should be possible to add any icon of any size even if it is not in the spritesheet.

Screenshot: https://i.imgur.com/BwjiD5b.png
Bug: chromium:1150883
Change-Id: I0e017b48c29b4ece8374c0797992e29b68541a98
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2555061
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-11-30 11:01:58 +00:00
Alfonso Castaño 2edbdcdba2 Fix Icon not showing on Source Tab RowInfo
Although the icon was implemented it was not showing due to the use of "label" instead of span.

Screenshot: https://i.imgur.com/oyRkIkq.png
Bug:1151316
Change-Id: I37fc04575e60ba465f692a344cc571019e3ef7da
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2554571
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-11-25 15:23:47 +00:00
Jan Scheffler 3a230e2849 [Recorder] Add recording to DevTools
Bug: chromium:1144127
Change-Id: I58a5add98bf08a8113ecdf674e08911a79f7b12b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2505657
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-19 13:55:32 +00:00
Jack Franklin 71519f8efb Introduce enableLegacyPatching flag for CSS patching
As part of the dark mode migration we are adding
`enableLegacyPatching:true` to all call sites of `appendStyle` (and
related methods). If a user passes `false` for that flag, no CSS colour
patching will occur.

This CL is therefore a no-op from a user's perspective as we pass `true`
on every call to maintain existing behaviour, but once we start
migrating we will turn the option to `false`. Long term, once all code
is migrated and the old patching is removed, we will remove this flag
entirely once again.

Bug: 1122511
Change-Id: I76b818e83b7d5ee0175e1548759373f53481e0ab
No-Presubmit: True
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2516345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-03 14:11:46 +00:00
Tim van der Lippe 49ff36be1c Remove duplicate typedef and unify usages
R=szuend@chromium.org

Bug: 1011811
Change-Id: Ib5bbcd8531a5c3eb9ba7665888eca6f6b2ab9689
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2460909
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-10-08 12:50:47 +00:00
Tim van der Lippe 79960a9c04 Typecheck sources/UISourceCodeFrame.js with TypeScript
R=szuend@chromium.org

Bug: 1011811
Change-Id: I832ef16ba413d096378f6d71f17b8962958f66dd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2450030
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-10-07 15:15:55 +00:00
Tim van der Lippe 7f2002c598 [globals] self.runtime
Migrate all usages of self.runtime to Root.Runtime.Runtime.instance().

This also requires various type updates, as now Closure/TypeScript
can better understand the code and discover issues.

R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: Ice07aa0ca959e61a6acdf4618b9a272d8c1096b8
Fixed: 1081614
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2434339
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-09-29 10:52:39 +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
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
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
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 bebf373c91 [wasm] Wasm disassembly cannot be edited.
LiveEdit doesn't support Wasm module updates and there's also no support
in the front-end for any of this, so we just disable the editing of Wasm
disassembly alltogether to reduce the user confusion here.

Bug: chromium:1071432
Change-Id: I41b91af2f1e2578e0042d38d77b9a9729fca5a58
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230500
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2020-06-04 09:45:56 +00:00
Benedikt Meurer fcef4e406f [sources] Make editor location mapping more robust.
This refactors the editor location done in the `UISourceCodeFrame`
via the `Transformer` in the following ways to make it more robust,
preparing for hooking up the WebAssembly disassembly here as well:

 1. Remove the duplicate `Transformer` typedef.
 2. Turn the `Transformer` typedef into a proper interface and have
    `SourceFrameImpl` implement it.
 3. Rename the `Transformer` methods to make sense and adjust the
    return type to an object with meaningful field names, rather than
    an ad-hoc array with two elements.

Bug: chromium:1056632
Change-Id: I3d08b54dab3a04a8595e3a498127f9f91d686694
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220091
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-05-29 07:34:39 +00:00
Jack Franklin a3d9fc160c Migrate Set.proto.addAll into SetUtilities.
Bug: 1050549
Change-Id: I2458baf226b55ef5ee8bbc6b4d133cd622763d5c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2194871
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-05-13 09:45:31 +00:00
Tim van der Lippe f49e23286b Replace single class invocations of createElementWithClass
This applies the following replacement to the codebase:

(\S+) = createElementWithClass\('(\w+)', '([^'\s]+)'\);

to

$1 = document.createElement('$2');\n$1.classList.add('$3');

R=aerotwist@chromium.org

No-Presubmit: true
Bug: 1011811, 1077215
Change-Id: I0d76b39f1ed8cd4a44f18f94e398db934ba4b09c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2176112
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-01 16:54:52 +00:00
Eric Leese 187e11502b Reland "Deduplicate tabs with same URL"
This is a reland of 559b867f57

Original change's description:
> Deduplicate tabs with same URL
> 
> Opening the same file in multiple workers results in only one copy
> open. Further deduplication work in the BreakpointManager results
> in disabled breakpoints being visible in all workers.
> 
> Bug: chromium:670180
> Change-Id: I57c7cf2aab46dcc2dc9d6622819df55bdd75d0a2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107522
> Commit-Queue: Eric Leese <leese@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: chromium:670180
Change-Id: I48ef449a48c41413287bdd969510659e59c9663b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116436
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-03-25 13:42:23 +00:00
Eric Leese 0769db92d4 Revert "Deduplicate tabs with same URL"
This reverts commit 559b867f57.

Reason for revert: Blocking autoroller due to broken test.

Original change's description:
> Deduplicate tabs with same URL
> 
> Opening the same file in multiple workers results in only one copy
> open. Further deduplication work in the BreakpointManager results
> in disabled breakpoints being visible in all workers.
> 
> Bug: chromium:670180
> Change-Id: I57c7cf2aab46dcc2dc9d6622819df55bdd75d0a2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107522
> Commit-Queue: Eric Leese <leese@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

TBR=yangguo@chromium.org,szuend@chromium.org,leese@chromium.org

Change-Id: I4d91c5f1a7d66a4b18cb12b23f17107091de7004
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:670180
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2116435
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
2020-03-23 22:51:51 +00:00
Eric Leese 559b867f57 Deduplicate tabs with same URL
Opening the same file in multiple workers results in only one copy
open. Further deduplication work in the BreakpointManager results
in disabled breakpoints being visible in all workers.

Bug: chromium:670180
Change-Id: I57c7cf2aab46dcc2dc9d6622819df55bdd75d0a2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107522
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-03-23 12:29:31 +00:00
Tim van der Lippe 18f0489a60 Reland: Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by
the method performSearchInContent.

Layout tests were disabled:
https://chromium-review.googlesource.com/c/chromium/src/+/2096995

CL to fix and re enable tests
https://chromium-review.googlesource.com/c/chromium/src/+/2096018/


Bug: 1011811
Change-Id: I76415076366d748ed0b4fe6ff32c73bae0db1312
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097337
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-17 12:12:17 +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
Simon Zünd b4c9ea79e7 Revert "Move ContentProvider.js and StaticContentProvider.js to text_utils."
This reverts commit ba56abb36c.

Reason for revert: Breaks two layout tests:
https://ci.chromium.org/p/devtools-frontend/builders/ci/DevTools%20Linux/739

The Try bot also caught this for this CL but was green for some reason.

Original change's description:
> Move ContentProvider.js and StaticContentProvider.js to text_utils.
> They used to live under common.
> 
> This is to avoid the dependency from common to text_utils caused by the method performSearchInContent
> 
> Bug: 1011811
> Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
> Commit-Queue: Jose Leal <joselea@microsoft.com>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

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

Change-Id: Ie8c99b77123e916d9f0cde73339f9cac22fff3ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2095308
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-03-10 06:29:38 +00:00
Jose Leal Chapa ba56abb36c Move ContentProvider.js and StaticContentProvider.js to text_utils.
They used to live under common.

This is to avoid the dependency from common to text_utils caused by the method performSearchInContent

Bug: 1011811
Change-Id: Ic6ccb32d8c18abda7b259ca14bafca4c7c2003ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2090785
Commit-Queue: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-10 00:33:29 +00:00
Tim van der Lippe 00d4ce380f Fix usages for Common.DeferredContent typedef
This typedef could not live in `common.js`, as it was referenced in
files in common/ itself.

Bug: 1006759
Change-Id: If058bde3ab0d0ad2b2474ae522391c4f61cdfc71
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2056482
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-02-14 15:21:06 +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
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 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 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
Tim van der Lippe 83f02be257 Standardize license headers
Many of the license headers were incorrect or corrupted. To prepare for
a check that verifies correct license headers are added to source code,
we should fix up the existing license headers to use the correct format.

The license headers that include non-Google/non-Chromium authors are
left as-is.

Change-Id: Iab9bdc41d815ac7ab07ccacf44818f3b56a75230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016745
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-01-23 13:00:41 +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 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
Simon Zünd 1facecf39e [cleanup] Replace {pushAll} helper with {push} plus spread operator
Change-Id: I5c91ff89ff69090db8a3cfaf326a5308d23d6ca7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003312
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-01-16 10:23:34 +00:00
Simon Zünd 308c74fe73 Remove SimpleView.syncToolbarItems and use async variant instead
The ScriptOriginPlugin uses source mapping to resolve a UISourceCode to
a script in order to display a toolbar item for that script. As source
mapping will be asyncified the UISourceCodeFrame needs to provide its
toolbar items in an async way.

Luckily, UI.SimpleView has both a async and non-async version for
sub-classes to provide toolbar items. This CL replaces all uses of
the non-async version with the async version and removes the
non-async version from the interface alltogether.

R=sigurds@chromium.org

Bug: chromium:1032016
Change-Id: Ifce141ccf17bbce3493cb5ffb16aa6874abfe413
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981624
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-01-16 07:18:34 +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
Jan Scheffler 0027820ae2 Add coverage information to status bar
This patch adds a new statusbar item to the sources panel
to inform developers about the coverage of the current file
or to open the coverage panel if no coverage has been reported yet.

https://imgur.com/a/axWRJvJ

This cl depends on crrev.com/c/1955587 to disable tests.

Fixed: 1022013
Change-Id: Ibd57bc6fa8a0730574abe8e009f67b245f43d0e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1905828
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
2019-12-09 14:06:22 +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 99e59b8c29 Migrate Runtime.js to ESM
Introduce a new namespace "Root" to be able to disambiguate between
Runtime the namespace and Runtime the object.

roll CodeMirror
The above line is necessary to fix the presubmit, which complains
about CodeMirror changes. This is only updating a type reference.

Bug: 1006759
Change-Id: I04941d9f18649701060e3035f7eeb2ef3abb51e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829708
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#701257}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 17cc008cf6ad28c6e8c07c638a1b380ca30e7f79
2019-09-30 20:00:59 +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 ffa7862d4e Update Closure compiler to v20190729
The new compiler caught a lot of pre-existing issues in the codebase.
Sadly, the old compiler version was not smart enough to understand the
new changes. Therefore, the changes have be included in the same CL as
the compiler update.

Most of the changes are related to better handling of prototype and
class inheritance, as well as handling of null/undefined tracking.

Change-Id: I3941a3a240a4d09c4945e1e20d2521090ef837c9
Bug: 991710
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762081
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@google.com>
Auto-Submit: Tim van der Lippe <tvanderlippe@google.com>
Cr-Original-Commit-Position: refs/heads/master@{#696761}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ca93474213278e32e36d6ace1474c56884030757
2019-09-16 12:07:12 +00:00
Alexei Filippov 6c89282a54 DevTools: Make line level profile support memory annotations.
BUG=937880

Change-Id: Ib222ad6cddf23b0f28863e75f1bc729e638c6ee4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1504460
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#638307}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f1092ff4c5a57d39196c4821a623d12df03b80d4
2019-03-06 22:30:42 +00:00
Joel Einbinder 7fbe24c094 DevTools: Convert to Shadow DOM and Custom Elements v1
Bug: 685385
Change-Id: I027e84d8003b7799492211d5fcf8348cd91fd799
Reviewed-on: https://chromium-review.googlesource.com/c/1422962
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#625513}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b00e6ea1c9b4db5d743c7c204b1f63abf89e0398
2019-01-24 05:19:01 +00:00
Alexey Kozyatinskiy d91714258d DevTools: show origin url for anonymous scripts
R=lushnikov@chromium.org

Bug: chromium:646849
Change-Id: I8141bcdcfef7d9734ee9f1c97bfa552160fdcd9d
Reviewed-on: https://chromium-review.googlesource.com/1182865
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#586149}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc09ed9dfa66c1c27020fafe36c07601b947d2ad
2018-08-25 21:39:58 +00:00