Commit Graph
1236 Commits
Author SHA1 Message Date
Kateryna Prokopenko accc9959c9 Type path and URL variables in part of panels/ to Branded Types
Bug: 1299786
Change-Id: Ifddd6b24407ff35c00287e28b971a84962065cf5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629864
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-05-11 14:26:46 +00:00
Kateryna Prokopenko 39b88f8c2e Type all path and URL variables in ui/components to Branded Types
Bug: 1299790
Change-Id: Ic9534e960c531b1027d8e4baa98364f16255fb63
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629863
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-05-11 14:13:22 +00:00
Saba Khukhunashvili b6327d5184 DevTools: Tidying up the styles context menu
This CL changes ordering and adds two section in styles context menu to match the UI that was proposed in crbug.com/1317596.

Screenshots
Before making the changes: https://screenshot.googleplex.com/5BfmGY5fsUnrRh8
After: https://screenshot.googleplex.com/3JQHVV2DF5xUtKV

Bug: 1317596
Change-Id: Id29bf33245087b247e5e7df88c33b158921f1048
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629866
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Saba Khukhunashvili <khukhunashvili@google.com>
2022-05-11 12:31:02 +00:00
Jack Franklin 8920120bff Remove "Interactions=>Input" swimlane in Performance Panel
Fixed: 1324090
Change-Id: I7eed96829032e45addc9960abf3cb7d538ab12ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3635178
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2022-05-11 11:42:15 +00:00
Kateryna Prokopenko fbb2247690 Type all path and URL variables in ui/legacy to Branded Types
Bug: 1299791
Change-Id: I3648366445238aeb30fa699556fa9d9a4ee937e6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629859
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-05-11 09:39:12 +00:00
Jaroslav Sevcik 481104acc0 Expose and test scope tree parser
This patch exposes the scope parser for wider use so that we can
reuse it for resolving source map names in scope view.

The parser is currently only exercised by several newly introduced
unit tests.

Bug: chromium:1322115
Change-Id: If3ffe0e87cac7e0cb557f60e83d9266193adde73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3624642
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-05-11 09:00:52 +00:00
Kim-Anh Tran 236603bacb [BreakpointManager] Make removing breakpoints awaitable
This CL removes a race that may happen if PersistenceImpl tries to
move a breakpoint from one UISourceCode to another UISourceCode by
explicitly awaiting the calls to remove/setBreakpoint in
PersistenceImpl.

The race happens in the following case (affecting snippets):
* A snippet is created, and the user sets a breakpoint and reloads
  the page.
* PersistenceImpl.ts will try to move the breakpoint via
  1. removing the breakpoint from the old UISourceCode, and
  2. re-setting the breakpoint on the new UISourceCode.
* Simultaneously, the BreakpointManager tries to set a breakpoint
  on the new UISourceCode
* For snippets, the url stays the same after reloading, and in some
  cases the `setBreakpointByURL` of the PersistenceImpl and the
  BreakpointManager will be sent to v8 one after another, such that
  v8 returns a ServerError, as it has already set the breakpoint
  previously

This race causes the breakpoint to completely disappear, since
DevTools front-end removes the breakpoint if it sees a ServerError.

Drive-by: Added additional clean up step to tests.

Bug: 1280621
Change-Id: I7c9cd94c02d80661100cc5c5141e7d0dbb027f6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629862
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-05-10 10:13:21 +00:00
Nina Satragno nsatragno@chromium.org 519350816e [WebAuthn] Add large blob toggle
Add a toggle that enables / disables large blob support for WebAuthn
virtual authenticators. This feature has been long supported by the
devtools protocol but we hadn't surfaced it on the front-end.

Large blobs are only available for resident-key enabled authenticators,
so we disable the checkbox if that option is not selected. Also, large
blobs require CTAP 2.1.

Fixed: 1321803
Change-Id: Ic1654276ba5a39ddd8943cd8689978117546e70e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3625237
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
2022-05-06 14:35:08 +00:00
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
Jaroslav Sevcik 04a58f2837 SourceMapManager: resolve relative urls with frame's URL
Instead of trying to set inspectedURL for child targets (which might
confuse extension server), we just lookup the containing frame's url
locally in the source map manager whenever we need it for resolving
relative paths.

This might flush race problems (because inspectedURL is set
asynchronously after receiving getResourceTree response), but such
problems were there before. They are not easy to fix without
redesigning how we index source maps in source map manager's
internal data structures (and they are even harder to repro
and test).

Bug: chromium:1305475
Change-Id: I9e9b67ca1353b4707542f3931db0aef821c00f41
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613885
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
2022-05-04 06:44:09 +00:00
Paul Irish 0567b73fec Performance: Trace the default categories when Show All Events
experiment is enabled.

Currently, this experiment reveals a few more events that
were not allowlisted. But this change will expand the tracing category
selection to all non-high-overhead categories.

Driveby: fix undefined property exception.

Change-Id: I236aad44e40724d82d8c37055686e03148059d2b
Bug: 1321307
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3616460
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Irish <paulirish@chromium.org>
2022-05-04 00:10:58 +00:00
Jack Franklin e839c0cf22 Enable long import wrapping for JS imports
DISABLE_THIRD_PARTY_CHECK=big clang format run against all files in
front_end and test/

Bug: 1319340
Change-Id: I1fff63cb07544ccd0e3059fc901f9a48ff4af13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598879
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2022-05-03 10:22:12 +00:00
Kim-Anh Tran 9d3d33e0bd [timeline] Always use fallback information for text location
Use fallback cases when showing the script location in
`buildDetailsTextForTraceEvent`.

Currently, we use the UILocation if existent (which is only
the case, if we have already parsed the `scriptId` of the Timeline
Event. If this has not been the case, it fell back to using
either the top frame, or nothing).

This CL changes this code to always use the fallback, instead
of trying to resolve the location:

1. This is both flaky on the tests (if crbug.com/1318635 is fixed
with https://crrev.com/c/3613395), and can be observed by the
developer as it is time dependent.
2. As is, there has been a backend bug (crbug.com/1318635) which
never sent the correct `scriptId` (int instead of string) for
stack traces anyway, so we used the fallback for that case, and
that is reflected on many layout tests as well.
3. Normally we try to use the live location using the script, but this
particular code produces not a link but a text, and is only used
for WebSocketDestroy events and the layout test infrastructure.
4. Setting it to default to the information we have, is deterministic.

Bug: 1318635
Change-Id: I5078d18d92d8b60d8c8d4253efe07f7527bb3c19
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613875
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-05-02 11:49:56 +00:00
Philip Pfaffe 63c982bd16 Synchronize breakpoints for language plugins as well
Bug: chromium:1229541
Change-Id: Ifb87690664615f3a7c2452bb70619fd743bb0d77
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3581033
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-04-29 13:18:03 +00:00
Philip Pfaffe d0a07d4ef7 Flush settings before tests with real connection
Otherwise, for example previously set breakpoints leak across tests.

Bug: none
Change-Id: I395995b4a3068f66ad1d358a32294f97b72f23d4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613874
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-04-29 10:37:18 +00:00
Ari Chivukula a68cb30948 [i18n DevTool Deprecation Issue] (16) Cleanup Deprecations {DEVTOOLS}
At long last, we can remove the old unused fields now that no
deprecation messages are untranslated.

This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Migrate DeprecationInfo::* {CHROMIUM}
(13) Roll deps
(14) Migrate DeprecationInfo::* {DEVTOOLS}
(15) Cleanup Deprecations {CHROMIUM}
(16) Cleanup Deprecations {DEVTOOLS}
(17) Final documentation tweaks

DISABLE_THIRD_PARTY_CHECK=Fields are being removed, so we have to touch non-gen code

Bug: 1264960
Change-Id: If5a286a50cafc073ff99f5e0d8f3d38d5e8ba83a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613607
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
2022-04-28 11:45:32 +00:00
Wolfgang Beyer d939ee8ddb Fix local overrides for redirects
When DevTools is intercepting and overriding the response to a request,
this response should have a response status of 200 (and not the response
status of the original response).

If body, headers and a redirect response code are sent to the backend
via `Fetch.fulfillRequest`, the response code will take precedence and
the response will be redirected instead of overridden.

Fixed: 1320400
Change-Id: Ib306369c67471f871425d2a1bbafe80cbb881d1f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610172
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2022-04-28 10:34:24 +00:00
Kim-Anh Tran facefdbfe3 [unittest] Add test for synchronizing on instrumentation break
This adds a test for checking if the functionality of
`restoreBreakpointsForScript` in the BreakpointManager. This function
is used in order to synchronize breakpoints on instrumentation
breaks.

Bug: 1229541
Change-Id: I56d33acf329da03948b612c4e003e996302497bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598877
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2022-04-27 10:19:48 +00:00
Jack Franklin 9453fb7264 Add tooltip for clear button on toolbar input.
Fixed: 1318767
Change-Id: I679fac273c4df9febfa8329c965d09a096237c22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3605264
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-04-26 12:35:17 +00:00
Johan Bay c24f1ea3e5 Fix missing children in accessibility tree
This CL changes the heurestics for how we filter treeoutlines with the
following changes:
1. if a tree nodes ends up with no children after filtering, we ignore
the filter and show the hidden leaf nodes.
2. if a tree node is already expanded, it cannot afterwards be flattened
away.

Bug: 1311583
Change-Id: Ia4bcb6aa83948f0f6409a015ab2f0ec76f3431ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607829
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-04-26 11:09:37 +00:00
Ari Chivukula abb1e67b86 [i18n DevTool Deprecation Issue] (10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
This CL ports the new issues into the translated deprecation flow! We
finally have non-example translations ready to go :-)
For the source of the strings see:
https://chromium-review.googlesource.com/c/chromium/src/+/3597476

This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Translate more Issues ...

DISABLE_THIRD_PARTY_CHECK=This will be removed when not stacked
Bug: 1264960
Change-Id: Id5853ac2e48d3300fac4b4224abf76f7d33c7117
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3600576
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
2022-04-22 15:27:34 +00:00
Ari Chivukula 69f125d55c [i18n DevTool Deprecation Issue] (9) Roll deps
./scripts/deps/roll_deps.py ~/chromium/src ~/devtools/devtools-frontend
npm run generate-protocol-resources
I also fixed compile issues due to the removal of constants from
AttributionReportingIssue which is why non-gen files were touched.

This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Add milestone and status links
(7) Document milestone and status links
(8) Migrate DeprecationInfo::WithDetails {CHROMIUM}
(9) Roll deps
(10) Migrate DeprecationInfo::WithDetails {DEVTOOLS}
(11) Document changes in development process
(12) Translate more Issues ...

DISABLE_THIRD_PARTY_CHECK=Fixes to AttributionReportingIssue

Bug: 1264960
Change-Id: I9b73f60d2cd56bced19e908a761b3d90ad940c46
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3600575
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-22 06:18:57 +00:00
Wolfgang Beyer 81477453b5 Fix local override filename handling for special characters
This CL fixes local overrides for URLs which contain special characters.
When a resource is saved for overrides, a local path and filename are
generated from the resource's URL. Because not all characters are
allowed to be used in filenames, these characters need to be escaped
(via URL-encoding). The most common cases are '?', which is used for URL
query params and ':', which is used for the port number. Both '?' and
':' are not allowed within file names on Windows OSes.

Previously, DevTools was hiding this complexity of encoded file names
from the user by decoding the file names for user-facing strings. This
could lead to unexpected behaviour, e.g. when renaming files for which
the actual filename does not match the user-facing filename. With this
CL the actual (encoded) filename is shown to the user.

Bug: 1308257
Change-Id: I0303af33502e4e5768e0ccdb44d495b6a2b62190
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3579160
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-21 14:30:36 +00:00
Benedikt Meurer 4fa82285f4 [CodeMirror] Upgrade to CodeMirror.next 0.20.0
Bug: 1241848, 1215072
Change-Id: I21bc62922c5b8c9d4033ba411924cd641b091e3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598871
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-04-21 09:50:46 +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
Andres Olivares 8b58098c83 Restore Interactions lane in the Performance panel
This adjusts the front end code that draws the lane in the panel to
support the current shape of the LatencyInfo trace events. These trace
events have changed considerably since 2+ years ago.

Note that I have other tests for the data generation at https://crrev.com/c/3594760

The changes in the trace events are documented in https://docs.google.com/document/d/1JRNbKli4TWZZFk3CYhXMcRTQ_69x5YFgmIuna_gcF_E/edit?usp=sharing

Bug: 1317621
Change-Id: I6a9bc585ae38a9f3551bf59c8fe45993543f3adc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3583855
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-04-20 15:17:46 +00:00
Wolfgang Beyer bd395465a4 Split i18nString into 2 separate i18nStrings
Move some logic from the i18nString into code, because 2 separate
plurals cannot be handled in a single i18nString.

Fixed: 1317609
Change-Id: I1d17d7c223a7c1109556e6941d461558c55d6f6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3596240
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-04-20 14:29:16 +00:00
Jack Franklin 311b4a28a0 De-prototype #deepActiveElement
Removes `deepActiveElement` from the prototype and defines a util for
it.

Bug: 1050549
Change-Id: I0376ba0b3a00d82c070f2d4ada12350771046790
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3586910
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-04-19 11:12:54 +00:00
Danil Somsikov dbc9960581 Support desrcibe.only in presence of describeWithRealConnection
Bug: 1314274
Change-Id: I8dc155f26d2024c303ecddcfe9cc3576270631ad
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3586907
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-04-19 09:48:36 +00:00
Ari Chivukula dbd0d70a08 [Deprecation Issues] Test Aggregation
We weren't testing aggregation of deprecation issues before and this was
causing breaks: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3587009

Bug: 1264960
Change-Id: Ib8a387457bdd80a1ac455f8c7b02cd8f276f10b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3587163
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-19 06:41:54 +00:00
Danil Somsikov 97beef3c3d Setting fileSystemPath and ...BaseURL in createUISourceCode and also
using it in the NetworkPersistenceManager_test.

Bug: 0
Change-Id: I97f6876ef6939fd8e32dd0f90e8351ab07ce5f67
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3565999
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
2022-04-13 14:26:10 +00:00
Changhao Han 11ea97109b Add state dot to :hov
Bug: 1314299
Change-Id: If23b29d85e8394a18fda3db604e891373a9e268b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3584109
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-04-13 13:33:00 +00:00
Changhao Han d3fd17be70 Prioritize click over drag for <length> component
Bug: 1264619
Change-Id: Ia2735692197354feb8f9d1b737d2d922f7f29b39
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3581875
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2022-04-13 09:10:50 +00:00
Changhao Han def2a3d275 Remove copy changes button in Styles pane and add at-rules copy
Bug: 1313707, 1268754
Change-Id: I62ebdce1f869f466790526d332443c60aaf206ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3581759
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-04-12 06:16:31 +00:00
Michael Liao 6616b9f0cd [CodeMirror]: Re-implement formatting logic for CSS
This change re-implements some removed code from this CL: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3395675

Issue:
- Formatting code was removed to remove dependencies on CodeMirror5
    - Caused regression in formatting regarding workspace syncing (pictures in linked issue)

Changes:
- Add new cssStreamParser method onto CodeMirror6 which retrieves a legacy CSS stream parser
- Re-add CodeMirrorUtils.ts to provide createCssTokenizer function
- Re-add code deleted from regressing CL for CSSProperty.ts

We initially removed the dependency on CodeMirror5 here to improve launch times. This change should not regress that as CodeMirror6 should already be imported before any code here can execute.  Additionally, the extra import of the CSSStreamParser should be minor enough to ignore.

Change-Id: I642da3de1c1788d5258b12d069534179efa2fd65

Bug: 1309588
Change-Id: I642da3de1c1788d5258b12d069534179efa2fd65
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3551896
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Michael Liao <michael.liao@microsoft.com>
2022-04-08 22:15:26 +00:00
Victor Porof bace714649 Fix a regression where sourcemaps contain duplicate entries
In some situations, webpack generates two sources: one is the actual
input file, the latter is some intermediate code. However, both could
have the same URL (the ./ is stripped off).

This fix makes Chrome DevTools match the behavior in other browsers.

Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1304217
Change-Id: I42dffbc2cedffc4fba1fd3efc0a2df093389cdea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575933
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2022-04-08 12:31:36 +00:00
Changhao Han 34c39bcabc Add basic structure for rendering shortcuts
Bug: 1314299
Change-Id: I45d7b66ac04d21404bfedac7e6d738694f628ebc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3575945
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-04-08 10:53:37 +00:00
Yang Guo cbe0e6e595 Evaluate snippets with user gesture
R=bmeurer@chromium.org

Fixed:1308771
Change-Id: I31be17c9ce618e989a0af68b4c93fc3e9ace9911
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3574568
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
2022-04-06 13:25:24 +00:00
Andres Olivares fe2954c5a7 Add tooltips with description to console checkbox settings
Some labels of the checkboxes in the console settings didn't have titles
that explained the setting with a tooltip. This CL adds them for those
that were lacking.

Took the opportunity to introduce a helper function to extract and
remove redundant code.

Fixed: 1246785
Change-Id: Ic64234f580d137e739d80988a924533991fbe1b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3568993
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-04-05 18:04:23 +00:00
Kateryna Prokopenko 768dea3c3c Partly type path and URL variables in files in panel/ to Branded Types
Bug: 1299781
Change-Id: I8c3b9a0131f94c3e129ec966bd457d5efb2a9b22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563072
Reviewed-by: Eric Leese <leese@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
2022-04-05 11:19:55 +00:00
Danil Somsikov 13c16a82dd A unit test for the change to NetworkPersistenceManager from crrev.com/c/3165098
Bug: 1239919
Change-Id: I1eb353abb17ea627b1069a165e2224ddcc626c68
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566001
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-04 08:29:02 +00:00
Simon Zünd e546712d0c Fix host bindings
The CL https://crrev.com/c/3565361 added a method to the host bindings
stub to reset the cached stub data. This does not really work as we
explicilty check on the C++ side that the host bindings are fully
implemented.

This CL is a forward fix that moves the resetting out of the
bindings stub. The `#urlsBeingSaved` Map is not cleared, given
that its in-accessible by the outside anyway.

Roll failure: https://crrev.com/c/3564055.

R=dsv@chromium.org

Bug: None
Change-Id: I94fb41ded43540b742883b96b358f3d3b727dfac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563073
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-04-01 11:25:43 +00:00
Changhao Han ced8121dfd Include custom properties in CSSRuleParser
Bug: 1268754
Change-Id: If21278e5e5eb52626d6d02054509664d8fdf1257
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563071
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-04-01 10:15:11 +00:00
Simon Zünd cbfa6b8665 Migrate issue/UMA e2e test to unit test
The migrated e2e test was not really checking a user story but a
specific behavior of the IssuesView: Does the view record an UMA
event when an issue is expanded. We can test this behavior less
flakily with a unit test.

Drive-by: Share metrics assertion helper.

R=dsv@chromium.org

Bug: None
Change-Id: I576847113592cc33b83d651d06cf5baac8f01db1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3565362
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-01 08:57:01 +00:00
Simon Zünd d63ffc77ad [unittest] Reset stub host bindings between tests
Unit tests run in hosted mode which utilizes a stubbed out
implementation of the host bindings. Most host binding stubs are no-ops
but some record invocations in internal state.

This CL resets the stub state before each test.

R=dsv@chromium.org

Bug: 1306830
Change-Id: Id298a8d3b005346967d5c1d9bf1d3beda57be82b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3565361
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-01 08:19:41 +00:00
Benedikt Meurer d60604f36c [core] Fix type errors and add tests for ParsedURL.
The `user`, `host` and `port` fields of `ParsedURL` had type violations
where those fields claim to contain strings always, but the regexp
results array might contain `undefined` in some cases.

Also migrate some missing tests from parsed-url.js web test, which is
now 100% redundant and will be removed (https://crrev.com/c/3563065).

Bug: chromium:1311921
Change-Id: Ic08652a6b72d0d8e2e16b4ac92907fbef6b2f5cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563398
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2022-03-31 18:16:30 +00:00
Ari Chivukula 32461347cb [i18n DevTool Deprecation Issue] (4) Translate demo Issue {DEVTOOLS}
This CL adds support for translated issues in devtools_frontend.
The next step is to document (5) and start translating issues (6).

This CL is part of a series:
(1) Remove legacy info
(2) Translate issue title
(3) Translate demo Issue {CHROMIUM}
(4) Translate demo Issue {DEVTOOLS}
(5) Document new deprecation process
(6) Translate more Issues ...

Bug: 1264960
Change-Id: I5813a3b6ff5649dc78144a0f92f20480fa069634
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3561186
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-03-31 17:02:40 +00:00
Danil Somsikov 1e9489dca2 A unit test for the change to ObjectPropertiesSection from crrev.com/c/3404092
Bug: 1289120
Change-Id: I2756ab961bbfa42a9b47737c2f821d2bc24bb017
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3563399
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2022-03-31 16:51:41 +00:00
Changhao Han 573dfc1cca Add copy button in the Changes tab
This CL also moves the formatting function from StylesSidebarPane to
panels/utils, which can be shared between the Styles pane and the
Changes tab.

Bug: 1268754
Change-Id: I172a6a8d247c8326d67e1f6342a4d9bd91f1557a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3560436
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Johan Bay <jobay@chromium.org>
2022-03-31 13:10:50 +00:00
Benedikt Meurer 02de12c839 Fix normalization for URLs that contain optional user part.
When passing a URL as href to `ParsedURL.completeURL()`, we'd take it
apart to normalize the path and strip off user and password parts. But
in those cases where the URL contained the optional user part, we didn't
do the math correctly for reconstructing the query and fragment part,
and instead ended up duplicating the tail of the original href. This CL
addresses the issues and guarantees that we always reconstruct a valid
URL.

Note: The stripping of the optional user part is consistent with Firefox
DevTools. So 'webpack://@scope/...' turns into 'webpack://scope/...' in
both DevTools consistently.

Fixed: chromium:1309854
Bug: chromium:1284737
Change-Id: I45224265e7d6cc83f836fafc516e71434e9ba402
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3560422
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2022-03-30 20:04:10 +00:00