Commit Graph
6503 Commits
Author SHA1 Message Date
Sigurd Schneider 3aa8ba4983 Add issues for CORS redirect mode problems
This CL adds issues for the CORS error codes

NoCorsRedirectModeNotFollow

Screenshot: https://imgur.com/a/ZfaMTu6

Bug: chromium:1141824
Change-Id: I0fe496219bfc4b43414d21d1eed48022464203c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897287
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-05-17 09:57:22 +00:00
Sigurd Schneider eeb3765890 Add issues for CORS disabled scheme problems
This CL adds issues for the CORS error codes

CorsDisabledScheme

Screenshot: https://imgur.com/a/3nVmUn6

Bug: chromium:1141824
Change-Id: I29f085e660ba6985b028cbc52e9460857525da52
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897284
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-05-17 08:54:02 +00:00
Sigurd Schneider 0404498fbf Add issues for CORS same-origin problems
This CL adds issues for the CORS error codes

DisallowedByMode

Screenshot: https://imgur.com/a/XBVhWCs

Bug: chromium:1141824
Change-Id: If2292961beaba23e18b41b580c2d20f453b5faf3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897282
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2021-05-17 08:41:32 +00:00
Tim van der Lippe 038d808e1a Import protocol types in models/
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: Icfda82842d5bd1e1da5fff109605925113fc651b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897516
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-17 07:59:52 +00:00
Sigurd Schneider f7e58beb6a Improve description
Bug: b/187846688
Change-Id: I8742f2e799f76e561f36dc4154f5b1e996c801c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897291
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-05-17 07:05:32 +00:00
Changhao Han 4b903ba3b9 Fix bezier editor showing for custom-property linear-gradients
This issue is caused by an imperfect regex parsing for potential
animation-function-related keywords. Although "linear" is a keyword,
when it is suffixed by "-gradient", it is not a valid animation
function.

This is another example that using regex as a CSS syntax parser will
cause problems. For now this particular problem is fixed, but there
might be other cases that this regex will be false positive or negative.

Fixed: chromium:1203639
Change-Id: I81330260f0470693047c23f7eeb6c86639d5a125
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2896892
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-05-17 06:54:02 +00:00
Vidal Guillermo Diazleal Ortega d7b8fdb36d Improving string description on an ambiguos term.
Improving description on the term "request" which could be mistranslated
as answer.

Bug: 1208218
Change-Id: Ieb1fb4116dc8d96a587d16a6e0b65000869513c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2889529
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-14 17:13:10 +00:00
Tim van der Lippe 9a696c4e72 Import protocol types in core/
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I7534ced5c2782ade93da32818e864f2a3327ecff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897294
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 16:48:30 +00:00
Tim van der Lippe eb876c6b1e Generate const enums in protocol.d.ts
Some files currently rely on the Protocol to be available on the
global scope. However, the Protocol definitions are defined in
a .d.ts file, which isn't available on runtime. Therefore,
attempting to import Protocol with non-type imports would retain
the imports in the `.js` files and break on runtime.

Since the only usages of the Protocol on runtime are the enums,
we can make them const, such that they get inlined as intended.
Then, `import * as` will work again, as the enums are inlined and
the import is removed from the `.js` file.

DISABLE_THIRD_PARTY_CHECK=Protocol update
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I749e57c9f51596866b61cab686c59f00bc8a8eb4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897277
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-05-14 15:51:00 +00:00
Jack Franklin 0e65f20f47 [Dark Mode] migrate tabbedPane.css
Bug: chromium:1152736
Change-Id: Ic55b705778d49daa3cad9925adb85dd95833c172
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897290
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-14 15:18:20 +00:00
Brandon Goddard abec9212cb Network: Fix flickering document previews.
This CL fixes a bug that caused flickering when previewing documents
in the Preview pane in the network tab when clicking documents with the
preview pane already open. This bug was caused by 2 listeners
firing the code to re-render the preview pane in quick succession: one
from selecting a new grid node, and another from activating the
sidepane.

This CL updates the showRequestPane logic in the network panel to early
return if the request sidepane is already open, and we are not specifying
the sidepane tab when activating.

Bug: 1161690
Change-Id: Iabd86029c4c7fb636e2c93600534e0c272ee08ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891083
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2021-05-14 15:12:20 +00:00
Simon Zünd 430c61d8f2 [l10n] Implement remote locales
This CL changes how locale data is fetch to the same approach that
Lighthouse is using. The difference is, DevTools bundles more than
the en-US locale upfront, so we need to specify that explicitly.

Long term, we should have one central place where all the DevTools
locales are configured. That is, which ones are available, which
ones are shipped and which ones are fetched remotely. For now,
its configured in a few places.

R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: Iba164eac05bab14a63301c7453f09021ee06991a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2882771
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-14 14:52:50 +00:00
Andres Olivares 92480f95c1 Add invoke to Page.setLifecycleEventsEnabled in ResourceTreeModel
In order to dispatch lifecycle events from the backend the
`lifecycle_events_enabled_` flag in the page agent needs to be set to
true. This is done via the Page.setLifecycleEventsEnabled CDP method.
The ResourceTreeModel currently doesn't have an invoke to the CDP
method and so we add a new method to the class which includes it.

Bug: 1208453
Change-Id: I32ecc3ec680dbfedda2f9381a47ef0725a209ff2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891444
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2021-05-14 13:51:30 +00:00
Tim van der Lippe 27ff2f24ca Add DCHECK function to Platform
In the Chromium backend engineers can use `DCHECK()` to ensure
certain invariants are held, but only execute these assertions
in a debug build. [1] Release builds do not ship with DCHECKS enabled.

In a similar fashion, introduce a build-time generated function
`DHCECK` that is only generated when `devtools_dcheck_always_on`
is set as GN arg. By default, `is_debug` builds enable
`devtools_dcheck_always_on`. However, in a release build, you can
explicitly set `devtools_dcheck_always_on` to `true` to achieve
the same effect.

When the GN arg is set, the build generates the `dcheck.js` file
with an implementation that checks the condition and fails if
it is not met. When the arg is not set, the function implementation
remains empty and becomes a noop.

To make sure that these functions calls are removed in a release
build (rather than being a noop), the terser configuration is
updated to treat these functions as pure. As such, terser will
remove any calls if the function implementation is empty. In a
release build that explicitly turns out the dchecks, terser
will not remove the function calls.

Lastly, to make sure that all code related to the dcheck is removed,
the condition needs to be a lambda. If we were to make it a raw
boolean, then `terser` would not be able to determine whether it
can remove the condition itself and would leave that behind. In other
words, the `DCHECK` call would still leave some artifacts behind,
namely the condition computation itself. By making it a lambda,
terser can deduce that the lambda creation has no side-effect and
remove the lambda if the `DHCECK` call is removed.

R=aerotwist@chromium.org

[1]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md#check_dcheck_and-notreached

Bug: none
Change-Id: Ic396f102141d9eb67c8690bd2a601b56061b9d8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2894390
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 13:47:30 +00:00
Jack Franklin 082afdbe1f Remove components_import eslint rule
Now we've completed the move to LitHtml v2 and the static tags, we can
remove this rule as we don't need to rely on side-effect imports
anymore.

Bug: 1153077
Change-Id: I7967d6b1995fc77460ec7815d7ab08243553e567
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897283
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 13:41:10 +00:00
Jack Franklin e9f62582dd Lint for consistent component tag names in component definitions
This CL lints that for a given component that all the references to
its tag name are the same.

```
class Foo extends HTMLElement {
  // Check that this name
  static litTagName = LitHtml.literal\`devtools-foo\`
}

// And this name
ComponentHelpers.CustomElements.defineComponent('devtools-foo', Foo);

declare global {
  interface HTMLElementTagNameMap {
    // And this one are the same
    'devtools-foo': Foo
  }
}
```

Bug: 1153077
Change-Id: I29694449cb37950d1a5ff5391779e16e462926e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897279
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 12:57:20 +00:00
Sigurd Schneider 3fec5ca7c7 Update DevTools Chromium DEPS.
TBR=machenbach@chromium.org,liviurau@chromium.org

DISABLE_THIRD_PARTY_CHECK=unblock roll

Bug: chromium:1209155
Change-Id: I9f029652effc0a8cd8cef8bb67d4d104f099e518
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2897257
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Devtools Autoroller <devtools-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-05-14 11:07:59 +00:00
Jack Franklin b620bb41c9 Enforce event names and allow event name references
This CL updates our ESLint rule for custom event names:

* It changes it from wanting kebab-case to allonewordnopunctuation
* It allows references to CustomEvent.eventName for times when it's
  useful to define the event name as a static.

The CL therefore updates a variety of events through the codebase that
were kebab-case. go/building-ui-devtools has also been updated.

Fixed: 1176758
Change-Id: Ifbe9851bc2f6bbe9347ec886cc8c026248cc5c43
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2894389
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-14 10:39:29 +00:00
Simon Zünd 673b759e81 [l10n] DevToolsLocale should take supported locales into account
This CL fixes a bug, where DevToolsLocale didn't actually honor the
supported locales.

R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: I5dfd087445aae74ef011830a1cbeeb7f81c2b758
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891752
Auto-Submit: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-14 06:32:59 +00:00
Kriti Sapra 7491545d2b Updated FramDetailsView to ban usage of devtools component tag names
Bug: 1153077
Change-Id: Id8524fdd4e3f637c07b96e60faa5d1e36fb9243b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2894387
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 13:19:19 +00:00
Kriti Sapra 4b963c1b13 Updated Linkifier and ExpandableList to use litTagName
Bug: 1153077
Change-Id: I1d5545c7ce52c2beb543632757a6ddf001c11365
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891848
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-05-13 12:03:09 +00:00
Jack Franklin 049592e093 [Dark Mode] migrate inspectorCommon.css
Have tested manually in both modes by selecting various parts of the
DevTools and checking they look OK. It's hard to verify for sure that
every change hasn't had any negative impacts, but I will keep an eye
for regressions!

Bug: chromium:1152736
Change-Id: I421f36190b2501b475f3bd54aec226dbeadb27ee
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891844
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 11:03:59 +00:00
Tim van der Lippe a6d4a91d6d Remove protocol-proxy-api from global typescript definitions
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I2476ab25f75f7f8f1994d8846c2d82ed9dffef54
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891760
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 10:53:18 +00:00
Tim van der Lippe 03ca595765 Import protocol proxy api directly
R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I1c7f6e6320fb28f7ac8beffede5bf507562886d5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891759
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 10:24:58 +00:00
Tim van der Lippe 5bf64b9856 Make the Protocol definitions importable
Currently, all Protocol type definitions live on the global scope.
Additionally, the protocol files are included in all ts_library
targets. However, we don't want the protocol definitions to be
available in, for example, reusable UI components.

Therefore, we should move to a system where all files that want
to refer to the protocol types should import them instead.
However, doing so in 1 large CL will be problematic, which is
why it should be both globally available and importable as an
interim step.

To do so, we augment the existing protocol definitions to export
them as namespace and regular export. Then, we introduce a separate
file that imports the protocol types and augments the global scope
with the definitions. Now, protocol is both importable and remains
available on the global scope.

The reason that we need a separate file is that TypeScript disallows
you to augment the global scope in a file that also exports types.
Therefore, the global scope augmentation happens in protocol-globals.d.ts,
which will be removed once all Protocol type usages are imported.

To verify that this approach works, ProtocolClient imports the
required types, while SDK only imports it in AccessibilityModel.
All other files in SDK still refer to the global type.
In follow-up CLs, all pre-existing usages of Protocol will use
the import style.

DISABLE_THIRD_PARTY_CHECK=Updating protocol type format
R=szuend@chromium.org,jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I1d75949b9cd3e37989c6cddf79ac849f5664a1e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891756
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 09:48:18 +00:00
Kriti Sapra dfb4725d9d Migrated LinearMemoryInspector to no longer use literal devtools component tag names
Bug: 1153077
Change-Id: Ie625d7125826491a6a570627044940687daacdef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891761
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 09:30:08 +00:00
chait pinnamaneni d80a19e6b4 High contrast fix in Settings, devices user agent text input
Added CSS to update border color in high contrast mode on focus.
https://i.imgur.com/Py1ZizA.gif

Bug:1200980
Change-Id: I3f2d197bef8b9128fe00017938d40a2a0e91469b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2885978
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Chait Pinnamaneni <cpinnamaneni@microsoft.com>
2021-05-12 17:14:28 +00:00
Kriti Sapra 14b6512508 Updated usage of litTagName for Icon in MarkdownImage.ts
Bug: 1153077
Change-Id: If632306ccaa170f329c552ca750d8e9926b33cff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891755
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kriti Sapra <kritisapra@google.com>
2021-05-12 15:12:27 +00:00
Philip Pfaffe 254d868d84 [live-edit] Don't attempt to compile modules
When changing resources during live-edit, we send JavaScript files to V8
to compile and show any compile errors in the editor. If the script
being edited is a module, compilation fails with errors like "Cannot use
import statement outside a module". This CL adds tracking for whether
scripts are for modules, and skips compilation when a module is being
edited.

Fixed: chromium:1202495
Change-Id: I15842ad0565c1b67719c7ed212a68e5992550f13
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891763
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2021-05-12 14:55:57 +00:00
Jack Franklin 33b3951b92 Fix ESLint import extensions being missed
Bug: none
Change-Id: Ie3341a56224d7887b42c230ba966cc5eeba38fe4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886932
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-12 14:30:57 +00:00
Changhao Han a1a3f938ef Update browser protocol and corresponding auto-gen files
This is mainly to bring in new changes from Quirks Mode backend CL:
https://crrev.com/c/2875213

and from the OriginTrial CL: https://crrev.com/c/2851118

Bug: chromium:622660
Change-Id: Ia5c11be37b33d38f08c5d9e584add15e07c5a5e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891757
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2021-05-12 13:04:17 +00:00
Simon Zünd 7781f0c1b7 [l10n] Add 'de' locale and prepare BUILD infra for remote locales
This CL adds one locale that will be served remotely. This allows us
to prepare the necessary BUILD.gn changes now and also test remote
locale fetching once "de.json" makes its way through the uploader
onto the remote server.

Drive-by: Updated zh translations as part of the language export
into DevTools.

R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: I8ea80836f85fbef7b891b865c676bf38f40113f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891749
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-12 11:12:07 +00:00
Jack Franklin 6d53322c66 Add devtools_lit_visibility to BUILD.gn
Bug: 1153077
Change-Id: If3f6c7fdc63a57116963d2506b3b6047317e17e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2891751
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-05-12 09:08:03 +00:00
Simon Zünd 83ca6e1401 [l10n] Add setting for users to choose DevTools locale
The setting is hidden behind an experiment and only 'Chinese' is
available for now.

Drive-by: Use short form of the region when generating the locale
settings strings. It breaks layout otherwise.

R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: I5cbfda5972dcb7ab9dcfbe2ecdfbd2b05b04e171
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2882756
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-12 06:43:23 +00:00
Sigurd Schneider 50a679e8ec Update descriptions to be easier to translate
Bug: b/187426946, b/187435787
Change-Id: Ibc2150513f43e371ace93a74119f0cce9ce3128e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886930
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-12 05:50:53 +00:00
Jack Franklin 7e023bca33 Add --override variable generator for dark mode
This CL adds a small helper to the component docs that can take in a
color and generate code to use when migrating that color to an
explicit `--override-*` variable as part of the dark mode migration.
It will use the legacy theme color patching to invert the color and
generate some sample CSS for dark mode.

https://imgur.com/a/O9OrL19

Bug: chromium:1152736
Change-Id: I7c24cdb67577f5c543c734203fe6f5c60635e6ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887732
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 16:26:52 +00:00
Kriti Sapra ecc1922193 Migrated ReportView.ts to use litTagName
Bug: 1153077
Change-Id: Id606417ec8c42dfc1e7da824b0313602f9d3687c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887728
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 16:03:52 +00:00
Tim van der Lippe 77b3d5bb6c Update acorn-loose to 8.1.0
R=bmeurer@chromium.org

Bug: none
Change-Id: Ib0ce2ad50689f741a61ccf469c691591deeac419
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886937
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-11 15:36:32 +00:00
Tim van der Lippe 31a38a2345 Remove fabricjs
This third_party package is unused.

R=aerotwist@chromium.org

Bug: none
Change-Id: I55ec37feba16877da1f0e239578f454ea7ee712f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887727
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-05-11 15:32:12 +00:00
Tim van der Lippe e804c59342 Update CodeMirror to 5.61.0
R=mathias@chromium.org

Bug: none
Change-Id: I166a23e967d2dc3a81399c03c49a9365a28a16d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2887726
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-05-11 15:29:02 +00:00
Tim van der Lippe c9a916faf7 Update Acorn to 8.2.4
R=bmeurer@chromium.org

Bug: none
Change-Id: If8557b7f9d7ea842c4a030cdd7d4f73b7a1e3f7b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886936
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2021-05-11 15:12:02 +00:00
Jack Franklin 49e7e72a33 Migrate NodeText to litTagName
Bug: 1153077
Change-Id: Ibba851796c88e178a162425fff00052d1406dbe5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886935
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 14:44:32 +00:00
Jack Franklin a75ae7cbb3 Enforce import type when importing TS types.
Bug: none
Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2021-05-11 14:00:22 +00:00
Simon Zünd 2220de6986 [l10n] Use new DevToolsLocale singleton and remove 'registeredLocale'
R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: Ie3cc1143f7023702fe1612a87c96f07de532c146
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2882765
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-11 12:04:22 +00:00
Simon Zünd 2d9cdbb49c [l10n] Add getLocalizedLanguageRegion method
The method will be used to generate the texts for the language
setting that allows users to choose the DevTools locale.

Using the Intl API means we don't have to send the different languages/
regions through our translation pipeline.

R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: Ibd2fe0d6ee325997ab9232668601a3a0fed397d9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2878730
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-11 11:19:22 +00:00
Jack Franklin d888e62b6b [Lit] migrate DataGrid to use new static tags
Bug: 1153077
Change-Id: I24503578dcfe5120f1751f20aa111d2647469dc2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886924
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 10:51:48 +00:00
Simon Zünd e4da47f529 [ts] Add types for Intl.DisplayNames
This CL early adopts Intl types that haven't landed upstream in TS yet.

DISABLE_THIRD_PARTY_CHECK=Add types
R=tvanderlippe@chromium.org

Bug: chromium:1163928
Change-Id: I2a2084a58212c535df9dc7ef4c0c704ede737df7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2885264
Auto-Submit: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-11 10:19:18 +00:00
Jack Franklin 16087d6ea4 Add Puppeteer sourcemaps to BUILD.gn to fix network errors
Bug: none
Change-Id: I0e25284ca66ab229e48cf7b9a466043865bfb0de
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886922
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 10:10:48 +00:00
Jack Franklin 06ee0d9cf6 [Lit2] Lint against manual tag names
This CL adds an ESLint rule that bans the use of:

```
LitHtml.html`<devtools-foo>`
```

Because from now on we want to enforce:

```
LitHtml.html`<${Foo.litTagName}>`
```

I have disabled the rule in all locations where we do not yet do this,
and will be working to fix these problems over a series of CLs.


Bug: 1153077
Change-Id: I8d18243d0243ea1403d5d57dbeb32c8a9682d2dd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2876969
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-05-11 09:37:03 +00:00
Mathias Bynens 6405b66640 Add missing WOFF2 resource types
Also, correct the font MIME types per RFC 8081 [1].

[1]: https://datatracker.ietf.org/doc/html/rfc8081

Bug: chromium:1207353
Change-Id: Ibbbeb5ca35b032467a258e21b3c75eaee5d7c599
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886921
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
2021-05-11 09:35:58 +00:00