chrome-devtools-frontend 1.0.1515796 → 1.0.1516909
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/docs/contributing/infrastructure.md +131 -82
- package/front_end/Tests.js +3 -29
- package/front_end/core/common/Progress.ts +73 -55
- package/front_end/core/host/GdpClient.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +5 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
- package/front_end/core/sdk/CSSModel.ts +1 -31
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
- package/front_end/core/sdk/DebuggerModel.ts +1 -31
- package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
- package/front_end/core/sdk/NetworkManager.ts +1 -31
- package/front_end/core/sdk/NetworkRequest.ts +1 -31
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -18
- package/front_end/core/sdk/RehydratingObject.ts +8 -31
- package/front_end/core/sdk/RemoteObject.ts +1 -31
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
- package/front_end/core/sdk/RuntimeModel.ts +1 -31
- package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
- package/front_end/core/sdk/SourceMap.ts +1 -31
- package/front_end/core/sdk/TraceObject.ts +8 -3
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
- package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +110 -76
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +100 -100
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +24 -8
- package/front_end/models/badges/UserBadges.ts +38 -3
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
- package/front_end/models/formatter/FormatterWorkerPool.ts +3 -3
- package/front_end/models/har/Writer.ts +11 -11
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
- package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
- package/front_end/models/persistence/PersistenceImpl.ts +8 -8
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/trace/ModelImpl.ts +2 -16
- package/front_end/models/trace/Processor.ts +15 -9
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
- package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +3 -4
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/types.ts +2 -0
- package/front_end/models/trace/types/TraceEvents.ts +41 -64
- package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
- package/front_end/panels/application/ServiceWorkersView.ts +0 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/common/BadgeNotification.ts +46 -10
- package/front_end/panels/common/GdpSignUpDialog.ts +6 -3
- package/front_end/panels/console/ConsoleView.ts +23 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -2
- package/front_end/panels/console/consoleView.css +11 -1
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/layers/LayerTreeModel.ts +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
- package/front_end/panels/network/NetworkLogView.ts +6 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkSearchScope.ts +6 -6
- package/front_end/panels/search/SearchResultsPane.ts +32 -47
- package/front_end/panels/search/SearchView.ts +58 -80
- package/front_end/panels/settings/components/SyncSection.ts +7 -2
- package/front_end/panels/sources/OutlineQuickOpen.ts +3 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
- package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
- package/front_end/panels/timeline/TimelinePanel.ts +41 -22
- package/front_end/panels/timeline/TimelineUIUtils.ts +13 -8
- package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
- package/front_end/third_party/axe-core/README.chromium +1 -0
- package/front_end/third_party/codemirror/README.chromium +1 -0
- package/front_end/third_party/codemirror.next/README.chromium +1 -0
- package/front_end/third_party/csp_evaluator/README.chromium +1 -0
- package/front_end/third_party/diff/README.chromium +1 -0
- package/front_end/third_party/i18n/README.chromium +1 -0
- package/front_end/third_party/intl-messageformat/README.chromium +1 -0
- package/front_end/third_party/json5/README.chromium +1 -0
- package/front_end/third_party/legacy-javascript/README.chromium +1 -0
- package/front_end/third_party/lighthouse/README.chromium +1 -0
- package/front_end/third_party/lit/README.chromium +1 -0
- package/front_end/third_party/marked/README.chromium +1 -0
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +2 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -21
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
- package/front_end/third_party/third-party-web/README.chromium +1 -0
- package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
- package/front_end/third_party/wasmparser/README.chromium +1 -0
- package/front_end/third_party/web-vitals/README.chromium +1 -0
- package/front_end/ui/components/text_editor/config.ts +30 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +18 -4
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +7 -3
- package/front_end/ui/legacy/ProgressIndicator.ts +29 -16
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +10 -5
- package/front_end/ui/legacy/UIUtils.ts +42 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/inspector_overlay/highlight_common.ts +1 -27
- package/inspector_overlay/highlight_grid_common.ts +1 -27
- package/inspector_overlay/tool_highlight.ts +1 -27
- package/inspector_overlay/tool_persistent.ts +1 -27
- package/inspector_overlay/tool_source_order.ts +1 -27
- package/package.json +1 -1
@@ -31,7 +31,7 @@ import type * as ProtocolClient from '../protocol_client/protocol_client.js';
|
|
31
31
|
|
32
32
|
import * as EnhancedTraces from './EnhancedTracesParser.js';
|
33
33
|
import type {
|
34
|
-
ProtocolMessage, RehydratingExecutionContext, RehydratingScript, RehydratingTarget, ServerMessage
|
34
|
+
ProtocolMessage, RehydratingExecutionContext, RehydratingScript, RehydratingTarget, ServerMessage} from
|
35
35
|
'./RehydratingObject.js';
|
36
36
|
import {TraceObject} from './TraceObject.js';
|
37
37
|
|
@@ -66,11 +66,11 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
|
|
66
66
|
rehydratingConnectionState: RehydratingConnectionState = RehydratingConnectionState.UNINITIALIZED;
|
67
67
|
onDisconnect: ((arg0: string) => void)|null = null;
|
68
68
|
onMessage: ((arg0: Object) => void)|null = null;
|
69
|
-
trace:
|
69
|
+
trace: TraceObject|null = null;
|
70
70
|
sessions = new Map<number, RehydratingSessionBase>();
|
71
71
|
#onConnectionLost: (message: Platform.UIString.LocalizedString) => void;
|
72
72
|
#rehydratingWindow: Window&typeof globalThis;
|
73
|
-
#onReceiveHostWindowPayloadBound = this
|
73
|
+
#onReceiveHostWindowPayloadBound = this.onReceiveHostWindowPayload.bind(this);
|
74
74
|
|
75
75
|
constructor(onConnectionLost: (message: Platform.UIString.LocalizedString) => void) {
|
76
76
|
// If we're invoking this class, we're in the rehydrating pop-up window. Rename window for clarity.
|
@@ -92,12 +92,12 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
|
|
92
92
|
* This is a callback for rehydrated session to receive payload from host window. Payload includes but not limited to
|
93
93
|
* the trace event and all necessary data to power a rehydrated session.
|
94
94
|
*/
|
95
|
-
|
95
|
+
onReceiveHostWindowPayload(event: MessageEvent): void {
|
96
96
|
if (event.data.type === 'REHYDRATING_TRACE_FILE') {
|
97
97
|
const traceJson = event.data.traceJson as string;
|
98
98
|
let trace;
|
99
99
|
try {
|
100
|
-
trace = JSON.parse(traceJson)
|
100
|
+
trace = new TraceObject(JSON.parse(traceJson));
|
101
101
|
} catch {
|
102
102
|
this.#onConnectionLost(i18nString(UIStrings.errorLoadingLog));
|
103
103
|
return;
|
@@ -107,7 +107,7 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
|
|
107
107
|
this.#rehydratingWindow.removeEventListener('message', this.#onReceiveHostWindowPayloadBound);
|
108
108
|
}
|
109
109
|
|
110
|
-
async startHydration(trace:
|
110
|
+
async startHydration(trace: TraceObject): Promise<boolean> {
|
111
111
|
// OnMessage should've been set before hydration, and the connection should
|
112
112
|
// be initialized and not hydrated already.
|
113
113
|
if (!this.onMessage || this.rehydratingConnectionState !== RehydratingConnectionState.INITIALIZED) {
|
@@ -144,10 +144,10 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
|
|
144
144
|
},
|
145
145
|
});
|
146
146
|
|
147
|
-
// Create new session associated to the target created and send
|
148
|
-
// Target.attachedToTarget to frontend.
|
149
147
|
sessionId += 1;
|
150
|
-
|
148
|
+
const session = new RehydratingSession(sessionId, target, executionContexts, scripts, this);
|
149
|
+
this.sessions.set(sessionId, session);
|
150
|
+
session.declareSessionAttachedToTarget();
|
151
151
|
}
|
152
152
|
await this.#onRehydrated();
|
153
153
|
return true;
|
@@ -160,8 +160,8 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
|
|
160
160
|
|
161
161
|
this.rehydratingConnectionState = RehydratingConnectionState.REHYDRATED;
|
162
162
|
// Use revealer to load trace into performance panel
|
163
|
-
|
164
|
-
await Common.Revealer.reveal(trace);
|
163
|
+
|
164
|
+
await Common.Revealer.reveal(this.trace);
|
165
165
|
}
|
166
166
|
|
167
167
|
setOnMessage(onMessage: (arg0: Object|string) => void): void {
|
@@ -220,11 +220,7 @@ class RehydratingSessionBase {
|
|
220
220
|
}
|
221
221
|
|
222
222
|
sendMessageToFrontend(payload: ServerMessage): void {
|
223
|
-
|
224
|
-
if (this.connection) {
|
225
|
-
this.connection.postToFrontend(payload);
|
226
|
-
}
|
227
|
-
});
|
223
|
+
this.connection?.postToFrontend(payload);
|
228
224
|
}
|
229
225
|
|
230
226
|
handleFrontendMessageAsFakeCDPAgent(data: ProtocolMessage): void {
|
@@ -250,7 +246,6 @@ export class RehydratingSession extends RehydratingSessionBase {
|
|
250
246
|
this.target = target;
|
251
247
|
this.executionContexts = executionContexts;
|
252
248
|
this.scripts = scripts;
|
253
|
-
this.sessionAttachToTarget();
|
254
249
|
}
|
255
250
|
|
256
251
|
override sendMessageToFrontend(payload: ServerMessage, attachSessionId = true): void {
|
@@ -284,7 +279,7 @@ export class RehydratingSession extends RehydratingSessionBase {
|
|
284
279
|
}
|
285
280
|
}
|
286
281
|
|
287
|
-
|
282
|
+
declareSessionAttachedToTarget(): void {
|
288
283
|
this.sendMessageToFrontend(
|
289
284
|
{
|
290
285
|
method: 'Target.attachedToTarget',
|
@@ -4,28 +4,14 @@
|
|
4
4
|
|
5
5
|
import type * as Protocol from '../../generated/protocol.js';
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
// This object is emitted to ScriptParsed and also used in the RehydratingConnection
|
8
|
+
export interface RehydratingScript extends Protocol.Debugger.ScriptParsedEvent {
|
9
|
+
sourceText?: string;
|
10
|
+
executionContextAuxData?: RehydratingExecutionContextAuxData;
|
11
11
|
isolate: string;
|
12
|
-
/** The script's `src`
|
13
|
-
url: string;
|
14
|
-
executionContextId: Protocol.Runtime.ExecutionContextId;
|
15
|
-
startLine: number;
|
16
|
-
startColumn: number;
|
17
|
-
endLine: number;
|
18
|
-
endColumn: number;
|
19
|
-
hash: string;
|
20
|
-
isModule?: boolean;
|
21
|
-
hasSourceURL?: boolean;
|
22
|
-
sourceMapURL?: string;
|
23
|
-
/** The manually provided string via the `//# sourceURL` directive */
|
12
|
+
/** The manually provided string via the `//# sourceURL` directive. Meanwhile the `url` is the script's `src` */
|
24
13
|
sourceURL?: string;
|
25
|
-
|
26
|
-
sourceText?: string;
|
27
|
-
auxData?: RehydratingExecutionContextAuxData;
|
28
|
-
pid?: number;
|
14
|
+
pid: number;
|
29
15
|
}
|
30
16
|
|
31
17
|
export interface RehydratingExecutionContextAuxData {
|
@@ -34,11 +20,9 @@ export interface RehydratingExecutionContextAuxData {
|
|
34
20
|
type?: string;
|
35
21
|
}
|
36
22
|
|
37
|
-
export interface RehydratingExecutionContext {
|
38
|
-
|
39
|
-
origin: string;
|
23
|
+
export interface RehydratingExecutionContext extends Protocol.Runtime.ExecutionContextDescription {
|
24
|
+
/** AKA V8ContextToken. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/inspector/inspector_trace_events.cc;l=1229;drc=3c88f61e18b043e70c225d8d57c77832a85e7f58 */
|
40
25
|
v8Context?: string;
|
41
|
-
name?: string;
|
42
26
|
auxData?: RehydratingExecutionContextAuxData;
|
43
27
|
isolate: string;
|
44
28
|
}
|
@@ -80,10 +64,3 @@ export interface Session {
|
|
80
64
|
executionContexts: RehydratingExecutionContext[];
|
81
65
|
scripts: RehydratingScript[];
|
82
66
|
}
|
83
|
-
|
84
|
-
// TODO: we need to resolve the inability to use Trace model types inside SDK. For
|
85
|
-
// now, duplicate a minimal type here.
|
86
|
-
export interface TraceFile {
|
87
|
-
traceEvents: readonly object[];
|
88
|
-
metadata: {sourceMaps?: Array<{sourceMapUrl: string, sourceMap: SourceMapV3}>};
|
89
|
-
}
|
@@ -1,37 +1,7 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2009 The Chromium Authors
|
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
|
-
/*
|
6
|
-
* Copyright (C) 2009 Google Inc. All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions are
|
10
|
-
* met:
|
11
|
-
*
|
12
|
-
* * Redistributions of source code must retain the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer.
|
14
|
-
* * Redistributions in binary form must reproduce the above
|
15
|
-
* copyright notice, this list of conditions and the following disclaimer
|
16
|
-
* in the documentation and/or other materials provided with the
|
17
|
-
* distribution.
|
18
|
-
* * Neither the #name of Google Inc. nor the names of its
|
19
|
-
* contributors may be used to endorse or promote products derived from
|
20
|
-
* this software without specific prior written permission.
|
21
|
-
*
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
23
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
25
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
26
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
27
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
28
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
29
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
30
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
31
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
32
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
*/
|
34
|
-
|
35
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
36
6
|
import * as Protocol from '../../generated/protocol.js';
|
37
7
|
import type {DOMPinnedWebIDLProp, DOMPinnedWebIDLType} from '../common/JavaScriptMetaData.js';
|
@@ -1,37 +1,7 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2011 The Chromium Authors
|
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
|
-
/*
|
6
|
-
* Copyright (C) 2011 Google Inc. All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions are
|
10
|
-
* met:
|
11
|
-
*
|
12
|
-
* * Redistributions of source code must retain the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer.
|
14
|
-
* * Redistributions in binary form must reproduce the above
|
15
|
-
* copyright notice, this list of conditions and the following disclaimer
|
16
|
-
* in the documentation and/or other materials provided with the
|
17
|
-
* distribution.
|
18
|
-
* * Neither the #name of Google Inc. nor the names of its
|
19
|
-
* contributors may be used to endorse or promote products derived from
|
20
|
-
* this software without specific prior written permission.
|
21
|
-
*
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
23
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
25
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
26
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
27
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
28
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
29
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
30
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
31
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
32
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
*/
|
34
|
-
|
35
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
36
6
|
import * as Protocol from '../../generated/protocol.js';
|
37
7
|
import * as Common from '../common/common.js';
|
@@ -1,37 +1,7 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2012 The Chromium Authors
|
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
|
-
/*
|
6
|
-
* Copyright (C) 2012 Google Inc. All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions are
|
10
|
-
* met:
|
11
|
-
*
|
12
|
-
* * Redistributions of source code must retain the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer.
|
14
|
-
* * Redistributions in binary form must reproduce the above
|
15
|
-
* copyright notice, this list of conditions and the following disclaimer
|
16
|
-
* in the documentation and/or other materials provided with the
|
17
|
-
* distribution.
|
18
|
-
* * Neither the #name of Google Inc. nor the names of its
|
19
|
-
* contributors may be used to endorse or promote products derived from
|
20
|
-
* this software without specific prior written permission.
|
21
|
-
*
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
23
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
25
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
26
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
27
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
28
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
29
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
30
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
31
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
32
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
*/
|
34
|
-
|
35
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
36
6
|
import type * as Protocol from '../../generated/protocol.js';
|
37
7
|
import * as Common from '../common/common.js';
|
@@ -1,37 +1,7 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2011 The Chromium Authors
|
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
|
-
/*
|
6
|
-
* Copyright (C) 2011 Google Inc. All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions are
|
10
|
-
* met:
|
11
|
-
*
|
12
|
-
* * Redistributions of source code must retain the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer.
|
14
|
-
* * Redistributions in binary form must reproduce the above
|
15
|
-
* copyright notice, this list of conditions and the following disclaimer
|
16
|
-
* in the documentation and/or other materials provided with the
|
17
|
-
* distribution.
|
18
|
-
* * Neither the #name of Google Inc. nor the names of its
|
19
|
-
* contributors may be used to endorse or promote products derived from
|
20
|
-
* this software without specific prior written permission.
|
21
|
-
*
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
23
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
25
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
26
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
27
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
28
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
29
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
30
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
31
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
32
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
*/
|
34
|
-
|
35
5
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
36
6
|
import * as Protocol from '../../generated/protocol.js';
|
37
7
|
import * as Common from '../common/common.js';
|
@@ -1,37 +1,7 @@
|
|
1
|
-
// Copyright
|
1
|
+
// Copyright 2012 The Chromium Authors
|
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
|
-
/*
|
6
|
-
* Copyright (C) 2012 Google Inc. All rights reserved.
|
7
|
-
*
|
8
|
-
* Redistribution and use in source and binary forms, with or without
|
9
|
-
* modification, are permitted provided that the following conditions are
|
10
|
-
* met:
|
11
|
-
*
|
12
|
-
* * Redistributions of source code must retain the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer.
|
14
|
-
* * Redistributions in binary form must reproduce the above
|
15
|
-
* copyright notice, this list of conditions and the following disclaimer
|
16
|
-
* in the documentation and/or other materials provided with the
|
17
|
-
* distribution.
|
18
|
-
* * Neither the #name of Google Inc. nor the names of its
|
19
|
-
* contributors may be used to endorse or promote products derived from
|
20
|
-
* this software without specific prior written permission.
|
21
|
-
*
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
23
|
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
24
|
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
25
|
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
26
|
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
27
|
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
28
|
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
29
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
30
|
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
31
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
32
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
*/
|
34
|
-
|
35
5
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
36
6
|
import * as ScopesCodec from '../../third_party/source-map-scopes-codec/source-map-scopes-codec.js';
|
37
7
|
import * as Common from '../common/common.js';
|
@@ -8,13 +8,18 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
|
9
9
|
import type {NetworkRequest} from './NetworkRequest.js';
|
10
10
|
import {ResourceTreeModel} from './ResourceTreeModel.js';
|
11
|
+
import type {SourceMapV3} from './SourceMap.js';
|
11
12
|
|
12
13
|
// A thin wrapper class, mostly to enable instanceof-based revealing of traces to open in Timeline.
|
13
14
|
export class TraceObject {
|
14
15
|
readonly traceEvents: Protocol.Tracing.DataCollectedEvent['value'];
|
15
|
-
readonly metadata:
|
16
|
-
constructor(
|
17
|
-
|
16
|
+
readonly metadata: {sourceMaps?: Array<{sourceMapUrl: string, sourceMap: SourceMapV3, url: string}>};
|
17
|
+
constructor(payload: Protocol.Tracing.DataCollectedEvent['value']|TraceObject, meta: Object = {}) {
|
18
|
+
// Handle the typical traceEvent array juggling here.
|
19
|
+
const events = Array.isArray(payload) ? payload : payload.traceEvents;
|
20
|
+
const metadata = meta ?? (!Array.isArray(payload) && payload.metadata) ?? {};
|
21
|
+
|
22
|
+
this.traceEvents = events;
|
18
23
|
this.metadata = metadata;
|
19
24
|
}
|
20
25
|
}
|
@@ -356,8 +356,6 @@ export class MainImpl {
|
|
356
356
|
Root.Runtime.ExperimentName.TIMELINE_SHOW_POST_MESSAGE_EVENTS,
|
357
357
|
'Performance panel: show postMessage dispatch and handling flows',
|
358
358
|
);
|
359
|
-
Root.Runtime.experiments.register(
|
360
|
-
Root.Runtime.ExperimentName.TIMELINE_SAVE_AS_GZ, 'Performance panel: enable saving traces as .gz');
|
361
359
|
|
362
360
|
Root.Runtime.experiments.enableExperimentsByDefault([
|
363
361
|
Root.Runtime.ExperimentName.FULL_ACCESSIBILITY_TREE,
|
@@ -518,7 +516,7 @@ export class MainImpl {
|
|
518
516
|
this.#registerMessageSinkListener();
|
519
517
|
|
520
518
|
// Initialize `GDPClient` and `UserBadges` for Google Developer Program integration
|
521
|
-
if (Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled) {
|
519
|
+
if (Root.Runtime.hostConfig.devToolsGdpProfiles?.enabled && !Root.Runtime.hostConfig.isOffTheRecord) {
|
522
520
|
void Host.GdpClient.GdpClient.instance().initialize();
|
523
521
|
void Badges.UserBadges.instance().initialize();
|
524
522
|
Badges.UserBadges.instance().addEventListener(Badges.Events.BADGE_TRIGGERED, async ev => {
|
@@ -13,9 +13,7 @@ export const enum ConversationType {
|
|
13
13
|
STYLING = 'freestyler',
|
14
14
|
FILE = 'drjones-file',
|
15
15
|
NETWORK = 'drjones-network-request',
|
16
|
-
|
17
|
-
PERFORMANCE_INSIGHT = 'performance-insight',
|
18
|
-
PERFORMANCE_FULL = 'drjones-performance-full',
|
16
|
+
PERFORMANCE = 'drjones-performance-full',
|
19
17
|
}
|
20
18
|
|
21
19
|
export const NOT_FOUND_IMAGE_DATA = '';
|
@@ -50,7 +50,7 @@ export interface ExternalPerformanceAIConversationData {
|
|
50
50
|
}
|
51
51
|
|
52
52
|
export interface ExternalPerformanceRequestParameters {
|
53
|
-
conversationType: ConversationType.
|
53
|
+
conversationType: ConversationType.PERFORMANCE;
|
54
54
|
prompt: string;
|
55
55
|
data: ExternalPerformanceAIConversationData;
|
56
56
|
}
|
@@ -201,7 +201,7 @@ export class ConversationHandler {
|
|
201
201
|
case ConversationType.STYLING: {
|
202
202
|
return await this.#handleExternalStylingConversation(parameters.prompt, parameters.selector);
|
203
203
|
}
|
204
|
-
case ConversationType.
|
204
|
+
case ConversationType.PERFORMANCE:
|
205
205
|
return await this.#handleExternalPerformanceConversation(parameters.prompt, parameters.data);
|
206
206
|
case ConversationType.NETWORK:
|
207
207
|
if (!parameters.requestUrl) {
|
@@ -348,10 +348,8 @@ export class ConversationHandler {
|
|
348
348
|
agent = new FileAgent(options);
|
349
349
|
break;
|
350
350
|
}
|
351
|
-
case ConversationType.
|
352
|
-
|
353
|
-
case ConversationType.PERFORMANCE_CALL_TREE: {
|
354
|
-
agent = new PerformanceAgent(options, conversationType);
|
351
|
+
case ConversationType.PERFORMANCE: {
|
352
|
+
agent = new PerformanceAgent(options);
|
355
353
|
break;
|
356
354
|
}
|
357
355
|
}
|
@@ -148,6 +148,9 @@ export interface ConversationSuggestion {
|
|
148
148
|
jslogContext?: string;
|
149
149
|
}
|
150
150
|
|
151
|
+
/** At least one. */
|
152
|
+
export type ConversationSuggestions = [ConversationSuggestion, ...ConversationSuggestion[]];
|
153
|
+
|
151
154
|
export const enum ExternalRequestResponseType {
|
152
155
|
ANSWER = 'answer',
|
153
156
|
NOTIFICATION = 'notification',
|
@@ -196,7 +199,7 @@ export abstract class ConversationContext<T> {
|
|
196
199
|
return;
|
197
200
|
}
|
198
201
|
|
199
|
-
async getSuggestions(): Promise<
|
202
|
+
async getSuggestions(): Promise<ConversationSuggestions|undefined> {
|
200
203
|
return;
|
201
204
|
}
|
202
205
|
}
|