chrome-devtools-frontend 1.0.950001 → 1.0.950971
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/config/gni/devtools_grd_files.gni +0 -1
- package/docs/triage_guidelines.md +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +1 -14
- package/front_end/core/platform/platform.ts +1 -2
- package/front_end/core/platform/typescript-utilities.ts +4 -0
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +37 -6
- package/front_end/panels/animation/animationTimeline.css +2 -1
- package/front_end/panels/console/ConsolePrompt.ts +14 -8
- package/front_end/panels/profiler/heapProfiler.css +1 -1
- package/front_end/panels/settings/settingsScreen.css +8 -3
- package/front_end/panels/sources/BreakpointEditDialog.ts +8 -5
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +15 -0
- package/front_end/third_party/codemirror.next/package.json +3 -3
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +16 -0
- package/front_end/ui/components/report_view/report.css +0 -1
- package/front_end/ui/components/text_editor/config.ts +7 -4
- package/front_end/ui/components/text_editor/javascript.ts +16 -7
- package/inspector_overlay/main.ts +16 -2
- package/package.json +1 -1
- package/scripts/build/ninja/copy.gni +2 -2
- package/front_end/core/platform/utilities.ts +0 -49
|
@@ -554,7 +554,6 @@ grd_files_debug_sources = [
|
|
|
554
554
|
"front_end/core/platform/set-utilities.js",
|
|
555
555
|
"front_end/core/platform/string-utilities.js",
|
|
556
556
|
"front_end/core/platform/typescript-utilities.js",
|
|
557
|
-
"front_end/core/platform/utilities.js",
|
|
558
557
|
"front_end/core/protocol_client/InspectorBackend.js",
|
|
559
558
|
"front_end/core/protocol_client/NodeURL.js",
|
|
560
559
|
"front_end/core/root/Runtime.js",
|
|
@@ -45,8 +45,8 @@ Issues in the untriaged queue should receive a meaningful response within a busi
|
|
|
45
45
|
|
|
46
46
|
- Close issues as `WontFix` if they don't reproduce (in simple cases) or are requests for features we've already concluded not to pursue.
|
|
47
47
|
- Close issues as `Archived` that are valid, but it seems unlikely that we will get there anytime soon.
|
|
48
|
-
- Move issues out of `Platform>DevTools` if they are not DevTools issues (but just reported via the menu item in DevTools), put on the `
|
|
49
|
-
- Assign regression bugs with bisects to individuals directly and set the status to `Assigned`.
|
|
48
|
+
- Move issues out of `Platform>DevTools` if they are not DevTools issues (but just reported via the menu item in DevTools), put on the `DevTools-Triaged` label and leave the `Untriaged` status as is.
|
|
49
|
+
- Assign regression bugs with bisects to individuals directly and set the status to `Assigned`.
|
|
50
50
|
- Put proper `Platform>DevTools>XXX` component(s) on the issue and do an initial check-in regarding the priority.
|
|
51
51
|
- Put one of the following labels on it and set the status to `Available`:
|
|
52
52
|
- `Hotlist-DevTools-ProductReview` if it's controversial or clear that consensus needs to be built first.
|
|
@@ -457,7 +457,7 @@ Node.prototype.isSelfOrDescendant = function(node: Node|null): boolean {
|
|
|
457
457
|
return Boolean(node) && (node === this || this.isDescendant(node));
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
Node.prototype.traverseNextNode = function(stayWithin?: Node, skipShadowRoot
|
|
460
|
+
Node.prototype.traverseNextNode = function(stayWithin?: Node, skipShadowRoot: boolean = false): Node|null {
|
|
461
461
|
if (!skipShadowRoot && this.shadowRoot) {
|
|
462
462
|
return this.shadowRoot;
|
|
463
463
|
}
|
|
@@ -357,7 +357,6 @@ export enum EnumeratedHistogram {
|
|
|
357
357
|
IssuesPanelOpenedFrom = 'DevTools.IssuesPanelOpenedFrom',
|
|
358
358
|
IssuesPanelResourceOpened = 'DevTools.IssuesPanelResourceOpened',
|
|
359
359
|
KeybindSetSettingChanged = 'DevTools.KeybindSetSettingChanged',
|
|
360
|
-
DualScreenDeviceEmulated = 'DevTools.DualScreenDeviceEmulated',
|
|
361
360
|
ExperimentEnabledAtLaunch = 'DevTools.ExperimentEnabledAtLaunch',
|
|
362
361
|
ExperimentEnabled = 'DevTools.ExperimentEnabled',
|
|
363
362
|
ExperimentDisabled = 'DevTools.ExperimentDisabled',
|
|
@@ -158,12 +158,6 @@ export class UserMetrics {
|
|
|
158
158
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.IssueCreated, issueCreated, size);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
dualScreenDeviceEmulated(emulationAction: DualScreenDeviceEmulated): void {
|
|
162
|
-
const size = Object.keys(DualScreenDeviceEmulated).length + 1;
|
|
163
|
-
InspectorFrontendHostInstance.recordEnumeratedHistogram(
|
|
164
|
-
EnumeratedHistogram.DualScreenDeviceEmulated, emulationAction, size);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
161
|
experimentEnabledAtLaunch(experimentId: string): void {
|
|
168
162
|
const size = DevtoolsExperiments['__lastValidEnumPosition'] + 1;
|
|
169
163
|
const experiment = DevtoolsExperiments[experimentId];
|
|
@@ -537,14 +531,6 @@ export enum IssueOpener {
|
|
|
537
531
|
CommandMenu = 5,
|
|
538
532
|
}
|
|
539
533
|
|
|
540
|
-
// TODO(crbug.com/1167717): Make this a const enum again
|
|
541
|
-
// eslint-disable-next-line rulesdir/const_enum
|
|
542
|
-
export enum DualScreenDeviceEmulated {
|
|
543
|
-
DualScreenDeviceSelected = 0,
|
|
544
|
-
SpanButtonClicked = 1,
|
|
545
|
-
PlatformSupportUsed = 2, // user starts to use platform dual screen support feature.
|
|
546
|
-
}
|
|
547
|
-
|
|
548
534
|
/**
|
|
549
535
|
* This list should contain the currently active Devtools Experiments.
|
|
550
536
|
* Therefore, it is possible that the id's will no longer be continuous
|
|
@@ -686,6 +672,7 @@ export const IssueCreated: {
|
|
|
686
672
|
'CorsIssue::CorsDisabledScheme': 53,
|
|
687
673
|
'CorsIssue::PreflightMissingAllowExternal': 54,
|
|
688
674
|
'CorsIssue::PreflightInvalidAllowExternal': 55,
|
|
675
|
+
'CorsIssue::InvalidResponse': 56,
|
|
689
676
|
'CorsIssue::NoCorsRedirectModeNotFollow': 57,
|
|
690
677
|
'QuirksModeIssue::QuirksMode': 58,
|
|
691
678
|
'QuirksModeIssue::LimitedQuirksMode': 59,
|
|
@@ -45,8 +45,7 @@ export {DCHECK} from './dcheck.js';
|
|
|
45
45
|
* (e.g. `Platform.TypeScriptUtilities.assertNotNull` causes a
|
|
46
46
|
* compiler error)
|
|
47
47
|
*/
|
|
48
|
-
export {assertNotNullOrUndefined, assertUnhandled} from './typescript-utilities.js';
|
|
49
|
-
export {assertNever, runOnWindowLoad} from './utilities.js';
|
|
48
|
+
export {assertNever, assertNotNullOrUndefined, assertUnhandled} from './typescript-utilities.js';
|
|
50
49
|
export {
|
|
51
50
|
ArrayUtilities,
|
|
52
51
|
DateUtilities,
|
|
@@ -13,6 +13,10 @@ export function assertNotNullOrUndefined<T>(val: T): asserts val is NonNullable<
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
export function assertNever(type: never, message: string): never {
|
|
17
|
+
throw new Error(message);
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
/**
|
|
17
21
|
* This is useful to check on the type-level that the unhandled cases of
|
|
18
22
|
* a switch are exactly `T` (where T is usually a union type of enum values).
|
|
@@ -385,7 +385,6 @@
|
|
|
385
385
|
IssuesPanelOpenedFrom: 'DevTools.IssuesPanelOpenedFrom',
|
|
386
386
|
IssuesPanelResourceOpened: 'DevTools.IssuesPanelResourceOpened',
|
|
387
387
|
KeybindSetSettingChanged: 'DevTools.KeybindSetSettingChanged',
|
|
388
|
-
DualScreenDeviceEmulated: 'DevTools.DualScreenDeviceEmulated',
|
|
389
388
|
ExperimentEnabledAtLaunch: 'DevTools.ExperimentEnabledAtLaunch',
|
|
390
389
|
ExperimentEnabled: 'DevTools.ExperimentEnabled',
|
|
391
390
|
ExperimentDisabled: 'DevTools.ExperimentDisabled',
|
|
@@ -5,13 +5,8 @@
|
|
|
5
5
|
import '../../core/dom_extension/dom_extension.js';
|
|
6
6
|
import '../../Images/Images.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Platform.runOnWindowLoad(() => {
|
|
11
|
-
if (!window.opener) {
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
8
|
+
if (window.opener) {
|
|
14
9
|
// @ts-ignore TypeScript doesn't know about `Emulation` on `Window`.
|
|
15
10
|
const app = window.opener.Emulation.AdvancedApp.instance();
|
|
16
11
|
app.deviceModeEmulationFrameLoaded(document);
|
|
17
|
-
}
|
|
12
|
+
}
|
|
@@ -81,7 +81,11 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
|
81
81
|
case IssueCode.InvalidAttributionSourceEventId:
|
|
82
82
|
return {
|
|
83
83
|
file: 'arInvalidAttributionSourceEventId.md',
|
|
84
|
-
links: [
|
|
84
|
+
links: [{
|
|
85
|
+
link:
|
|
86
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourceeventid-required',
|
|
87
|
+
linkTitle: 'attributionsourceeventid attribute',
|
|
88
|
+
}],
|
|
85
89
|
};
|
|
86
90
|
case IssueCode.InvalidAttributionData:
|
|
87
91
|
return {
|
|
@@ -101,7 +105,18 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
|
101
105
|
case IssueCode.AttributionSourceUntrustworthyOrigin:
|
|
102
106
|
return {
|
|
103
107
|
file: 'arAttributionSourceUntrustworthyOrigin.md',
|
|
104
|
-
links: [
|
|
108
|
+
links: [
|
|
109
|
+
{
|
|
110
|
+
link:
|
|
111
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributiondestination-required',
|
|
112
|
+
linkTitle: 'attributiondestination attribute',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
link:
|
|
116
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionreportto',
|
|
117
|
+
linkTitle: 'attributionreportto attribute',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
105
120
|
};
|
|
106
121
|
case IssueCode.AttributionUntrustworthyFrameOrigin:
|
|
107
122
|
return {
|
|
@@ -126,12 +141,20 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
|
126
141
|
case IssueCode.InvalidAttributionSourceExpiry:
|
|
127
142
|
return {
|
|
128
143
|
file: 'arInvalidAttributionSourceExpiry.md',
|
|
129
|
-
links: [
|
|
144
|
+
links: [{
|
|
145
|
+
link:
|
|
146
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionexpiry',
|
|
147
|
+
linkTitle: 'attributionexpiry attribute',
|
|
148
|
+
}],
|
|
130
149
|
};
|
|
131
150
|
case IssueCode.InvalidAttributionSourcePriority:
|
|
132
151
|
return {
|
|
133
152
|
file: 'arInvalidAttributionSourcePriority.md',
|
|
134
|
-
links: [
|
|
153
|
+
links: [{
|
|
154
|
+
link:
|
|
155
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourcepriority',
|
|
156
|
+
linkTitle: 'attributionsourcepriority attribute',
|
|
157
|
+
}],
|
|
135
158
|
};
|
|
136
159
|
case IssueCode.InvalidEventSourceTriggerData:
|
|
137
160
|
return {
|
|
@@ -141,12 +164,20 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
|
141
164
|
case IssueCode.InvalidTriggerPriority:
|
|
142
165
|
return {
|
|
143
166
|
file: 'arInvalidTriggerPriority.md',
|
|
144
|
-
links: [
|
|
167
|
+
links: [{
|
|
168
|
+
link:
|
|
169
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#prioritize-specific-conversions',
|
|
170
|
+
linkTitle: 'Prioritizing specific conversions',
|
|
171
|
+
}],
|
|
145
172
|
};
|
|
146
173
|
case IssueCode.InvalidTriggerDedupKey:
|
|
147
174
|
return {
|
|
148
175
|
file: 'arInvalidTriggerDedupKey.md',
|
|
149
|
-
links: [
|
|
176
|
+
links: [{
|
|
177
|
+
link:
|
|
178
|
+
'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#deduplicate-reports',
|
|
179
|
+
linkTitle: 'Deduplicating reports',
|
|
180
|
+
}],
|
|
150
181
|
};
|
|
151
182
|
}
|
|
152
183
|
}
|
|
@@ -207,7 +207,14 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
207
207
|
{key: 'ArrowDown', run: (): boolean => this.moveHistory(1)},
|
|
208
208
|
{mac: 'Ctrl-p', run: (): boolean => this.moveHistory(-1, true)},
|
|
209
209
|
{mac: 'Ctrl-n', run: (): boolean => this.moveHistory(1, true)},
|
|
210
|
-
{
|
|
210
|
+
{
|
|
211
|
+
key: 'Enter',
|
|
212
|
+
run: (): boolean => {
|
|
213
|
+
this.handleEnter();
|
|
214
|
+
return true;
|
|
215
|
+
},
|
|
216
|
+
shift: CodeMirror.insertNewlineAndIndent,
|
|
217
|
+
},
|
|
211
218
|
];
|
|
212
219
|
}
|
|
213
220
|
|
|
@@ -242,29 +249,28 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
242
249
|
return true;
|
|
243
250
|
}
|
|
244
251
|
|
|
245
|
-
private enterWillEvaluate(): boolean {
|
|
252
|
+
private async enterWillEvaluate(): Promise<boolean> {
|
|
246
253
|
const {state} = this.editor;
|
|
247
|
-
return state.doc.length > 0 && TextEditor.JavaScript.isExpressionComplete(state);
|
|
254
|
+
return state.doc.length > 0 && await TextEditor.JavaScript.isExpressionComplete(state.doc.toString());
|
|
248
255
|
}
|
|
249
256
|
|
|
250
|
-
private
|
|
251
|
-
if (this.enterWillEvaluate()) {
|
|
257
|
+
private async handleEnter(): Promise<void> {
|
|
258
|
+
if (await this.enterWillEvaluate()) {
|
|
252
259
|
this.appendCommand(this.text(), true);
|
|
253
260
|
this.editor.dispatch({
|
|
254
261
|
changes: {from: 0, to: this.editor.state.doc.length},
|
|
255
262
|
scrollIntoView: true,
|
|
256
263
|
});
|
|
257
264
|
} else if (this.editor.state.doc.length) {
|
|
258
|
-
|
|
265
|
+
CodeMirror.insertNewlineAndIndent(this.editor.editor);
|
|
259
266
|
} else {
|
|
260
267
|
this.editor.dispatch({scrollIntoView: true});
|
|
261
268
|
}
|
|
262
|
-
return true;
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
private updatePromptIcon(): void {
|
|
266
272
|
this.iconThrottler.schedule(async () => {
|
|
267
|
-
this.promptIcon.classList.toggle('console-prompt-incomplete', !this.enterWillEvaluate());
|
|
273
|
+
this.promptIcon.classList.toggle('console-prompt-incomplete', !(await this.enterWillEvaluate()));
|
|
268
274
|
});
|
|
269
275
|
}
|
|
270
276
|
|
|
@@ -137,12 +137,13 @@ fieldset {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
#experiments-tab-content .settings-container {
|
|
140
|
-
column-width:
|
|
140
|
+
column-width: auto;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
#experiments-tab-content .settings-block {
|
|
144
|
-
width:
|
|
144
|
+
width: auto;
|
|
145
145
|
margin-left: 0;
|
|
146
|
+
margin-right: 10px;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
.settings-tab-container header > h1 {
|
|
@@ -172,7 +173,11 @@ fieldset {
|
|
|
172
173
|
|
|
173
174
|
.settings-experiment {
|
|
174
175
|
display: grid;
|
|
175
|
-
grid-template-columns: auto 1fr;
|
|
176
|
+
grid-template-columns: auto min-content 1fr;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.settings-experiment [is="dt-checkbox"] {
|
|
180
|
+
padding-right: 10px;
|
|
176
181
|
}
|
|
177
182
|
|
|
178
183
|
.settings-experiment .devtools-link {
|
|
@@ -106,11 +106,14 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
|
|
|
106
106
|
|
|
107
107
|
const content = oldCondition || '';
|
|
108
108
|
const finishIfComplete = (view: CodeMirror.EditorView): boolean => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
TextEditor.JavaScript.isExpressionComplete(view.state.doc.toString()).then((complete): void => {
|
|
110
|
+
if (complete) {
|
|
111
|
+
this.finishEditing(true, this.editor.state.doc.toString());
|
|
112
|
+
} else {
|
|
113
|
+
CodeMirror.insertNewlineAndIndent(view);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return true;
|
|
114
117
|
};
|
|
115
118
|
const keymap = [
|
|
116
119
|
{
|
|
@@ -842,7 +842,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
842
842
|
|
|
843
843
|
private recordingFailed(error: string): void {
|
|
844
844
|
if (this.statusPane) {
|
|
845
|
-
this.statusPane.
|
|
845
|
+
this.statusPane.remove();
|
|
846
846
|
}
|
|
847
847
|
this.statusPane = new StatusPane(
|
|
848
848
|
{
|
|
@@ -1036,7 +1036,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
1036
1036
|
this.hideLandingPage();
|
|
1037
1037
|
|
|
1038
1038
|
if (this.statusPane) {
|
|
1039
|
-
this.statusPane.
|
|
1039
|
+
this.statusPane.remove();
|
|
1040
1040
|
}
|
|
1041
1041
|
this.statusPane = new StatusPane(
|
|
1042
1042
|
{
|
|
@@ -1073,7 +1073,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
|
|
|
1073
1073
|
this.setState(State.Idle);
|
|
1074
1074
|
|
|
1075
1075
|
if (this.statusPane) {
|
|
1076
|
-
this.statusPane.
|
|
1076
|
+
this.statusPane.remove();
|
|
1077
1077
|
}
|
|
1078
1078
|
this.statusPane = null;
|
|
1079
1079
|
|
|
@@ -1405,9 +1405,10 @@ export class StatusPane extends UI.Widget.VBox {
|
|
|
1405
1405
|
this.button.disabled = true;
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
-
|
|
1408
|
+
remove(): void {
|
|
1409
1409
|
(this.element.parentNode as HTMLElement).classList.remove('tinted');
|
|
1410
1410
|
this.arrangeDialog((this.element.parentNode as HTMLElement));
|
|
1411
|
+
this.stopTimer();
|
|
1411
1412
|
this.element.remove();
|
|
1412
1413
|
}
|
|
1413
1414
|
|