Commit Graph
19 Commits
Author SHA1 Message Date
Christy Chen e936c00ec7 [Loc] Migrate source_frame to localization V2
Migrate source_frame directory
en-XL: https://imgur.com/a/WOKixNs


Bug: 1136655
Change-Id: I9266985045a7068b0d1ae8a8a371f7e84a5171b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2648577
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2021-01-27 07:55:44 +00:00
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 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
Simon Zünd e3a936941c TypeScript-ify ui/SearchableView.js
R=tvanderlippe@chromium.org

Bug: chromium:1011811
Change-Id: I29fa6cfa60cf2dc23a5a6ba96c5a0ce9e6336ebe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2549600
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2020-11-19 10:59:53 +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
Andres Olivares c2d30bd803 [ts] Typecheck source_frame/ResourceSourceFrame.js with TypeScript
Bug: chromium:1011811
Change-Id: I8a251207b3a6d160df2b5b06880af7b535f34fa3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2497146
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2020-10-27 16:14:48 +00:00
Jan Scheffler 4a89ed360b [TypeScript] Migrate front_end/source_frame to devtools_entrypoint
R=aerotwist@chromium.org, jacktfranklin@chromium.org

Bug: 1101738
Change-Id: Id6d460cd1e37ee2b4096e90ab02a8c797343171e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2318385
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-07-29 16:42:54 +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
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 2543c5cbff Migrate source_frame/ to import cross-module
Bug: 1006759
Change-Id: I4e81d6c4f3e75646b5fbd6fb8cfb3df3babed87a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035940
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-02-04 13:06:21 +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
Paul Lewis aa437a5f71 Migrates source_frame/ to ESM internally
Bug: 1006759
Change-Id: Ie0c5a2a815806f49e40d089ed8bae729c3846b20
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002594
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-15 17:01:54 +00:00
Tim van der Lippe b88663fc59 Migrate source_frame/ to ESM
Bug: 1006759
Change-Id: Ibcff1093ef7b7a4a9f4a94a1d75f900b8ab2d88f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1903473
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-09 19:29:23 +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 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
Joey Arhar 19e85ccca5 [DevTools] Add binary websocket message viewer behind experiment
Screenshots: https://imgur.com/a/0rtukft

Bug: 605262
Change-Id: I1049d2196e51193419b9dd7ebbe7105a8655a631
Reviewed-on: https://chromium-review.googlesource.com/c/1321570
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#627166}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9eb859773e133754b856482a4b6ea79ba39412fe
2019-01-29 22:07:02 +00:00
Ingvar Stepanyan 1c77184338 Fix places not checking whether content is base64
This fixes up some places in code that ignored `encoded` flag from the
result of `Network.getResponseBody` and similar CDP commands, instead making
own assumptions based on "common sense" (whether it's text content type,
whether it can be parsed as-is and so on).

This works fine for Chromium either way because it upholds these assumptions,
but technically it's a violation of the protocol and makes devtools app
easily incompatible with other CDP implementations.

Change-Id: Ifbd3ad487e6f39a75795b362cc3828466ba4f775
Reviewed-on: https://chromium-review.googlesource.com/c/1230042
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#598318}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5b046432f18e81cc58d32191c8a8ad150c8b74ad
2018-10-10 14:35:08 +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