chrome-devtools-frontend 1.0.1529186 → 1.0.1529904
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/common/Gzip.ts +10 -8
- package/front_end/core/sdk/SourceMap.ts +10 -0
- package/front_end/generated/SupportedCSSProperties.js +7 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +54 -4
- package/front_end/panels/console/ConsolePrompt.ts +10 -2
- package/front_end/panels/console/consolePrompt.css +3 -2
- package/front_end/panels/console/consoleView.css +10 -5
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +9 -4
- package/front_end/panels/timeline/TimelinePanel.ts +2 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -49,16 +49,18 @@ export async function compress(str: string): Promise<ArrayBuffer> {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/** Private coder/decoder **/
|
|
52
|
-
function gzipCodec(
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
async function gzipCodec(
|
|
53
|
+
buffer: Uint8Array<ArrayBufferLike>|ArrayBuffer,
|
|
54
|
+
codecStream: CompressionStream|DecompressionStream): Promise<ArrayBuffer> {
|
|
55
|
+
const readable = new ReadableStream({
|
|
56
|
+
start(controller) {
|
|
57
|
+
controller.enqueue(buffer);
|
|
58
|
+
controller.close();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
55
61
|
const codecReadable = readable.pipeThrough(codecStream);
|
|
56
|
-
|
|
57
|
-
const writer = writable.getWriter();
|
|
58
|
-
void writer.write(buffer);
|
|
59
|
-
void writer.close();
|
|
60
62
|
// A response is a convenient way to get an ArrayBuffer from a ReadableStream.
|
|
61
|
-
return new Response(codecReadable).arrayBuffer();
|
|
63
|
+
return await new Response(codecReadable).arrayBuffer();
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export function decompressStream(stream: ReadableStream): ReadableStream {
|
|
@@ -779,6 +779,16 @@ export class SourceMap {
|
|
|
779
779
|
this.#ensureSourceMapProcessed();
|
|
780
780
|
return this.#scopesInfo?.findOriginalFunctionName(position) ?? null;
|
|
781
781
|
}
|
|
782
|
+
|
|
783
|
+
isOutlinedFrame(generatedLine: number, generatedColumn: number): boolean {
|
|
784
|
+
this.#ensureSourceMapProcessed();
|
|
785
|
+
return this.#scopesInfo?.isOutlinedFrame(generatedLine, generatedColumn) ?? false;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
hasInlinedFrames(generatedLine: number, generatedColumn: number): boolean {
|
|
789
|
+
this.#ensureSourceMapProcessed();
|
|
790
|
+
return this.#scopesInfo?.hasInlinedFrames(generatedLine, generatedColumn) ?? false;
|
|
791
|
+
}
|
|
782
792
|
}
|
|
783
793
|
|
|
784
794
|
const VLQ_BASE_SHIFT = 5;
|
|
@@ -3759,6 +3759,13 @@ export const generatedProperties = [
|
|
|
3759
3759
|
],
|
|
3760
3760
|
"name": "rule"
|
|
3761
3761
|
},
|
|
3762
|
+
{
|
|
3763
|
+
"longhands": [
|
|
3764
|
+
"row-rule-break",
|
|
3765
|
+
"column-rule-break"
|
|
3766
|
+
],
|
|
3767
|
+
"name": "rule-break"
|
|
3768
|
+
},
|
|
3762
3769
|
{
|
|
3763
3770
|
"longhands": [
|
|
3764
3771
|
"column-rule-color",
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
|
-
|
|
8
|
+
// eslint-disable-next-line rulesdir/es-modules-import
|
|
9
|
+
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
9
10
|
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
11
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
12
|
|
|
@@ -43,12 +44,14 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
43
44
|
readonly #sourceMapToProject = new Map<SDK.SourceMap.SourceMap, ContentProviderBasedProject>();
|
|
44
45
|
readonly #uiSourceCodeToSourceMaps =
|
|
45
46
|
new Platform.MapUtilities.Multimap<Workspace.UISourceCode.UISourceCode, SDK.SourceMap.SourceMap>();
|
|
47
|
+
readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
|
|
46
48
|
|
|
47
49
|
constructor(
|
|
48
50
|
debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl,
|
|
49
51
|
debuggerWorkspaceBinding: DebuggerWorkspaceBinding) {
|
|
50
52
|
this.#sourceMapManager = debuggerModel.sourceMapManager();
|
|
51
53
|
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
54
|
+
this.#debuggerModel = debuggerModel;
|
|
52
55
|
|
|
53
56
|
this.#stubProject = new ContentProviderBasedProject(
|
|
54
57
|
workspace, 'jsSourceMaps:stub:' + debuggerModel.target().id(), Workspace.Workspace.projectTypes.Service, '',
|
|
@@ -266,9 +269,56 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
266
269
|
}
|
|
267
270
|
|
|
268
271
|
translateRawFramesStep(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
+
rawFrames: StackTraceImpl.Trie.RawFrame[],
|
|
273
|
+
translatedFrames: Awaited<ReturnType<StackTraceImpl.StackTraceModel.TranslateRawFrames>>): boolean {
|
|
274
|
+
const frame = rawFrames[0];
|
|
275
|
+
if (StackTraceImpl.Trie.isBuiltinFrame(frame)) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const sourceMapWithScopeInfoForFrame =
|
|
280
|
+
(rawFrame: StackTraceImpl.Trie.RawFrame): {sourceMap: SDK.SourceMap.SourceMap, script: SDK.Script.Script}|
|
|
281
|
+
null => {
|
|
282
|
+
const script = this.#debuggerModel.scriptForId(rawFrame.scriptId ?? '');
|
|
283
|
+
if (!script || this.#stubUISourceCodes.has(script)) {
|
|
284
|
+
// Use fallback while source map is being loaded.
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const sourceMap = script.sourceMap();
|
|
289
|
+
return sourceMap?.hasScopeInfo() ? {sourceMap, script} : null;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
const sourceMapAndScript = sourceMapWithScopeInfoForFrame(frame);
|
|
293
|
+
if (!sourceMapAndScript) {
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
const {sourceMap, script} = sourceMapAndScript;
|
|
297
|
+
const {lineNumber, columnNumber} = script.relativeLocationToRawLocation(frame);
|
|
298
|
+
|
|
299
|
+
if (!sourceMap.hasInlinedFrames(lineNumber, columnNumber) && !sourceMap.isOutlinedFrame(lineNumber, columnNumber)) {
|
|
300
|
+
// No outlining or inlining: Get the original function name and map the call-site.
|
|
301
|
+
const mapping = sourceMap.findEntry(lineNumber, columnNumber);
|
|
302
|
+
if (!mapping?.sourceURL) {
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const originalName = sourceMap.findOriginalFunctionName({line: lineNumber, column: columnNumber});
|
|
307
|
+
rawFrames.shift();
|
|
308
|
+
const project = this.#sourceMapToProject.get(sourceMap);
|
|
309
|
+
const uiSourceCode = project?.uiSourceCodeForURL(mapping.sourceURL);
|
|
310
|
+
translatedFrames.push([{
|
|
311
|
+
line: mapping.sourceLineNumber,
|
|
312
|
+
column: mapping.sourceColumnNumber,
|
|
313
|
+
name: originalName ?? undefined,
|
|
314
|
+
uiSourceCode: uiSourceCode ?? undefined,
|
|
315
|
+
url: uiSourceCode ? undefined : mapping.sourceURL
|
|
316
|
+
}]);
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// TODO(crbug.com/433162438): Expand inlined frames.
|
|
321
|
+
// TODO(crbug.com/433162438): Consolidate outlined frames.
|
|
272
322
|
return false;
|
|
273
323
|
}
|
|
274
324
|
|
|
@@ -170,8 +170,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
170
170
|
Common.Settings.Settings.instance().createSetting('ai-code-completion-teaser-dismissed', false);
|
|
171
171
|
if (!this.aiCodeCompletionSetting.get() && !aiCodeCompletionTeaserDismissedSetting.get()) {
|
|
172
172
|
this.teaser = new PanelCommon.AiCodeCompletionTeaser({onDetach: this.detachAiCodeCompletionTeaser.bind(this)});
|
|
173
|
-
extensions.push(this.placeholderCompartment.of(
|
|
174
|
-
TextEditor.AiCodeCompletionTeaserPlaceholder.aiCodeCompletionTeaserPlaceholder(this.teaser)));
|
|
173
|
+
extensions.push(this.placeholderCompartment.of([]));
|
|
175
174
|
}
|
|
176
175
|
extensions.push(TextEditor.Config.aiAutoCompleteSuggestion);
|
|
177
176
|
}
|
|
@@ -580,9 +579,18 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
580
579
|
this.aidaAvailability = currentAidaAvailability;
|
|
581
580
|
if (this.aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
|
|
582
581
|
this.onAiCodeCompletionSettingChanged();
|
|
582
|
+
if (this.teaser) {
|
|
583
|
+
this.editor.dispatch({
|
|
584
|
+
effects: this.placeholderCompartment.reconfigure(
|
|
585
|
+
[TextEditor.AiCodeCompletionTeaserPlaceholder.aiCodeCompletionTeaserPlaceholder(this.teaser)])
|
|
586
|
+
});
|
|
587
|
+
}
|
|
583
588
|
} else if (this.aiCodeCompletion) {
|
|
584
589
|
this.aiCodeCompletion.remove();
|
|
585
590
|
this.aiCodeCompletion = undefined;
|
|
591
|
+
if (this.teaser) {
|
|
592
|
+
this.detachAiCodeCompletionTeaser();
|
|
593
|
+
}
|
|
586
594
|
}
|
|
587
595
|
}
|
|
588
596
|
}
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
|
|
19
19
|
#console-prompt .console-prompt-icon {
|
|
20
20
|
position: absolute;
|
|
21
|
-
left: -
|
|
22
|
-
top:
|
|
21
|
+
left: -9px;
|
|
22
|
+
top: 4px;
|
|
23
23
|
user-select: none;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.console-eager-preview {
|
|
27
27
|
padding-bottom: 2px;
|
|
28
|
+
margin-left: 4px;
|
|
28
29
|
opacity: 60%;
|
|
29
30
|
position: relative;
|
|
30
31
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* Copyright 2021 The Chromium Authors
|
|
2
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
* found in the LICENSE file.
|
|
4
|
+
*
|
|
2
5
|
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
|
|
3
6
|
* Copyright (C) 2009 Anthony Ricaud <rik@webkit.org>
|
|
4
7
|
*
|
|
@@ -90,17 +93,20 @@
|
|
|
90
93
|
|
|
91
94
|
.console-prompt-editor-container {
|
|
92
95
|
min-height: 21px;
|
|
96
|
+
padding-left: 2px;
|
|
97
|
+
padding-top: 1px;
|
|
93
98
|
}
|
|
94
99
|
|
|
95
100
|
.console-message,
|
|
96
101
|
.console-user-command {
|
|
97
102
|
clear: right;
|
|
98
103
|
position: relative;
|
|
99
|
-
padding:
|
|
104
|
+
padding: 1px 22px 1px 0;
|
|
100
105
|
margin-left: 24px;
|
|
101
|
-
min-height:
|
|
106
|
+
min-height: 18px;
|
|
102
107
|
flex: auto;
|
|
103
108
|
display: flex;
|
|
109
|
+
align-items: flex-end;
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
.console-message > * {
|
|
@@ -215,7 +221,7 @@
|
|
|
215
221
|
--console-color-white: #fff;
|
|
216
222
|
|
|
217
223
|
&.console-selected {
|
|
218
|
-
background-color: var(--sys-color-
|
|
224
|
+
background-color: var(--sys-color-state-focus-highlight);
|
|
219
225
|
}
|
|
220
226
|
}
|
|
221
227
|
|
|
@@ -329,7 +335,6 @@
|
|
|
329
335
|
display: inline-block;
|
|
330
336
|
overflow-wrap: break-word;
|
|
331
337
|
max-width: 100%;
|
|
332
|
-
vertical-align: top;
|
|
333
338
|
margin-top: -1.5px;
|
|
334
339
|
}
|
|
335
340
|
|
|
@@ -55,7 +55,6 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
55
55
|
this.#boundOnAidaAvailabilityChange = this.#onAidaAvailabilityChange.bind(this);
|
|
56
56
|
Host.AidaClient.HostConfigTracker.instance().addEventListener(
|
|
57
57
|
Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED, this.#boundOnAidaAvailabilityChange);
|
|
58
|
-
void this.#onAidaAvailabilityChange();
|
|
59
58
|
const showTeaser = !this.#aiCodeCompletionSetting.get() && !this.#aiCodeCompletionTeaserDismissedSetting.get();
|
|
60
59
|
if (showTeaser) {
|
|
61
60
|
this.#teaser = new PanelCommon.AiCodeCompletionTeaser({onDetach: this.#detachAiCodeCompletionTeaser.bind(this)});
|
|
@@ -84,9 +83,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
84
83
|
this.#editor.addEventListener('keydown', this.#boundEditorKeyDown);
|
|
85
84
|
this.#aiCodeCompletionSetting.addChangeListener(this.#boundOnAiCodeCompletionSettingChanged);
|
|
86
85
|
this.#onAiCodeCompletionSettingChanged();
|
|
87
|
-
|
|
88
|
-
this.#addTeaserPluginToCompartmentImmediate(editor.editor);
|
|
89
|
-
}
|
|
86
|
+
void this.#onAidaAvailabilityChange();
|
|
90
87
|
}
|
|
91
88
|
|
|
92
89
|
override editorExtension(): CodeMirror.Extension {
|
|
@@ -281,8 +278,16 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
281
278
|
this.#aidaAvailability = currentAidaAvailability;
|
|
282
279
|
if (this.#aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
|
|
283
280
|
this.#onAiCodeCompletionSettingChanged();
|
|
281
|
+
if (this.#editor?.state.doc.length === 0) {
|
|
282
|
+
this.#addTeaserPluginToCompartmentImmediate(this.#editor?.editor);
|
|
283
|
+
}
|
|
284
284
|
} else if (this.#aiCodeCompletion) {
|
|
285
285
|
this.#cleanupAiCodeCompletion();
|
|
286
|
+
if (this.#teaser) {
|
|
287
|
+
this.#editor?.dispatch({
|
|
288
|
+
effects: this.#teaserCompartment.reconfigure([]),
|
|
289
|
+
});
|
|
290
|
+
}
|
|
286
291
|
}
|
|
287
292
|
}
|
|
288
293
|
}
|
|
@@ -1468,9 +1468,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1468
1468
|
metadata.enhancedTraceVersion =
|
|
1469
1469
|
includeScriptContent ? SDK.EnhancedTracesParser.EnhancedTracesParser.enhancedTraceVersion : undefined;
|
|
1470
1470
|
|
|
1471
|
-
let fileName =
|
|
1472
|
-
|
|
1473
|
-
`Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
|
|
1471
|
+
let fileName =
|
|
1472
|
+
(isCpuProfile ? `CPU-${isoDate}.cpuprofile` : `Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
|
|
1474
1473
|
|
|
1475
1474
|
let blobParts: string[] = [];
|
|
1476
1475
|
if (isCpuProfile) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://source.chromium.org/chromium/chromium/src/+/main:components/variations/proto/devtools/
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: f5bb0cd608ece3474fa780146f397334b24689b2
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
package/package.json
CHANGED