chrome-devtools-frontend 1.0.960864 → 1.0.962581
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.
- package/.eslintignore +5 -4
- package/.vscode/devtools-workspace-launch.json +29 -0
- package/.vscode/devtools-workspace-settings.json +6 -1
- package/.vscode/devtools-workspace-tasks.json +28 -0
- package/config/gni/devtools_grd_files.gni +1 -4
- package/front_end/core/i18n/locales/en-US.json +36 -24
- package/front_end/core/i18n/locales/en-XL.json +36 -24
- package/front_end/core/protocol_client/InspectorBackend.ts +7 -7
- package/front_end/core/sdk/CSSProperty.ts +22 -110
- package/front_end/core/sdk/DebuggerModel.ts +8 -1
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -0
- package/front_end/generated/InspectorBackendCommands.js +21 -2
- package/front_end/generated/SupportedCSSProperties.js +3 -1
- package/front_end/generated/protocol-mapping.d.ts +17 -1
- package/front_end/generated/protocol-proxy-api.d.ts +18 -1
- package/front_end/generated/protocol-tsconfig.json +2 -2
- package/front_end/generated/protocol.ts +16772 -0
- package/front_end/models/emulation/EmulatedDevices.ts +3 -3
- package/front_end/models/issues_manager/IssuesManager.ts +0 -5
- package/front_end/models/issues_manager/issues_manager.ts +0 -2
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
- package/front_end/models/text_utils/text_utils.ts +0 -2
- package/front_end/panels/application/IndexedDBModel.ts +3 -0
- package/front_end/panels/application/components/FrameDetailsView.ts +5 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +16 -4
- package/front_end/panels/console/ConsoleView.ts +10 -1
- package/front_end/panels/elements/ElementsPanel.ts +10 -1
- package/front_end/panels/issues/IssueAggregator.ts +0 -10
- package/front_end/panels/issues/IssueView.ts +0 -2
- package/front_end/panels/sources/SourcesPanel.ts +20 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +10 -1
- package/front_end/third_party/additional_readme_paths.json +1 -0
- package/front_end/ui/components/buttons/Button.ts +6 -1
- package/front_end/ui/components/docs/button/basic.ts +1 -0
- package/front_end/ui/components/docs/icon_button/basic.ts +2 -7
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +8 -1
- package/front_end/ui/components/text_editor/config.ts +3 -2
- package/front_end/ui/legacy/SplitWidget.ts +6 -2
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +2 -1
- package/scripts/build/ninja/devtools_entrypoint.gni +25 -17
- package/scripts/devtools_paths.py +4 -0
- package/scripts/protocol_typescript/protocol_dts_generator.ts +4 -9
- package/front_end/generated/protocol.d.ts +0 -16692
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +0 -67
- package/front_end/models/issues_manager/descriptions/wasmCrossOriginModuleSharing.md +0 -5
- package/front_end/models/text_utils/CodeMirrorUtils.ts +0 -77
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +0 -90
@@ -660,7 +660,7 @@ const emulatedDevices = [
|
|
660
660
|
},
|
661
661
|
'capabilities': ['touch', 'mobile'],
|
662
662
|
'user-agent':
|
663
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
663
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
664
664
|
'type': 'phone',
|
665
665
|
},
|
666
666
|
{
|
@@ -680,7 +680,7 @@ const emulatedDevices = [
|
|
680
680
|
},
|
681
681
|
'capabilities': ['touch', 'mobile'],
|
682
682
|
'user-agent':
|
683
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
683
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
684
684
|
'type': 'phone',
|
685
685
|
},
|
686
686
|
{
|
@@ -700,7 +700,7 @@ const emulatedDevices = [
|
|
700
700
|
},
|
701
701
|
'capabilities': ['touch', 'mobile'],
|
702
702
|
'user-agent':
|
703
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
703
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
704
704
|
'type': 'phone',
|
705
705
|
},
|
706
706
|
{
|
@@ -25,7 +25,6 @@ import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
|
|
25
25
|
import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
|
26
26
|
import {SourceFrameIssuesManager} from './SourceFrameIssuesManager.js';
|
27
27
|
import {TrustedWebActivityIssue} from './TrustedWebActivityIssue.js';
|
28
|
-
import {WasmCrossOriginModuleSharingIssue} from './WasmCrossOriginModuleSharingIssue.js';
|
29
28
|
|
30
29
|
export {Events} from './IssuesManagerEvents.js';
|
31
30
|
|
@@ -93,10 +92,6 @@ const issueCodeHandlers = new Map<
|
|
93
92
|
Protocol.Audits.InspectorIssueCode.AttributionReportingIssue,
|
94
93
|
AttributionReportingIssue.fromInspectorIssue,
|
95
94
|
],
|
96
|
-
[
|
97
|
-
Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue,
|
98
|
-
WasmCrossOriginModuleSharingIssue.fromInspectorIssue,
|
99
|
-
],
|
100
95
|
[
|
101
96
|
Protocol.Audits.InspectorIssueCode.GenericIssue,
|
102
97
|
GenericIssue.fromInspectorIssue,
|
@@ -24,7 +24,6 @@ import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
|
|
24
24
|
import * as SharedArrayBufferIssue from './SharedArrayBufferIssue.js';
|
25
25
|
import * as SourceFrameIssuesManager from './SourceFrameIssuesManager.js';
|
26
26
|
import * as TrustedWebActivityIssue from './TrustedWebActivityIssue.js';
|
27
|
-
import * as WasmCrossOriginModuleSharingIssue from './WasmCrossOriginModuleSharingIssue.js';
|
28
27
|
|
29
28
|
export {
|
30
29
|
AttributionReportingIssue,
|
@@ -49,5 +48,4 @@ export {
|
|
49
48
|
SharedArrayBufferIssue,
|
50
49
|
SourceFrameIssuesManager,
|
51
50
|
TrustedWebActivityIssue,
|
52
|
-
WasmCrossOriginModuleSharingIssue,
|
53
51
|
};
|
@@ -45,8 +45,3 @@ TextUtils.BalancedJSONTokenizer = TextUtilsModule.TextUtils.BalancedJSONTokenize
|
|
45
45
|
TextUtils.TokenizerFactory = TextUtilsModule.TextUtils.TokenizerFactory;
|
46
46
|
|
47
47
|
TextUtils.isMinified = TextUtilsModule.TextUtils.isMinified;
|
48
|
-
|
49
|
-
TextUtils.CodeMirrorUtils = {};
|
50
|
-
|
51
|
-
/** @constructor */
|
52
|
-
TextUtils.CodeMirrorUtils.TokenizerFactory = TextUtilsModule.CodeMirrorUtils.TokenizerFactory;
|
@@ -2,7 +2,6 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
-
import * as CodeMirrorUtils from './CodeMirrorUtils.js';
|
6
5
|
import * as ContentProvider from './ContentProvider.js';
|
7
6
|
import * as StaticContentProvider from './StaticContentProvider.js';
|
8
7
|
import * as Text from './Text.js';
|
@@ -11,7 +10,6 @@ import * as TextRange from './TextRange.js';
|
|
11
10
|
import * as TextUtils from './TextUtils.js';
|
12
11
|
|
13
12
|
export {
|
14
|
-
CodeMirrorUtils,
|
15
13
|
ContentProvider,
|
16
14
|
StaticContentProvider,
|
17
15
|
Text,
|
@@ -410,6 +410,9 @@ export class IndexedDBModel extends SDK.SDKModel.SDKModel<EventTypes> implements
|
|
410
410
|
|
411
411
|
cacheStorageContentUpdated(_event: Protocol.Storage.CacheStorageContentUpdatedEvent): void {
|
412
412
|
}
|
413
|
+
|
414
|
+
interestGroupAccessed(_event: Protocol.Storage.InterestGroupAccessedEvent): void {
|
415
|
+
}
|
413
416
|
}
|
414
417
|
|
415
418
|
SDK.SDKModel.SDKModel.register(IndexedDBModel, {capabilities: SDK.Target.Capability.Storage, autostart: false});
|
@@ -236,6 +236,10 @@ const UIStrings = {
|
|
236
236
|
*/
|
237
237
|
createdByAdScriptExplanation:
|
238
238
|
'There was an ad script in the `(async) stack` when this frame was created. Examining the creation `stack trace` of this frame might provide more insight.',
|
239
|
+
/**
|
240
|
+
*@description Label for a button which when clicked causes some information to be refreshed/updated.
|
241
|
+
*/
|
242
|
+
refresh: 'Refresh',
|
239
243
|
};
|
240
244
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/FrameDetailsView.ts', UIStrings);
|
241
245
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -337,7 +341,7 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
337
341
|
groups: [
|
338
342
|
{
|
339
343
|
iconName: 'refresh_12x12_icon',
|
340
|
-
text:
|
344
|
+
text: i18nString(UIStrings.refresh),
|
341
345
|
} as IconButton.IconButton.IconWithTextData,
|
342
346
|
],
|
343
347
|
} as IconButton.IconButton.IconButtonData}>
|
@@ -52,6 +52,10 @@ const UIStrings = {
|
|
52
52
|
*@description Text describing that a specific feature is blocked by a Permissions Policy specified in a request header.
|
53
53
|
*/
|
54
54
|
disabledByHeader: 'disabled by "`Permissions-Policy`" header',
|
55
|
+
/**
|
56
|
+
*@description Text describing that a specific feature is blocked by virtue of being inside a fenced frame tree.
|
57
|
+
*/
|
58
|
+
disabledByFencedFrame: 'disabled inside a `fencedframe`',
|
55
59
|
};
|
56
60
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/PermissionsPolicySection.ts', UIStrings);
|
57
61
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -144,10 +148,18 @@ export class PermissionsPolicySection extends HTMLElement {
|
|
144
148
|
const resource = frame && frame.resourceForURL(frame.url);
|
145
149
|
const linkTargetRequest =
|
146
150
|
blockReason === Protocol.Page.PermissionsPolicyBlockReason.Header && resource && resource.request;
|
147
|
-
const blockReasonText =
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
+
const blockReasonText = ((): String => {
|
152
|
+
switch (blockReason) {
|
153
|
+
case Protocol.Page.PermissionsPolicyBlockReason.IframeAttribute:
|
154
|
+
return i18nString(UIStrings.disabledByIframe);
|
155
|
+
case Protocol.Page.PermissionsPolicyBlockReason.Header:
|
156
|
+
return i18nString(UIStrings.disabledByHeader);
|
157
|
+
case Protocol.Page.PermissionsPolicyBlockReason.InFencedFrameTree:
|
158
|
+
return i18nString(UIStrings.disabledByFencedFrame);
|
159
|
+
default:
|
160
|
+
return '';
|
161
|
+
}
|
162
|
+
})();
|
151
163
|
const revealHeader = async(): Promise<void> => {
|
152
164
|
if (!linkTargetRequest) {
|
153
165
|
return;
|
@@ -107,6 +107,14 @@ const UIStrings = {
|
|
107
107
|
* open/show the sidebar.
|
108
108
|
*/
|
109
109
|
hideConsoleSidebar: 'Hide console sidebar',
|
110
|
+
/**
|
111
|
+
* @description Screen reader announcement when the sidebar is shown in the Console panel.
|
112
|
+
*/
|
113
|
+
consoleSidebarShown: 'Console sidebar shown',
|
114
|
+
/**
|
115
|
+
* @description Screen reader announcement when the sidebar is hidden in the Console panel.
|
116
|
+
*/
|
117
|
+
consoleSidebarHidden: 'Console sidebar hidden',
|
110
118
|
/**
|
111
119
|
*@description Tooltip text that appears on the setting to preserve log when hovering over the item
|
112
120
|
*/
|
@@ -382,7 +390,8 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
382
390
|
toolbar.makeWrappable(true);
|
383
391
|
const rightToolbar = new UI.Toolbar.Toolbar('', this.consoleToolbarContainer);
|
384
392
|
toolbar.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(
|
385
|
-
i18nString(UIStrings.showConsoleSidebar), i18nString(UIStrings.hideConsoleSidebar)
|
393
|
+
i18nString(UIStrings.showConsoleSidebar), i18nString(UIStrings.hideConsoleSidebar),
|
394
|
+
i18nString(UIStrings.consoleSidebarShown), i18nString(UIStrings.consoleSidebarHidden)));
|
386
395
|
toolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(
|
387
396
|
(UI.ActionRegistry.ActionRegistry.instance().action('console.clear') as UI.ActionRegistration.Action)));
|
388
397
|
toolbar.appendSeparator();
|
@@ -88,6 +88,14 @@ const UIStrings = {
|
|
88
88
|
* close/hide the sidebar.
|
89
89
|
*/
|
90
90
|
hideComputedStylesSidebar: 'Hide Computed Styles sidebar',
|
91
|
+
/**
|
92
|
+
* @description Screen reader announcement when the computed styles sidebar is shown in the Elements panel.
|
93
|
+
*/
|
94
|
+
computedStylesShown: 'Computed Styles sidebar shown',
|
95
|
+
/**
|
96
|
+
* @description Screen reader announcement when the computed styles sidebar is hidden in the Elements panel.
|
97
|
+
*/
|
98
|
+
computedStylesHidden: 'Computed Styles sidebar hidden',
|
91
99
|
/**
|
92
100
|
* @description Title of a pane in the Elements panel that shows computed styles for the selected
|
93
101
|
* HTML element. Computed styles are the final, actual styles of the element, including all
|
@@ -962,7 +970,8 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
962
970
|
});
|
963
971
|
this.stylesWidget.addEventListener(StylesSidebarPaneEvents.InitialUpdateCompleted, () => {
|
964
972
|
this.stylesWidget.appendToolbarItem(stylesSplitWidget.createShowHideSidebarButton(
|
965
|
-
i18nString(UIStrings.showComputedStylesSidebar), i18nString(UIStrings.hideComputedStylesSidebar)
|
973
|
+
i18nString(UIStrings.showComputedStylesSidebar), i18nString(UIStrings.hideComputedStylesSidebar),
|
974
|
+
i18nString(UIStrings.computedStylesShown), i18nString(UIStrings.computedStylesHidden)));
|
966
975
|
});
|
967
976
|
|
968
977
|
const showMetricsWidgetInComputedPane = (): void => {
|
@@ -43,8 +43,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
43
43
|
#trustedWebActivityIssues = new Set<IssuesManager.TrustedWebActivityIssue.TrustedWebActivityIssue>();
|
44
44
|
#quirksModeIssues = new Set<IssuesManager.QuirksModeIssue.QuirksModeIssue>();
|
45
45
|
#attributionReportingIssues = new Set<IssuesManager.AttributionReportingIssue.AttributionReportingIssue>();
|
46
|
-
#wasmCrossOriginModuleSharingIssues =
|
47
|
-
new Set<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue>();
|
48
46
|
#genericIssues = new Set<IssuesManager.GenericIssue.GenericIssue>();
|
49
47
|
#representative?: IssuesManager.Issue.Issue;
|
50
48
|
#aggregatedIssuesCount = 0;
|
@@ -126,11 +124,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
126
124
|
return this.#attributionReportingIssues;
|
127
125
|
}
|
128
126
|
|
129
|
-
getWasmCrossOriginModuleSharingIssue():
|
130
|
-
ReadonlySet<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue> {
|
131
|
-
return this.#wasmCrossOriginModuleSharingIssues;
|
132
|
-
}
|
133
|
-
|
134
127
|
getGenericIssues(): ReadonlySet<IssuesManager.GenericIssue.GenericIssue> {
|
135
128
|
return this.#genericIssues;
|
136
129
|
}
|
@@ -223,9 +216,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
223
216
|
if (issue instanceof IssuesManager.AttributionReportingIssue.AttributionReportingIssue) {
|
224
217
|
this.#attributionReportingIssues.add(issue);
|
225
218
|
}
|
226
|
-
if (issue instanceof IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue) {
|
227
|
-
this.#wasmCrossOriginModuleSharingIssues.add(issue);
|
228
|
-
}
|
229
219
|
if (issue instanceof IssuesManager.GenericIssue.GenericIssue) {
|
230
220
|
this.#genericIssues.add(issue);
|
231
221
|
}
|
@@ -30,7 +30,6 @@ import {AffectedSourcesView} from './AffectedSourcesView.js';
|
|
30
30
|
import {AffectedTrustedWebActivityIssueDetailsView} from './AffectedTrustedWebActivityIssueDetailsView.js';
|
31
31
|
import {CorsIssueDetailsView} from './CorsIssueDetailsView.js';
|
32
32
|
import {GenericIssueDetailsView} from './GenericIssueDetailsView.js';
|
33
|
-
import {WasmCrossOriginModuleSharingAffectedResourcesView} from './WasmCrossOriginModuleSharingAffectedResourcesView.js';
|
34
33
|
import {AttributionReportingIssueDetailsView} from './AttributionReportingIssueDetailsView.js';
|
35
34
|
|
36
35
|
import type {AggregatedIssue} from './IssueAggregator.js';
|
@@ -253,7 +252,6 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
253
252
|
new GenericIssueDetailsView(this, this.#issue),
|
254
253
|
new AffectedDocumentsInQuirksModeView(this, this.#issue),
|
255
254
|
new AttributionReportingIssueDetailsView(this, this.#issue),
|
256
|
-
new WasmCrossOriginModuleSharingAffectedResourcesView(this, this.#issue),
|
257
255
|
new AffectedRawCookieLinesView(this, this.#issue),
|
258
256
|
];
|
259
257
|
if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
|
@@ -69,6 +69,22 @@ const UIStrings = {
|
|
69
69
|
* the sidebar containing the navigator tool.
|
70
70
|
*/
|
71
71
|
hideNavigator: 'Hide navigator',
|
72
|
+
/**
|
73
|
+
* @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.
|
74
|
+
*/
|
75
|
+
navigatorShown: 'Navigator sidebar shown',
|
76
|
+
/**
|
77
|
+
* @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.
|
78
|
+
*/
|
79
|
+
navigatorHidden: 'Navigator sidebar hidden',
|
80
|
+
/**
|
81
|
+
* @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.
|
82
|
+
*/
|
83
|
+
debuggerShown: 'Debugger sidebar shown',
|
84
|
+
/**
|
85
|
+
* @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.
|
86
|
+
*/
|
87
|
+
debuggerHidden: 'Debugger sidebar hidden',
|
72
88
|
/**
|
73
89
|
* @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the
|
74
90
|
* sidebar containing the debugger tool.
|
@@ -252,9 +268,11 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
|
|
252
268
|
this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));
|
253
269
|
|
254
270
|
this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(
|
255
|
-
i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator))
|
271
|
+
i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),
|
272
|
+
i18nString(UIStrings.navigatorHidden));
|
256
273
|
this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(
|
257
|
-
i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger))
|
274
|
+
i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),
|
275
|
+
i18nString(UIStrings.debuggerHidden));
|
258
276
|
this.editorView.setMainWidget(this.sourcesViewInternal);
|
259
277
|
|
260
278
|
this.threadsSidebarPane = null;
|
@@ -137,6 +137,14 @@ const UIStrings = {
|
|
137
137
|
* Performance panel. Command to close/hide the sidebar.
|
138
138
|
*/
|
139
139
|
hideHeaviestStack: 'Hide Heaviest stack',
|
140
|
+
/**
|
141
|
+
* @description Screen reader announcement when the heaviest stack sidebar is shown in the Performance panel.
|
142
|
+
*/
|
143
|
+
heaviestStackShown: 'Heaviest stack sidebar shown',
|
144
|
+
/**
|
145
|
+
* @description Screen reader announcement when the heaviest stack sidebar is hidden in the Performance panel.
|
146
|
+
*/
|
147
|
+
heaviestStackHidden: 'Heaviest stack sidebar hidden',
|
140
148
|
/**
|
141
149
|
*@description Data grid name for Timeline Stack data grids
|
142
150
|
*/
|
@@ -832,7 +840,8 @@ export class AggregatedTimelineTreeView extends TimelineTreeView {
|
|
832
840
|
new UI.Toolbar.ToolbarSettingComboBox(options, this.groupBySetting, i18nString(UIStrings.groupBy)));
|
833
841
|
toolbar.appendSpacer();
|
834
842
|
toolbar.appendToolbarItem(this.splitWidget.createShowHideSidebarButton(
|
835
|
-
i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack)
|
843
|
+
i18nString(UIStrings.showHeaviestStack), i18nString(UIStrings.hideHeaviestStack),
|
844
|
+
i18nString(UIStrings.heaviestStackShown), i18nString(UIStrings.heaviestStackHidden)));
|
836
845
|
}
|
837
846
|
|
838
847
|
private buildHeaviestStack(treeNode: TimelineModel.TimelineProfileTree.Node):
|
@@ -128,6 +128,11 @@ export class Button extends HTMLElement {
|
|
128
128
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
129
129
|
}
|
130
130
|
|
131
|
+
set title(title: string) {
|
132
|
+
this.#props.title = title;
|
133
|
+
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
134
|
+
}
|
135
|
+
|
131
136
|
set disabled(disabled: boolean) {
|
132
137
|
this.#setDisabledProperty(disabled);
|
133
138
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
@@ -212,7 +217,7 @@ export class Button extends HTMLElement {
|
|
212
217
|
// clang-format off
|
213
218
|
LitHtml.render(
|
214
219
|
LitHtml.html`
|
215
|
-
<button
|
220
|
+
<button title=${LitHtml.Directives.ifDefined(this.#props.title)} .disabled=${this.#props.disabled} class=${LitHtml.Directives.classMap(classes)}>
|
216
221
|
${this.#props.iconUrl ? LitHtml.html`<${IconButton.Icon.Icon.litTagName}
|
217
222
|
.data=${{
|
218
223
|
iconPath: this.#props.iconUrl,
|
@@ -12,18 +12,13 @@ function appendComponent(data: IconButton.IconButton.IconButtonData) {
|
|
12
12
|
|
13
13
|
appendComponent({
|
14
14
|
clickHandler: (): void => {},
|
15
|
-
groups: [{iconName: 'survey_feedback_icon',
|
16
|
-
});
|
17
|
-
|
18
|
-
appendComponent({
|
19
|
-
clickHandler: (): void => {},
|
20
|
-
groups: [{iconName: 'survey_feedback_icon', iconColor: 'black', text: '1 item'}],
|
15
|
+
groups: [{iconName: 'survey_feedback_icon', text: '1 item'}],
|
21
16
|
});
|
22
17
|
|
23
18
|
appendComponent({
|
24
19
|
clickHandler: (): void => {},
|
25
20
|
groups: [
|
26
|
-
{iconName: 'survey_feedback_icon', iconColor: '
|
21
|
+
{iconName: 'survey_feedback_icon', iconColor: 'var(--color-primary)', text: 'Test'},
|
27
22
|
{iconName: 'warning_icon', iconColor: '', text: '1'},
|
28
23
|
],
|
29
24
|
});
|
@@ -85,7 +85,7 @@ export class IconButton extends HTMLElement {
|
|
85
85
|
${filteredGroups.map(counter =>
|
86
86
|
LitHtml.html`
|
87
87
|
<${Icon.litTagName} class="status-icon"
|
88
|
-
.data=${{iconName: counter.iconName, color: counter.iconColor || '', width: counter.iconWidth || '1.5ex', height: counter.iconHeight || '1.5ex'} as IconData}>
|
88
|
+
.data=${{iconName: counter.iconName, color: counter.iconColor || 'var(--color-text-primary)', width: counter.iconWidth || '1.5ex', height: counter.iconHeight || '1.5ex'} as IconData}>
|
89
89
|
</${Icon.litTagName}>
|
90
90
|
${this.#compact ? LitHtml.html`<!-- Force line-height for this element --><span>​</span>` : LitHtml.nothing}
|
91
91
|
<span class="icon-button-title">${counter.text}</span>
|
@@ -5,11 +5,12 @@
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
6
6
|
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
7
7
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
8
|
+
import * as ThemeSupport from '../../legacy/theme_support/theme_support.js';
|
8
9
|
import * as LitHtml from '../../lit-html/lit-html.js';
|
9
10
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
10
11
|
import * as ComponentHelpers from '../helpers/helpers.js';
|
11
12
|
|
12
|
-
import {baseConfiguration, dynamicSetting, DynamicSetting} from './config.js';
|
13
|
+
import {baseConfiguration, dummyDarkTheme, dynamicSetting, DynamicSetting, themeSelection} from './config.js';
|
13
14
|
import {toLineColumn, toOffset} from './position.js';
|
14
15
|
|
15
16
|
declare global {
|
@@ -66,6 +67,12 @@ export class TextEditor extends HTMLElement {
|
|
66
67
|
});
|
67
68
|
this.#ensureSettingListeners();
|
68
69
|
this.#startObservingResize();
|
70
|
+
ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
|
71
|
+
const currentTheme = ThemeSupport.ThemeSupport.instance().themeName() === 'dark' ? dummyDarkTheme : [];
|
72
|
+
this.editor.dispatch({
|
73
|
+
effects: themeSelection.reconfigure(currentTheme),
|
74
|
+
});
|
75
|
+
});
|
69
76
|
return this.#activeEditor;
|
70
77
|
}
|
71
78
|
|
@@ -202,10 +202,11 @@ function themeIsDark(): boolean {
|
|
202
202
|
return setting === 'systemPreferred' ? window.matchMedia('(prefers-color-scheme: dark)').matches : setting === 'dark';
|
203
203
|
}
|
204
204
|
|
205
|
-
const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
|
205
|
+
export const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
|
206
|
+
export const themeSelection = new CM.Compartment();
|
206
207
|
|
207
208
|
export function theme(): CM.Extension {
|
208
|
-
return [editorTheme, themeIsDark() ? dummyDarkTheme : []];
|
209
|
+
return [editorTheme, themeIsDark() ? themeSelection.of(dummyDarkTheme) : themeSelection.of([])];
|
209
210
|
}
|
210
211
|
|
211
212
|
let sideBarElement: HTMLElement|null = null;
|
@@ -31,6 +31,7 @@
|
|
31
31
|
import * as Common from '../../core/common/common.js';
|
32
32
|
import * as Platform from '../../core/platform/platform.js';
|
33
33
|
|
34
|
+
import * as ARIAUtils from './ARIAUtils.js';
|
34
35
|
import {Constraints} from './Geometry.js';
|
35
36
|
import type {ResizeUpdatePositionEvent} from './ResizerWidget.js';
|
36
37
|
import {Events as ResizerWidgetEvents, SimpleResizerWidget} from './ResizerWidget.js';
|
@@ -815,8 +816,9 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
815
816
|
this.forceUpdateLayout();
|
816
817
|
}
|
817
818
|
|
818
|
-
createShowHideSidebarButton(
|
819
|
-
|
819
|
+
createShowHideSidebarButton(
|
820
|
+
showTitle: Common.UIString.LocalizedString, hideTitle: Common.UIString.LocalizedString,
|
821
|
+
shownString: Common.UIString.LocalizedString, hiddenString: Common.UIString.LocalizedString): ToolbarButton {
|
820
822
|
this.showSidebarButtonTitle = showTitle;
|
821
823
|
this.hideSidebarButtonTitle = hideTitle;
|
822
824
|
this.showHideSidebarButton = new ToolbarButton('', '');
|
@@ -826,8 +828,10 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
826
828
|
function buttonClicked(this: SplitWidget): void {
|
827
829
|
if (this.showModeInternal !== ShowMode.Both) {
|
828
830
|
this.showBoth(true);
|
831
|
+
ARIAUtils.alert(shownString);
|
829
832
|
} else {
|
830
833
|
this.hideSidebar(true);
|
834
|
+
ARIAUtils.alert(hiddenString);
|
831
835
|
}
|
832
836
|
}
|
833
837
|
|
@@ -1031,7 +1031,7 @@ export class LongClickController {
|
|
1031
1031
|
if (!this.longClickData) {
|
1032
1032
|
return;
|
1033
1033
|
}
|
1034
|
-
this.element.removeEventListener('
|
1034
|
+
this.element.removeEventListener('pointerdown', this.longClickData.mouseDown, false);
|
1035
1035
|
this.element.removeEventListener('pointerout', this.longClickData.reset, false);
|
1036
1036
|
this.element.removeEventListener('pointerup', this.longClickData.mouseUp, false);
|
1037
1037
|
this.element.addEventListener('click', this.longClickData.reset, true);
|
package/package.json
CHANGED
@@ -49,7 +49,8 @@ def main(argv):
|
|
49
49
|
for listed_directory in listed_third_party_directories_json:
|
50
50
|
if (listed_directory not in found_directories
|
51
51
|
# TODO(crbug.com/1287519): Remove exception for codemirror 5
|
52
|
-
and not listed_directory == "codemirror"
|
52
|
+
and not listed_directory == "codemirror"
|
53
|
+
and not listed_directory == "puppeteer"):
|
53
54
|
print(
|
54
55
|
"Directory `" + listed_directory + "`" +
|
55
56
|
" is not included in `config/gni/devtools_grd_files.gni`." +
|
@@ -90,8 +90,6 @@ template("devtools_entrypoint") {
|
|
90
90
|
_copy_target_name = _entrypoint_target_name + "-copy"
|
91
91
|
_rollup_target_name = _entrypoint_target_name + "-rollup"
|
92
92
|
_prebundle_target_name = _entrypoint_target_name + "-tsconfig"
|
93
|
-
_generated_declaration_target_name =
|
94
|
-
_entrypoint_target_name + "-generate-declaration"
|
95
93
|
|
96
94
|
node_action(_copy_target_name) {
|
97
95
|
script = "scripts/build/ninja/copy-file.js"
|
@@ -146,27 +144,37 @@ template("devtools_entrypoint") {
|
|
146
144
|
public_deps = [ ":$_prebundle_target_name" ] + invoker.deps
|
147
145
|
}
|
148
146
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
# rolled up bundle remains the same.
|
153
|
-
node_action(_generated_declaration_target_name) {
|
154
|
-
script = "scripts/build/ninja/generate-declaration.js"
|
147
|
+
if (!devtools_skip_typecheck) {
|
148
|
+
_generated_declaration_target_name =
|
149
|
+
_entrypoint_target_name + "-generate-declaration"
|
155
150
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
151
|
+
# TypeScript requires a `module.d.ts` that describes
|
152
|
+
# the public API of the `module.js` entrypoint. To do so, we copy
|
153
|
+
# the generated `prebundle.d.ts` over, as the public API for a
|
154
|
+
# rolled up bundle remains the same.
|
155
|
+
node_action(_generated_declaration_target_name) {
|
156
|
+
script = "scripts/build/ninja/generate-declaration.js"
|
157
|
+
|
158
|
+
args = [
|
159
|
+
rebase_path(target_gen_dir, root_build_dir),
|
160
|
+
invoker.entrypoint,
|
161
|
+
]
|
160
162
|
|
161
|
-
|
163
|
+
public_deps = [
|
164
|
+
":$_prebundle_target_name",
|
165
|
+
":$_rollup_target_name",
|
166
|
+
]
|
167
|
+
|
168
|
+
outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
|
169
|
+
}
|
170
|
+
|
171
|
+
_devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
|
172
|
+
} else {
|
173
|
+
_devtools_entrypoint_deps += [
|
162
174
|
":$_prebundle_target_name",
|
163
175
|
":$_rollup_target_name",
|
164
176
|
]
|
165
|
-
|
166
|
-
outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
|
167
177
|
}
|
168
|
-
|
169
|
-
_devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
|
170
178
|
}
|
171
179
|
|
172
180
|
# Because we change the filename before rolling up the bundle,
|
@@ -75,6 +75,10 @@ def hosted_mode_script_path():
|
|
75
75
|
return path.join(devtools_root_path(), 'scripts', 'hosted_mode', 'server.js')
|
76
76
|
|
77
77
|
|
78
|
+
def esbuild_path():
|
79
|
+
return path.join(devtools_root_path(), 'third_party', 'esbuild', 'esbuild')
|
80
|
+
|
81
|
+
|
78
82
|
def downloaded_chrome_binary_path():
|
79
83
|
return path.abspath(path.join(
|
80
84
|
*{
|
@@ -62,15 +62,10 @@ const emitHeaderComments = () => {
|
|
62
62
|
emitLine();
|
63
63
|
};
|
64
64
|
|
65
|
-
const emitModule = (
|
66
|
-
moduleName = toTitleCase(moduleName);
|
65
|
+
const emitModule = (domains: Protocol.Domain[]) => {
|
67
66
|
emitHeaderComments();
|
68
|
-
emitOpenBlock(`declare namespace ${moduleName}`);
|
69
67
|
emitGlobalTypeDefs();
|
70
68
|
domains.forEach(emitDomain);
|
71
|
-
emitCloseBlock();
|
72
|
-
emitLine();
|
73
|
-
emitLine('export = Protocol;');
|
74
69
|
};
|
75
70
|
|
76
71
|
const emitGlobalTypeDefs = () => {
|
@@ -443,9 +438,9 @@ const flushEmitToFile = (path: string) => {
|
|
443
438
|
const main = () => {
|
444
439
|
const FRONTEND_GENERATED_DIR = path.resolve(__dirname, path.join('../../front_end/generated'));
|
445
440
|
|
446
|
-
const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.
|
447
|
-
const protocolModuleName = path.basename(destProtocolFilePath, '.
|
448
|
-
emitModule(
|
441
|
+
const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.ts');
|
442
|
+
const protocolModuleName = path.basename(destProtocolFilePath, '.ts');
|
443
|
+
emitModule(protocolDomains);
|
449
444
|
flushEmitToFile(destProtocolFilePath);
|
450
445
|
|
451
446
|
const destMappingFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol-mapping.d.ts');
|