Commit Graph
413 Commits
Author SHA1 Message Date
Tim van der Lippe 1009500fe4 Reland "Move rollup configuration to front_end/rollup.config.js"
This reverts commit 696a03e075.

Reason for revert: Chromium build performance issues should be mitigated.

Original change's description:
> Revert "Move rollup configuration to front_end/rollup.config.js"
>
> This reverts commit 11c3e48f98.
>
> Reason for revert: Has a negative performance impact for Chromium builds
>
> Original change's description:
> > Move rollup configuration to front_end/rollup.config.js
> >
> > This makes it easier to change the rollup configuration and allows
> > us to introduce the terser minification plugin.
> >
> > R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> >
> > Bug: 1084578
> > Change-Id: Ie9c3447913a9d6ca59905267472a8bad328642b2
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208134
> > Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: 1084578
> Change-Id: If359d1398796330e8569a1ecf0af9d94ad08abae
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218065
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

# Windows presubmit is broken: crbug.com/1095581
No-Presubmit: true
Bug: 1084578, 1095581
Change-Id: I4a96fc91bc5c6e1394535dd2c5e413ecadfdcf3d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2246509
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-16 11:45:18 +00:00
Alex Rudenko 0697f50b6b Filter out internal CSS properties
Internal CSS properties should not be visible anywhere so this CL
removes them from the generated files to reduce the file size.

Fixed: 1092826
Change-Id: I0b4d4694a40bef8444b06eb0578185f60651633a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2245143
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-06-15 14:29:42 +00:00
Tim van der Lippe 931cc8450e Revert "Add rollup_entrypoint to rollup entrypoints in front_end"
This reverts commit 9f16ccc6a1.

Reason for revert: Fails in Chromium roll: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8877691983703106912/+/steps/compile__with_patch_/0/stdout

Original change's description:
> Add rollup_entrypoint to rollup entrypoints in front_end
> 
> To support lit-html in a release build, we have to run rollup
> separately. Since lit-html source code is targeted to TypeScript,
> the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
> file.
> 
> This means that we can't use `build_release_applications.py` to rollup
> this file (this is by design). Instead, we introduce a new
> `rollup_entrypoint` Ninja target that calls Rollup. We don't have to
> write a special Python file, as we can reuse `node.py` for this, which
> is essentially a pipe-through with a pinned version of Node.
> 
> While the rollup build works, for debug builds we are still missing
> the `front_end/third_party/lit-html` files. We will address that
> in a follow-up CL, once we introduce the first usage of lit-html
> in the codebase.
> 
> We are going to need to make more changes to Rollup later (most notably
> the external files check), but since we aren't using this codepath
> in `build_release_applications.py`, I will fix that in a separate CL.
> 
> To reduce duplication in the Ninja build system, I also extract
> a vars.gni file that has the relevant variables. These are currently
> used in the rollup.gni and typescript.gni.
> 
> Lastly, I had to fix node.py to make sure it wouldn't always print
> the stdout. In Ninja, we should only print to stdout if there is
> an error.
> 
> DISABLE_THIRD_PARTY_CHECK=Ninja fixes
> R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> 
> Bug: 1011811, 1061037
> Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

Change-Id: Ida2a1e30d601e87f64a7c35bbc527c700d9cbe70
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1011811, 1061037
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2243175
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 14:48:09 +00:00
Tim van der Lippe 9f16ccc6a1 Add rollup_entrypoint to rollup entrypoints in front_end
To support lit-html in a release build, we have to run rollup
separately. Since lit-html source code is targeted to TypeScript,
the entrypoint front_end/lit-html/lit-html.ts is a TypeScript-authored
file.

This means that we can't use `build_release_applications.py` to rollup
this file (this is by design). Instead, we introduce a new
`rollup_entrypoint` Ninja target that calls Rollup. We don't have to
write a special Python file, as we can reuse `node.py` for this, which
is essentially a pipe-through with a pinned version of Node.

While the rollup build works, for debug builds we are still missing
the `front_end/third_party/lit-html` files. We will address that
in a follow-up CL, once we introduce the first usage of lit-html
in the codebase.

We are going to need to make more changes to Rollup later (most notably
the external files check), but since we aren't using this codepath
in `build_release_applications.py`, I will fix that in a separate CL.

To reduce duplication in the Ninja build system, I also extract
a vars.gni file that has the relevant variables. These are currently
used in the rollup.gni and typescript.gni.

Lastly, I had to fix node.py to make sure it wouldn't always print
the stdout. In Ninja, we should only print to stdout if there is
an error.

DISABLE_THIRD_PARTY_CHECK=Ninja fixes
R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1011811, 1061037
Change-Id: Ib22ff9c1d78e61c922101444f27c4f0d4ccf9bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238232
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 13:09:06 +00:00
Yang Guo 96aaa36f93 [build] check return code after rollup
R=tvanderlipp@chromium.org

Change-Id: Iea9561c4aab141075e10c94c1ea04dac72a63131
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2241681
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-12 10:24:06 +00:00
Christy Chen 3fa95bc487 [Loc] Update localization documentation
Add some FAQs for Loc V2.

Bug: 941561
Change-Id: I23ce46bc01d567f20764c7de8ccd5d7583e017b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2238608
Reviewed-by: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2020-06-12 00:16:15 +00:00
Mathias Bynens 79e2cf0633 Add stylelint dependency
This also adds CC-BY-4.0 to the list of accepted licenses.

DISABLE_THIRD_PARTY_CHECK=update dependencies

Bug: chromium:1083142
Change-Id: I8612de2fba52dae32eeb71af79d5aacfde52142b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2220097
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2020-06-11 06:20:04 +00:00
Alex Rudenko d13aac9a56 Ignore internal css keywords
Adds filtering of internal CSS keywords to generate_supported_css.py
An internal keyword was added on the blink side[1] which breaks
CSS autocompletion tests.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/2217673

Bug: 1092826
Change-Id: I6aede74affcddd88c1efabd94e2441a9b6ebd8fc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2236403
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-06-09 11:04:09 +00:00
Jack Franklin 1557a1c167 Components dev server
This introduces the components server that we will use to view
components locally.

Design doc:
https://docs.google.com/document/d/1P6qtACf4aryfT9OSHxNFI3okMKt9oUrtzOKCws5bOec/edit?pli=1

Change-Id: I6cd7588f045c3cd46e57f1f44441ffa95f0b70bb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199081
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-08 14:53:56 +00:00
Tim van der Lippe 78f57416d0 Remove debug_devtools flag from devtools-frontend
This removes the build support for debug_devtools, which is replaced
by the runtime flag `--custom-devtools-frontend`.

This depends on https://chromium-review.googlesource.com/c/chromium/src/+/2224216
to land in Chromium first.

DISABLE_THIRD_PARTY_CHECK=Cleanup of build scripts
R=yangguo@chromium.org

Bug: 1087379
Change-Id: I4494e111cab67e752d6dfad83cc9edb90df73a3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224799
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-06-08 11:27:55 +00:00
Tim van der Lippe 0a2971a084 Remove _hasErrorData from AgentPrototype
This field is unused and always false. This means we can remove more code
from InspectorBackend.js and InspectorBackendCommands.js.

R=sigurds@chromium.org

Change-Id: I52155f202765aa66a7dd3e79adf99eb1be7814cb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230524
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-05 12:37:19 +00:00
Tim van der Lippe dfe3e28145 Revert "Typecheck sdk/SourceMap.js with TypeScript"
This reverts commit c9118a78a3.

Reason for revert: Layout test update encovered an actual functional change: https://test-results.appspot.com/data/layout_results/linux-rel/401616/blink_web_tests%20%28retry%20shards%20with%20patch%29/layout-test-results/results.html

Original change's description:
> Typecheck sdk/SourceMap.js with TypeScript
> 
> R=​sigurds@chromium.org,rreverser@google.com
> 
> Bug: chromium:1011811, chromium:1079233
> Change-Id: Ied723f6d952cfe8f40b885f63d36eef6b614ed72
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215850
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Ingvar Stepanyan <rreverser@google.com>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>

TBR=sigurds@chromium.org,tvanderlippe@chromium.org,rreverser@google.com

Change-Id: I3956a020caf198b9f69459f650248837799d72a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1011811, chromium:1079233
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2230504
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-04 10:01:52 +00:00
Alex Rudenko 4f8e4f9344 Reuse blendColors util
This CL extracts blendColors into a new utils file (more lightweight
function utils compared to Color.js) and reuses it in the overlay code.
Also, it adds an exception to eslint module import rules for the
inspector overlay folder because inspector overlay benefits from
granular imports instead of complete namespace imports.

Bug: 1078267
Change-Id: I01ec8f295da8bfac0b57b9dd2661ca9f798de869
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2228514
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2020-06-04 06:23:51 +00:00
Brian Cui 1cc53e02a8 Add --chrome-binary argument to unittest script
This CL adds an optional --chrome-binary argument to the unittest.py
script to use a specific Chrome binary to run unit tests against.
When no argument is specified, the script defaults to the downloaded
Chrome binary from `gclient sync` (same behavior as before).

We'd like to have the option of running unit tests on a Microsoft Edge
executable instead of the default downloaded Chrome executable.

Change-Id: Ice72f129086bcc1da56efa118280532cdbb25fd3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2202628
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Commit-Queue: Brian Cui <brcui@microsoft.com>
2020-06-03 17:32:55 +00:00
Tim van der Lippe c9118a78a3 Typecheck sdk/SourceMap.js with TypeScript
R=sigurds@chromium.org,rreverser@google.com

Bug: chromium:1011811, chromium:1079233
Change-Id: Ied723f6d952cfe8f40b885f63d36eef6b614ed72
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215850
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-06-03 12:26:34 +00:00
Tim van der Lippe 26bb5ad91b Remove logic for downloading a content_shell from npm_test.js
This logic was used to download a content_shell from a remote location
when trying to run a test. However, we should only be using local
versions when running tests.

R=yangguo@chromium.org

Bug: 1087379
Change-Id: I134f007e4fe29ce59e23bf03b176631f19c9555c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224798
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-02 14:16:00 +00:00
Tim van der Lippe 7a78ddbe52 Remove scripts/test/run_e2e.py
It is replaced by `scripts/test/run_test_suite.py --test-suite=e2e`.

Requires https://chromium-review.googlesource.com/c/chromium/tools/build/+/2224815/
to land first.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1088463
Change-Id: I665b03f8f6f9fdb843072fc18aa7322fe17e41e1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2226556
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-06-02 11:59:20 +00:00
Tim van der Lippe 8cc37e6076 Add unused target flag to run_test_suite.py
We need to update the CQ bots to set the `target` flag for e2e-tests
to Release. However, we have to add a dummy flag first to change
the configuration. In a follow-up CL, we will actually start
using this flag in the e2e-test run.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1088463
Change-Id: Iada85d812e1a55b8095f2c4adabfb3a0985877d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224814
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-02 10:59:20 +00:00
Tim van der Lippe 421827d590 Add ninja template for copying to the gen folder
We are doing this so often and the syntax for the `outputs` arg
is difficult to remember, I figured it is better to extract out
a template. This should make it easier to copy-paste from other
BUILD.gn files as well.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1088463
Change-Id: Ic78ee5082ee5eae4e07f7ceeb21842f54dcbaf56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224807
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-06-02 10:38:50 +00:00
Tim van der Lippe 322b5eefc9 Cleanup hosted_mode proxy logic
This logic is unused now, so we can remove it. This will allow us
to remove the require on `utils`, in preparation for the e2e-test
changes.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1088463
Change-Id: Ie2271f4e0dc17f08b8b11860f0fddb1b8b697066
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2224806
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-06-02 10:29:30 +00:00
Tim van der Lippe 696a03e075 Revert "Move rollup configuration to front_end/rollup.config.js"
This reverts commit 11c3e48f98.

Reason for revert: Has a negative performance impact for Chromium builds

Original change's description:
> Move rollup configuration to front_end/rollup.config.js
> 
> This makes it easier to change the rollup configuration and allows
> us to introduce the terser minification plugin.
> 
> R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> 
> Bug: 1084578
> Change-Id: Ie9c3447913a9d6ca59905267472a8bad328642b2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208134
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1084578
Change-Id: If359d1398796330e8569a1ecf0af9d94ad08abae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218065
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-28 11:10:30 +00:00
Tim van der Lippe 800891e5ad Use ESM build for acorn
This uses the `acorn.mjs` ESM build, rather than side-effect importing
it in `formatter_worker.js`. To make sure that Closure still understands
what is going on, we add `_types.mjs` files that describe the structure
for Closure.

To make sure that the unittests still work, Karma can now serve the `*.mjs`
files. The unittests have been updated to also no longer side-effect
importing acorn.

This CL requires https://chromium-review.googlesource.com/c/chromium/src/+/2212124
to land in Chromium first.

Bug: 1011811

Change-Id: I33c93b9cfb0c57b1970a98ecaa323481a4e0d1b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2212165
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-05-27 16:07:17 +00:00
Tim van der Lippe d79d79b838 Fix node_modules/OWNERS file after updating a dependency
We were deleting the file, since we remove the whole `node_modules`
folder. Just like clang-format, we should add it back after
the installation process is completed.

DISABLE_THIRD_PARTY_CHECK=Fix OWNERS file
R=jacktfranklin@chromium.org

Change-Id: Ieb3366160f962db8c6af682d0b186ece941b1031
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218014
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-05-27 15:33:16 +00:00
Jack Franklin 212c527f90 Upgrade to TypeScript 3.9.3
I was hitting a bug in 3.9.2 with the breadcrumbs CL [1] that is fixed
in 3.9.3 via this PR [2]. (I've verified locally that it is fixed).

[1]: https://github.com/microsoft/TypeScript/issues/38535
[2]: https://github.com/microsoft/TypeScript/pull/38577

DISABLE_THIRD_PARTY_CHECK=typescript update


Change-Id: Ia874e5936a5bbf0bf26f751ab746976f71910f25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2218013
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-27 15:13:36 +00:00
Tim van der Lippe 55f7489e8e Fix es_modules_import to handle .mjs files
This is required for the usage of `acorn.mjs`

R=jacktfranklin@chromium.org

Change-Id: I76fe80b1d444b4325c05a896028ba80fce4ad2bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2212167
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-27 12:52:39 +00:00
Brandon Goddard f8f37d164e Automatic Symlinked workflow
This CL introduces an alternate approach to the integrated workflow
that allows users to use a single gclient project to manage both
chromium/src and devtools-frontend.

It also adds a scripts and instructions for how to install as a hook
to ensure that running `gclient sync -D` no longer removes
the symlink to the devtools-frontend when using the integrated workflow

*Note that the hook can be used regardless of using the single gclient
project if the path to the non-symlinked devtools frontend is inserted
in the .gclient project file for chromium/src

Change-Id: I235ff713964fd02d9cec40e07e88e9d7b68dcf16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209366
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2020-05-26 19:38:30 +00:00
Tim van der Lippe b25b1446aa Typecheck sdk/ChildTargetManager.js with TypeScript
This also fixes an issue with the protocol externs to not being
able to handle optional types. The ChildTargetManager would
otherwise not being able to call `detachedFromTarget` in
`dispose`.

R=jacktfranklin@chromium.org

Bug: chromium:1011811, chromium:1079233
Change-Id: Ib5ccf0ff72ee6e954adbb15241dc53dbc7f2e6ac
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215851
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-26 17:11:16 +00:00
vidorteg afc030b08a Fixing console placeholder in properties panel (Elements tab)
$0 is used to reference the selected object in the console, but '$[0-9]+' is
also a special character in GRIT (used for localization), so they cannot
be mixed. The solution is to use a placeholder for $0 in the grds.

Change-Id: I8962261aab202016d6ab34fdea850329a9bf7888
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2175093
Reviewed-by: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Christy Chen <chrche@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2020-05-26 17:00:56 +00:00
Tim van der Lippe 4b342721d0 Use acorn-loose from front_end/third_party
This also required adding a dummy `.d.ts` file. I will send a
PR upstream to add that.

R=bmeurer@chromium.org

Bug: 1011811
Change-Id: I754ce07bd7d06ae39ab689974f77a71338adb48f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2212164
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-05-26 11:09:21 +00:00
Tim van der Lippe 8ea04b09d5 Also copy over integration_test_runner.html in BUILD.gn
This includes `integration_test_runner.html` in the copy action of
`front_end`. We previously ran into issues with the layout test
runners, which was probably because we erroneously removed the
mention of `integration_test_runner.html` in the `devtools_test_files`.

Therefore, remove all logic related to `has_html` and remove
`integration_test_runner.html` from the root BUILD.gn, but not from
the `devtools_test_files` array which is used on CQ.

R=aerotwist@chromium.org

Fixed: 1078770
Change-Id: Id5379903278fcee569662dc986b64d665c40f3e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209101
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-26 10:47:31 +00:00
Tim van der Lippe b12011da35 Revert "Use terser rollup plugin"
This reverts commit f045c636f9.

Reason for revert: Chromium uses `is_debug` for a different purpose and therefore this change significantly increases the build time for engineers working on the DevTools backend. We should gate Rollup behind `is_official_build` instead.

Original change's description:
> Use terser rollup plugin
> 
> Terser can minify variables names and is a smarter minifier than
> the previous regex-based minifier. The regex-based minified only
> removed whitespace and comments.
> 
> This reduces the total size of resources loaded for a fresh load
> of the Elements panel from 3.4MB to 2.6MB.
> 
> It does increase the build time for a release build, but this should
> not have an impact on the development workflow of engineers working
> on DevTools.
> 
> R=​jacktfranklin@chromium.org,aerotwist@chromium.org
> 
> Fixed: 1084578
> Change-Id: I037206da9fe2f3e6148fd814f5af7db78d543cee
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208139
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I96c24f6b4cd5eac5cc2a3807db211b96c3d44576
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2215842
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-26 09:30:51 +00:00
Tim van der Lippe f045c636f9 Use terser rollup plugin
Terser can minify variables names and is a smarter minifier than
the previous regex-based minifier. The regex-based minified only
removed whitespace and comments.

This reduces the total size of resources loaded for a fresh load
of the Elements panel from 3.4MB to 2.6MB.

It does increase the build time for a release build, but this should
not have an impact on the development workflow of engineers working
on DevTools.

R=jacktfranklin@chromium.org,aerotwist@chromium.org

Fixed: 1084578
Change-Id: I037206da9fe2f3e6148fd814f5af7db78d543cee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208139
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-21 11:51:17 +00:00
Tim van der Lippe b4efb6ecad Fix regex for name matching
Package names can include dashes and lower dashes in their name.

R=jacktfranklin@chromium.org,aerotwist@chromium.org

Change-Id: I268fa9931431ad4492b27c5a01a958ea74a0d234
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209087
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-21 11:01:26 +00:00
Tim van der Lippe 97eeaf0176 Add rollup-plugin-terser
DISABLE_THIRD_PARTY_CHECK=Add node_modules
R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1084578
Change-Id: I70e03fa74f53960a17c884a2bac4027382d66525
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208135
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-21 09:47:07 +00:00
Tim van der Lippe 11c3e48f98 Move rollup configuration to front_end/rollup.config.js
This makes it easier to change the rollup configuration and allows
us to introduce the terser minification plugin.

R=jacktfranklin@chromium.org,aerotwist@chromium.org

Bug: 1084578
Change-Id: Ie9c3447913a9d6ca59905267472a8bad328642b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208134
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-21 09:43:27 +00:00
Ingvar Stepanyan 2aa60e27d7 Move wasm_source_map to ES module; update Rust+wasm tools
This is attempt to replace
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208981
with fixes in the Rust source.

As such, it also converts wasm_source_map to ES modules to match
direction of the rest of DevTools codebase and updates the way typings
are handled with a custom ad-hoc to please Closure Compiler.

Bug: chromium:1082720
Change-Id: I028ba5d759ec2a812a663923be107d52d13e2dfb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208141
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2020-05-20 16:20:33 +00:00
Tim van der Lippe 6a935445b3 Port perf test suite to mocha runner
This resurrects the perf test suite, as the older test-runner setup
was removed, but the perf test suite was not ported.

Example output:

Spawning hosted mode server
  Boot performance
    ✓ run 1/37 (1185ms)
    ✓ run 2/37 (1234ms)
    ✓ run 3/37 (1213ms)
    ✓ run 4/37 (1376ms)
    ✓ run 5/37 (1327ms)
    ✓ run 6/37 (1235ms)
    ✓ run 7/37 (1352ms)
    ✓ run 8/37 (1439ms)
    ✓ run 9/37 (1332ms)
    ✓ run 10/37 (1290ms)
    ✓ run 11/37 (1229ms)
    ✓ run 12/37 (1241ms)
    ✓ run 13/37 (1233ms)
    ✓ run 14/37 (1203ms)
    ✓ run 15/37 (1177ms)
    ✓ run 16/37 (1336ms)
    ✓ run 17/37 (1526ms)
    ✓ run 18/37 (1465ms)
    ✓ run 19/37 (1537ms)
    ✓ run 20/37 (1709ms)
    ✓ run 21/37 (1760ms)
    ✓ run 22/37 (1704ms)
    ✓ run 23/37 (2549ms)
    ✓ run 24/37 (1387ms)
    ✓ run 25/37 (1934ms)
    ✓ run 26/37 (1860ms)
    ✓ run 27/37 (1309ms)
    ✓ run 28/37 (1295ms)
    ✓ run 29/37 (1391ms)
    ✓ run 30/37 (1569ms)
    ✓ run 31/37 (1562ms)
    ✓ run 32/37 (1442ms)
    ✓ run 33/37 (1431ms)
    ✓ run 34/37 (1646ms)
    ✓ run 35/37 (1927ms)
    ✓ run 36/37 (1600ms)
    ✓ run 37/37 (1587ms)
Mean boot time: 1475.28ms
50th percentile boot time: 1390.83ms
90th percentile boot time: 1860.02ms
99th percentile boot time: 2549.29ms

R=aerotwist@chromium.org

Change-Id: I1b6a79fdfc1b7c98f6156d3309b5b98ff8530476
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209108
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-05-20 13:42:43 +00:00
Tim van der Lippe b3bb9d3aa2 Fix registerDispatcher types in Closure
We need to accept both Protocol. and ProtocolProxyApi. namespaced
dispatchers, as older dispatchers use the former and newer dispatchers
use the latter.

R=sigurds@chromium.org

Bug: 1081686
Change-Id: I44fb6ff510e5fb5f3879e3ef285e908673dc0054
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2209107
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
2020-05-20 07:46:07 +00:00
Yang Guo 3852a23f96 Seed more owners to front_end directories
Bug: chromium:1082687
Change-Id: I07ad07fba7513d674eb8b6e84d8296bf64d37230
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2207319
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Reviewed-by: Leo Lee <leolee@microsoft.com>
2020-05-20 07:20:27 +00:00
Tim van der Lippe 719446c0db Include workaround for TypeScript compiler bug
The TypeScript compiler has a bug where, when you implement an
interface in JSDoc which is defined in a `.d.ts` file which
uses a namespace, it generates an invalid declaration file [1].

To workaround this bug, we have to add global interfaces that
are essentially aliases of the actual interfaces. As a result,
the TypeScript compiler no longer fails with resolving.

Update Closure accordingly such that we can use the correct
type to work in both Closure and TypeScript.

[1]: https://github.com/microsoft/TypeScript/issues/38640

R=jacktfranklin@chromium.org,aerotwist@chromium.org
CC=sigurds@chromium.org,janscheffler@chromium.org

Bug: 1081686, 1011811
Change-Id: I088a4520c90ce0873cf9850a8ed65f9c8dd896ef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208978
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-19 14:06:46 +00:00
Tim van der Lippe 0755417a60 Add dispatcher object notation types to Closure
This is required to teach Closure about the new object notation.
These live only on the ProtocolProxyApi, as that is what TypeScript
understands.

R=jacktfranklin@chromium.org,aerotwist@chromium.org
CC=sigurds@chromium.org,janscheffler@chromium.org

Bug: 1081686
Change-Id: Ibeed69ec116b9d86bbf7acc5a05f71f0a8f4b794
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2207237
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-19 10:16:36 +00:00
Tim van der Lippe 3e704e9618 Add Dispatcher base-interface to enforce type-safety
To make sure that typescriptified dispatchers use the object
notation, we have to signal to the InspectorBackend that
we use the object notation. As such, add a base interface
with an interface method called `usesObjectNotation` to make
sure that all dispatcher implementations use this method.

A follow-up CL will make the required changes to the
InspectorBackend to call the dispatcher with the correct
method arguments.

R=jacktfranklin@chromium.org,aerotwist@chromium.org
CC=sigurds@chromium.org,janscheffler@chromium.org

Bug: 1081686
Change-Id: I1fa9338afa44d26cc63dce84b9d88a936c4f35e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2207236
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-19 10:02:16 +00:00
Yang Guo bf7dafae9f Seed some owners in front_end
The proposed owners are based on reviewing and authoring contributions
in individual folders in the past six months.

The script used to find these owners is attached.

Bug: chromium:1082687

Change-Id: I8efc3fee3298be615acb7fc2497309ae560a913c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199083
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Reviewed-by: Leo Lee <leolee@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2020-05-18 15:59:12 +00:00
Jan Scheffler 3f36af81ee Remove "Agent" from closure types
By removing Agent from the closure types for CDP requests and responses,
the types become compatible with TypeScript:

Protocol.PageAgent.SetDeviceMetricsOverrideRequest

becomes:
Protocol.Page.SetDeviceMetricsOverrideRequest



Change-Id: I3442061c9007c39b08a4ab945d19253880d74ba7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204285
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-05-18 12:48:46 +00:00
Tim van der Lippe f864f5b3d9 Port cm files to third_party/codemirror usages
The codemirror.css file needs to stay and will be removed in a
separate CL. Apparently we have our custom CodeMirror theme
in `text_editor/cmdevtools.css` which overwrites internals.

We should look into porting the css styles to use CSS variables
like all other themes.

R=mathias@chromium.org

Bug: 1076825
Change-Id: I0bdbdfa297d5ffac916d93dcadd1db66f15af6b3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2179844
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-05-18 09:41:01 +00:00
Jan Scheffler bb0779674b Add basic types from protocol to closure
Change-Id: I3c522e24f7f06fa55881f363546d4be12f5da64e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204108
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-15 20:28:07 +00:00
Jan Scheffler 36aca5228a Use enums for params in closure
This patch puts the work from crrev.com/r/2204105 into
effect and changes all callsites to use the enums instead
of strings.

Change-Id: I9079813f0a79cac11e43be8734fc984b67a96f24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204110
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-15 20:15:07 +00:00
Jan Scheffler 97aa83941c Make closure aware of enums in CDP params
Change-Id: Id9a05a9fdc6e2fbc15914a2bfb58469d7b7cc539
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204105
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-15 14:33:21 +00:00
Jan Scheffler e6ca9bd614 Add support for enums defined in parameters
Change-Id: Ibb02f77a67b020d1d9f178f4af5bcc4ad993e916
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2204103
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-05-15 13:56:56 +00:00
Tim van der Lippe d0ed351152 Update TypeScript to 3.9.2
DISABLE_THIRD_PARTY_CHECK=TypeScript update
R=jacktfranklin@chromium.org

Bug: 1011811
Change-Id: I14c8201cf46b78b73afdc4cd7d68c8c87a2cf697
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199124
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-05-14 10:14:34 +00:00