chrome-devtools-frontend 1.0.950001 → 1.0.950484
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/front_end/core/host/UserMetrics.ts +1 -0
- 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/sources/BreakpointEditDialog.ts +8 -5
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +16 -0
- package/front_end/ui/components/text_editor/javascript.ts +16 -7
- package/package.json +1 -1
|
@@ -686,6 +686,7 @@ export const IssueCreated: {
|
|
|
686
686
|
'CorsIssue::CorsDisabledScheme': 53,
|
|
687
687
|
'CorsIssue::PreflightMissingAllowExternal': 54,
|
|
688
688
|
'CorsIssue::PreflightInvalidAllowExternal': 55,
|
|
689
|
+
'CorsIssue::InvalidResponse': 56,
|
|
689
690
|
'CorsIssue::NoCorsRedirectModeNotFollow': 57,
|
|
690
691
|
'QuirksModeIssue::QuirksMode': 58,
|
|
691
692
|
'QuirksModeIssue::LimitedQuirksMode': 59,
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -27,9 +27,25 @@ export const markdownLinks = new Map<string, string>([
|
|
|
27
27
|
],
|
|
28
28
|
['issueQuirksModeDoctype', 'https://web.dev/doctype/'],
|
|
29
29
|
['sameSiteAndSameOrigin', 'https://web.dev/same-site-same-origin/'],
|
|
30
|
+
// Link URLs for deprecation issues (see blink::Deprecation)
|
|
31
|
+
['https://xhr.spec.whatwg.org/', 'https://xhr.spec.whatwg.org/'],
|
|
32
|
+
['https://goo.gl/rStTGz', 'https://goo.gl/rStTGz'],
|
|
33
|
+
['https://webrtc.org/web-apis/chrome/unified-plan/', 'https://webrtc.org/web-apis/chrome/unified-plan/'],
|
|
34
|
+
[
|
|
35
|
+
'https://developer.chrome.com/blog/enabling-shared-array-buffer/',
|
|
36
|
+
'https://developer.chrome.com/blog/enabling-shared-array-buffer/',
|
|
37
|
+
],
|
|
38
|
+
['https://developer.chrome.com/docs/extensions/mv3/', 'https://developer.chrome.com/docs/extensions/mv3/'],
|
|
39
|
+
[
|
|
40
|
+
'https://developer.chrome.com/blog/immutable-document-domain',
|
|
41
|
+
'https://developer.chrome.com/blog/immutable-document-domain',
|
|
42
|
+
],
|
|
30
43
|
]);
|
|
31
44
|
|
|
32
45
|
export const getMarkdownLink = (key: string): string => {
|
|
46
|
+
if (/^https:\/\/www.chromestatus.com\/feature\/\d+$/.test(key)) {
|
|
47
|
+
return key;
|
|
48
|
+
}
|
|
33
49
|
const link = markdownLinks.get(key);
|
|
34
50
|
if (!link) {
|
|
35
51
|
throw new Error(`Markdown link with key '${key}' is not available, please check MarkdownLinksMap.ts`);
|
|
@@ -402,13 +402,22 @@ async function completeExpressionGlobal(): Promise<CompletionSet> {
|
|
|
402
402
|
return fetchNames;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
export function isExpressionComplete(
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
405
|
+
export async function isExpressionComplete(expression: string): Promise<boolean> {
|
|
406
|
+
const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
407
|
+
if (!currentExecutionContext) {
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
410
|
+
const result =
|
|
411
|
+
await currentExecutionContext.runtimeModel.compileScript(expression, '', false, currentExecutionContext.id);
|
|
412
|
+
if (!result || !result.exceptionDetails || !result.exceptionDetails.exception) {
|
|
413
|
+
return true;
|
|
414
|
+
}
|
|
415
|
+
const description = result.exceptionDetails.exception.description;
|
|
416
|
+
if (description) {
|
|
417
|
+
return !description.startsWith('SyntaxError: Unexpected end of input') &&
|
|
418
|
+
!description.startsWith('SyntaxError: Unterminated template literal');
|
|
419
|
+
}
|
|
420
|
+
return false;
|
|
412
421
|
}
|
|
413
422
|
|
|
414
423
|
export function argumentHints(): CodeMirror.Extension {
|
package/package.json
CHANGED