chrome-devtools-frontend 1.0.961109 → 1.0.963415

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/.eslintignore +5 -4
  2. package/AUTHORS +1 -0
  3. package/config/gni/devtools_grd_files.gni +1 -4
  4. package/front_end/core/common/ParsedURL.ts +12 -10
  5. package/front_end/core/host/UserMetrics.ts +2 -1
  6. package/front_end/core/i18n/locales/en-US.json +6 -24
  7. package/front_end/core/i18n/locales/en-XL.json +6 -24
  8. package/front_end/core/protocol_client/InspectorBackend.ts +7 -7
  9. package/front_end/core/root/Runtime.ts +2 -0
  10. package/front_end/core/sdk/CSSProperty.ts +22 -110
  11. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  12. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  13. package/front_end/generated/protocol-tsconfig.json +2 -2
  14. package/front_end/generated/protocol.ts +16772 -0
  15. package/front_end/models/emulation/EmulatedDevices.ts +3 -3
  16. package/front_end/models/issues_manager/IssuesManager.ts +0 -5
  17. package/front_end/models/issues_manager/issues_manager.ts +0 -2
  18. package/front_end/models/persistence/IsolatedFileSystem.ts +3 -2
  19. package/front_end/models/persistence/PersistenceActions.ts +2 -2
  20. package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
  21. package/front_end/models/text_utils/text_utils.ts +0 -2
  22. package/front_end/panels/application/AppManifestView.ts +7 -1
  23. package/front_end/panels/application/components/FrameDetailsView.ts +6 -1
  24. package/front_end/panels/application/components/PermissionsPolicySection.ts +16 -4
  25. package/front_end/panels/elements/StylePropertyTreeElement.ts +13 -0
  26. package/front_end/panels/elements/StylesSidebarPane.ts +67 -0
  27. package/front_end/panels/elements/stylesSectionTree.css +28 -0
  28. package/front_end/panels/issues/IssueAggregator.ts +0 -10
  29. package/front_end/panels/issues/IssueView.ts +0 -2
  30. package/front_end/panels/media/PlayerListView.ts +2 -0
  31. package/front_end/panels/media/playerListView.css +3 -0
  32. package/front_end/panels/sensors/sensors-meta.ts +2 -2
  33. package/front_end/panels/sources/NavigatorView.ts +1 -1
  34. package/front_end/third_party/additional_readme_paths.json +1 -0
  35. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  36. package/front_end/ui/components/docs/icon_button/basic.ts +2 -7
  37. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  38. package/front_end/ui/components/text_editor/TextEditor.ts +8 -1
  39. package/front_end/ui/components/text_editor/config.ts +3 -2
  40. package/front_end/ui/legacy/GlassPane.ts +2 -0
  41. package/front_end/ui/legacy/UIUtils.ts +1 -1
  42. package/front_end/ui/legacy/softDropDownButton.css +2 -0
  43. package/front_end/ui/legacy/themeColors.css +2 -0
  44. package/front_end/ui/legacy/toolbar.css +6 -0
  45. package/package.json +1 -1
  46. package/scripts/build/assert_third_party_readmes.py +2 -1
  47. package/scripts/build/ninja/devtools_entrypoint.gni +25 -17
  48. package/scripts/devtools_paths.py +4 -0
  49. package/scripts/protocol_typescript/protocol_dts_generator.ts +4 -9
  50. package/front_end/generated/protocol.d.ts +0 -16771
  51. package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +0 -67
  52. package/front_end/models/issues_manager/descriptions/wasmCrossOriginModuleSharing.md +0 -5
  53. package/front_end/models/text_utils/CodeMirrorUtils.ts +0 -77
  54. package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +0 -90
@@ -1,67 +0,0 @@
1
- // Copyright 2021 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as i18n from '../../core/i18n/i18n.js';
6
- import * as Protocol from '../../generated/protocol.js';
7
- import type * as SDK from '../../core/sdk/sdk.js';
8
- import {Issue, IssueCategory, IssueKind} from './Issue.js';
9
- import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
10
-
11
- const UIStrings = {
12
- /**
13
- * @description Label for the link in the description of Wasm cross-origin module sharing issues, that is, issues
14
- * that are related to the upcoming deprecation of cross-origin sharing of Wasm modules.
15
- */
16
- linkTitle: 'Restricting Wasm module sharing to same-origin',
17
- };
18
- const str_ = i18n.i18n.registerUIStrings('models/issues_manager/WasmCrossOriginModuleSharingIssue.ts', UIStrings);
19
- const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
20
-
21
- export class WasmCrossOriginModuleSharingIssue extends
22
- Issue<Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue> {
23
- #issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails;
24
-
25
- constructor(
26
- issueDetails: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails,
27
- issuesModel: SDK.IssuesModel.IssuesModel) {
28
- super(Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue, issuesModel);
29
- this.#issueDetails = issueDetails;
30
- }
31
-
32
- getCategory(): IssueCategory {
33
- return IssueCategory.Other;
34
- }
35
-
36
- details(): Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails {
37
- return this.#issueDetails;
38
- }
39
-
40
- getDescription(): MarkdownIssueDescription|null {
41
- return {
42
- file: 'wasmCrossOriginModuleSharing.md',
43
- links: [{
44
- link: 'https://developer.chrome.com/blog/wasm-module-sharing-restricted-to-same-origin/',
45
- linkTitle: i18nString(UIStrings.linkTitle),
46
- }],
47
- };
48
- }
49
-
50
- primaryKey(): string {
51
- return JSON.stringify(this.#issueDetails);
52
- }
53
-
54
- getKind(): IssueKind {
55
- return this.#issueDetails.isWarning ? IssueKind.BreakingChange : IssueKind.PageError;
56
- }
57
-
58
- static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
59
- WasmCrossOriginModuleSharingIssue[] {
60
- const details = inspectorIssue.details.wasmCrossOriginModuleSharingIssue;
61
- if (!details) {
62
- console.warn('WasmCrossOriginModuleSharing issue without details received.');
63
- return [];
64
- }
65
- return [new WasmCrossOriginModuleSharingIssue(details, issuesModel)];
66
- }
67
- }
@@ -1,5 +0,0 @@
1
- # Share WebAssembly modules only between same-origin environments
2
-
3
- Starting in Chrome M95, WebAssembly modules may only be shared between same-origin environments. This means that [same-site but cross-origin](sameSiteAndSameOrigin) environments won't be able to share WebAssembly modules via `postMessage` anymore.
4
-
5
- To fix this, ensure that WebAssembly modules are only transferred between environments of the same origin. If this is not possible, serve the WebAssembly module from the same origin.
@@ -1,77 +0,0 @@
1
- /*
2
- * Copyright (C) 2013 Google Inc. All rights reserved.
3
- *
4
- * Redistribution and use in source and binary forms, with or without
5
- * modification, are permitted provided that the following conditions are
6
- * met:
7
- *
8
- * * Redistributions of source code must retain the above copyright
9
- * notice, this list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above
11
- * copyright notice, this list of conditions and the following disclaimer
12
- * in the documentation and/or other materials provided with the
13
- * distribution.
14
- * * Neither the name of Google Inc. nor the names of its
15
- * contributors may be used to endorse or promote products derived from
16
- * this software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- */
30
-
31
- /* eslint-disable @typescript-eslint/no-explicit-any */
32
-
33
- import type * as CodeMirrorModule from '../../third_party/codemirror/codemirror-legacy.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
34
- import '../../third_party/codemirror/package/addon/runmode/runmode-standalone.js';
35
- import '../../third_party/codemirror/package/mode/css/css.js';
36
-
37
- import type * as TextUtils from './TextUtils.js';
38
-
39
- let tokenizerFactoryInstance: TokenizerFactory;
40
-
41
- export type Tokenizer =
42
- (line: string, callback: (value: string, style: string|null, start: number, end: number) => void) => void;
43
-
44
- export class TokenizerFactory implements TextUtils.TokenizerFactory {
45
- static instance(opts: {forceNew: boolean|null} = {forceNew: null}): TokenizerFactory {
46
- const {forceNew} = opts;
47
- if (!tokenizerFactoryInstance || forceNew) {
48
- tokenizerFactoryInstance = new TokenizerFactory();
49
- }
50
-
51
- return tokenizerFactoryInstance;
52
- }
53
-
54
- // https://crbug.com/1151919 * = CodeMirror.Mode
55
- getMode(mimeType: string): any {
56
- return CodeMirror.getMode({indentUnit: 2}, mimeType);
57
- }
58
-
59
- // https://crbug.com/1151919 * = CodeMirror.Mode
60
- createTokenizer(mimeType: string): Tokenizer {
61
- const cmMode = CodeMirror.getMode({indentUnit: 2}, mimeType);
62
- const state = CodeMirror.startState(cmMode);
63
-
64
- function tokenize(
65
- line: string, callback: (value: string, style: string|null, start: number, end: number) => void): void {
66
- const stream = new CodeMirror.StringStream(line);
67
- while (!stream.eol()) {
68
- const style =
69
- (cmMode.token as (stream: CodeMirror.StringStream, state: unknown) => string | null)(stream, state);
70
- const value = stream.current();
71
- callback(value, style, stream.start, stream.start + value.length);
72
- stream.start = stream.pos;
73
- }
74
- }
75
- return tokenize;
76
- }
77
- }
@@ -1,90 +0,0 @@
1
- // Copyright 2021 The Chromium Authors. All rights reserved.
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import * as i18n from '../../core/i18n/i18n.js';
6
- import type * as Platform from '../../core/platform/platform.js';
7
- import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
8
- import type * as Protocol from '../../generated/protocol.js';
9
-
10
- import {AffectedResourcesView} from './AffectedResourcesView.js';
11
-
12
- const UIStrings = {
13
- /**
14
- * @description Label for number of affected resources indication in issue view. The number designates the number of attempts to transfer a module to cross-origin context.
15
- *
16
- */
17
- nModuleTransfers: '{n, plural, =1 {# module} other {# modules}}',
18
- /**
19
- *@description Title for a column in an Wasm cross-origin module sharing affected resource view
20
- */
21
- wasmModuleUrl: 'Wasm Module URL',
22
- /**
23
- * @description Title for a column in an Wasm cross-origin module sharing affected resource view.
24
- * The issue is about a transfer of a module between different origins (see https://developer.mozilla.org/en-US/docs/Glossary/Origin).
25
- * The transfer occurs from a source origin to a target origin.
26
- */
27
- sourceOrigin: 'Source Origin',
28
- /**
29
- * @description Title for a column in an Wasm cross-origin module sharing affected resource view.
30
- * The issue is about a transfer of a module between different origins (see https://developer.mozilla.org/en-US/docs/Glossary/Origin).
31
- * The transfer occurs from a source origin to a target origin.
32
- */
33
- targetOrigin: 'Target Origin',
34
- /**
35
- *@description Title for a column in an Wasm cross-origin module sharing affected resource view
36
- */
37
- status: 'Status',
38
- /**
39
- * @description Indicates that the Wasm module transfer was blocked.
40
- */
41
- blocked: 'blocked',
42
- /**
43
- * @description Indicated that the Wasm module transfer was not blocked, but only warned about.
44
- */
45
- warned: 'warning',
46
- };
47
- const str_ =
48
- i18n.i18n.registerUIStrings('panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts', UIStrings);
49
- const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
50
-
51
- export class WasmCrossOriginModuleSharingAffectedResourcesView extends AffectedResourcesView {
52
- #appendIssues(issues: Iterable<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue>):
53
- void {
54
- const header = document.createElement('tr');
55
- this.appendColumnTitle(header, i18nString(UIStrings.wasmModuleUrl));
56
- this.appendColumnTitle(header, i18nString(UIStrings.sourceOrigin));
57
- this.appendColumnTitle(header, i18nString(UIStrings.targetOrigin));
58
- this.appendColumnTitle(header, i18nString(UIStrings.status));
59
-
60
- this.affectedResources.appendChild(header);
61
-
62
- let count = 0;
63
- for (const issue of issues) {
64
- this.#appendDetails(issue.details());
65
- count++;
66
- }
67
- this.updateAffectedResourceCount(count);
68
- }
69
-
70
- protected getResourceNameWithCount(count: number): Platform.UIString.LocalizedString {
71
- return i18nString(UIStrings.nModuleTransfers, {n: count});
72
- }
73
-
74
- #appendDetails(details: Protocol.Audits.WasmCrossOriginModuleSharingIssueDetails): void {
75
- const element = document.createElement('tr');
76
-
77
- element.appendChild(this.createIssueDetailCell(details.wasmModuleUrl));
78
- element.appendChild(this.createIssueDetailCell(details.sourceOrigin));
79
- element.appendChild(this.createIssueDetailCell(details.targetOrigin));
80
- element.appendChild(
81
- this.createIssueDetailCell(details.isWarning ? i18nString(UIStrings.warned) : i18nString(UIStrings.blocked)));
82
-
83
- this.affectedResources.appendChild(element);
84
- }
85
-
86
- update(): void {
87
- this.clear();
88
- this.#appendIssues(this.issue.getWasmCrossOriginModuleSharingIssue());
89
- }
90
- }