chrome-devtools-frontend 1.0.1599001 → 1.0.1601661
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/.agents/skills/verification/SKILL.md +1 -1
- package/front_end/core/common/Settings.ts +24 -1
- package/front_end/core/dom_extension/DOMExtension.ts +1 -0
- package/front_end/core/host/AidaClient.ts +5 -2
- package/front_end/core/host/AidaGcaTranslation.ts +377 -0
- package/front_end/core/host/GcaTypes.ts +3 -1
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/root/ExperimentNames.ts +0 -2
- package/front_end/core/sdk/CPUThrottlingManager.ts +12 -9
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +4 -2
- package/front_end/entrypoints/main/MainImpl.ts +1 -10
- package/front_end/generated/Deprecation.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -7
- package/front_end/generated/protocol.ts +47 -79
- package/front_end/models/ai_assistance/AiConversation.ts +37 -21
- package/front_end/models/ai_assistance/ConversationHandler.ts +8 -9
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +75 -20
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +11 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +38 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +55 -13
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +57 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +41 -3
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +84 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +172 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +20 -12
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +5 -15
- package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +52 -0
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +104 -10
- package/front_end/models/lighthouse/RunTypes.ts +2 -1
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +59 -35
- package/front_end/models/stack_trace/StackTrace.ts +5 -0
- package/front_end/models/stack_trace/StackTraceImpl.ts +7 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +2 -1
- package/front_end/models/stack_trace/stack_trace.ts +4 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +7 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +79 -69
- package/front_end/panels/ai_assistance/ExportConversation.ts +25 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +13 -12
- package/front_end/panels/ai_assistance/components/ChatView.ts +44 -0
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +240 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +4 -12
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +5 -27
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +115 -17
- package/front_end/panels/ai_assistance/components/chatMessage.css +4 -1
- package/front_end/panels/ai_assistance/components/chatView.css +8 -0
- package/front_end/panels/ai_assistance/components/exportForAgentsDialog.css +82 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +9 -1
- package/front_end/panels/animation/AnimationTimeline.ts +5 -5
- package/front_end/panels/application/AppManifestView.ts +13 -7
- package/front_end/panels/application/FrameDetailsView.ts +4 -4
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +3 -2
- package/front_end/panels/common/DOMLinkifier.ts +10 -8
- package/front_end/panels/console/ConsoleView.ts +24 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +22 -23
- package/front_end/panels/console/console.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +5 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -3
- package/front_end/panels/elements/PropertiesWidget.ts +5 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +21 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +98 -50
- package/front_end/panels/elements/StylePropertyTreeElement.ts +38 -4
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +43 -35
- package/front_end/panels/elements/StylesSidebarPane.ts +154 -24
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +16 -4
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -9
- package/front_end/panels/explain/explain-meta.ts +5 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +5 -9
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +3 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +9 -6
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +29 -5
- package/front_end/panels/network/NetworkDataGridNode.ts +34 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +10 -0
- package/front_end/panels/network/RequestPayloadView.ts +4 -1
- package/front_end/panels/network/RequestTimingView.ts +8 -2
- package/front_end/panels/performance_monitor/performanceMonitor.css +6 -4
- package/front_end/panels/recorder/RecorderController.ts +52 -14
- package/front_end/panels/recorder/components/RecordingView.ts +2 -1
- package/front_end/panels/recorder/models/RecordingStorage.ts +15 -20
- package/front_end/panels/sensors/SensorsView.ts +310 -144
- package/front_end/panels/sources/DebuggerPausedMessage.ts +6 -6
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +2 -3
- package/front_end/panels/sources/NavigatorView.ts +11 -7
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +12 -34
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +5 -1
- package/front_end/panels/sources/sources-meta.ts +6 -0
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +6 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +35 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +6 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +9 -4
- package/front_end/panels/timeline/TimelinePanel.ts +7 -9
- package/front_end/panels/timeline/TimelineTreeView.ts +14 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -57
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +2 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +3 -7
- package/front_end/panels/timeline/components/Sidebar.ts +10 -18
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +1 -0
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +66 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +7 -19
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -0
- package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -3
- package/front_end/panels/timeline/components/timelineRangeSummaryView.css +20 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +7 -7
- package/front_end/panels/timeline/timelineDetailsView.css +0 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +11 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +11 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +65 -4
- package/front_end/ui/kit/link/link.css +2 -2
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +7 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +57 -35
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
- package/front_end/models/issues_manager/descriptions/sharedDictionaryUseErrorNoCorpCrossOriginNoCorsRequest.md +0 -3
- package/front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoCorpCossOriginNoCorsRequest.md +0 -3
- /package/front_end/{panels/console → models/stack_trace}/ErrorStackParser.ts +0 -0
|
@@ -19,7 +19,7 @@ const INITIAL_RESTORE_BREAKPOINT_COUNT = 100;
|
|
|
19
19
|
|
|
20
20
|
export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
|
|
21
21
|
SDK.TargetManager.SDKModelObserver<SDK.DebuggerModel.DebuggerModel> {
|
|
22
|
-
readonly storage
|
|
22
|
+
readonly storage: Storage;
|
|
23
23
|
readonly #workspace: Workspace.Workspace.WorkspaceImpl;
|
|
24
24
|
readonly targetManager: SDK.TargetManager.TargetManager;
|
|
25
25
|
readonly debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
|
|
@@ -38,11 +38,12 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
38
38
|
private constructor(
|
|
39
39
|
targetManager: SDK.TargetManager.TargetManager, workspace: Workspace.Workspace.WorkspaceImpl,
|
|
40
40
|
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding,
|
|
41
|
-
restoreInitialBreakpointCount?: number) {
|
|
41
|
+
settings: Common.Settings.Settings, restoreInitialBreakpointCount?: number) {
|
|
42
42
|
super();
|
|
43
43
|
this.#workspace = workspace;
|
|
44
44
|
this.targetManager = targetManager;
|
|
45
45
|
this.debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
46
|
+
this.storage = new Storage(settings);
|
|
46
47
|
|
|
47
48
|
this.storage.mute();
|
|
48
49
|
this.#setInitialBreakpoints(restoreInitialBreakpointCount ?? INITIAL_RESTORE_BREAKPOINT_COUNT);
|
|
@@ -73,18 +74,26 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
|
73
74
|
targetManager: SDK.TargetManager.TargetManager|null,
|
|
74
75
|
workspace: Workspace.Workspace.WorkspaceImpl|null,
|
|
75
76
|
debuggerWorkspaceBinding: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding|null,
|
|
77
|
+
settings: Common.Settings.Settings|null,
|
|
76
78
|
restoreInitialBreakpointCount?: number,
|
|
77
|
-
} = {
|
|
78
|
-
|
|
79
|
+
} = {
|
|
80
|
+
forceNew: null,
|
|
81
|
+
targetManager: null,
|
|
82
|
+
workspace: null,
|
|
83
|
+
debuggerWorkspaceBinding: null,
|
|
84
|
+
settings: null,
|
|
85
|
+
}): BreakpointManager {
|
|
86
|
+
const {forceNew, targetManager, workspace, debuggerWorkspaceBinding, settings, restoreInitialBreakpointCount} =
|
|
87
|
+
opts;
|
|
79
88
|
if (!breakpointManagerInstance || forceNew) {
|
|
80
|
-
if (!targetManager || !workspace || !debuggerWorkspaceBinding) {
|
|
89
|
+
if (!targetManager || !workspace || !debuggerWorkspaceBinding || !settings) {
|
|
81
90
|
throw new Error(
|
|
82
|
-
`Unable to create settings: targetManager, workspace, and
|
|
91
|
+
`Unable to create settings: targetManager, workspace, debuggerWorkspaceBinding, and settings must be provided: ${
|
|
83
92
|
new Error().stack}`);
|
|
84
93
|
}
|
|
85
94
|
|
|
86
|
-
breakpointManagerInstance =
|
|
87
|
-
|
|
95
|
+
breakpointManagerInstance = new BreakpointManager(
|
|
96
|
+
targetManager, workspace, debuggerWorkspaceBinding, settings, restoreInitialBreakpointCount);
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
return breakpointManagerInstance;
|
|
@@ -986,8 +995,7 @@ export class ModelBreakpoint {
|
|
|
986
995
|
const {lineNumber: uiLineNumber, columnNumber: uiColumnNumber} =
|
|
987
996
|
BreakpointManager.uiLocationFromBreakpointLocation(uiSourceCode, lineNumber, columnNumber);
|
|
988
997
|
const locations =
|
|
989
|
-
await
|
|
990
|
-
uiSourceCode, uiLineNumber, uiColumnNumber);
|
|
998
|
+
await this.#debuggerWorkspaceBinding.uiLocationToRawLocations(uiSourceCode, uiLineNumber, uiColumnNumber);
|
|
991
999
|
debuggerLocations = locations.filter(location => location.debuggerModel === this.#debuggerModel);
|
|
992
1000
|
if (debuggerLocations.length) {
|
|
993
1001
|
break;
|
|
@@ -1248,8 +1256,8 @@ class Storage {
|
|
|
1248
1256
|
readonly breakpoints: Map<string, BreakpointStorageState>;
|
|
1249
1257
|
#muted: boolean;
|
|
1250
1258
|
|
|
1251
|
-
constructor() {
|
|
1252
|
-
this.setting =
|
|
1259
|
+
constructor(settings: Common.Settings.Settings) {
|
|
1260
|
+
this.setting = settings.createLocalSetting('breakpoints', []);
|
|
1253
1261
|
this.breakpoints = new Map();
|
|
1254
1262
|
this.#muted = false;
|
|
1255
1263
|
for (const breakpoint of this.setting.get()) {
|
|
@@ -23,7 +23,7 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SharedDictionary
|
|
|
23
23
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
24
24
|
|
|
25
25
|
export const enum IssueCode {
|
|
26
|
-
|
|
26
|
+
USE_ERROR_CROSS_ORIGIN_NO_CORS_REQUEST = 'SharedDictionaryIssue::UseErrorCrossOriginNoCorsRequest',
|
|
27
27
|
USE_ERROR_DICTIONARY_LOAD_FAILURE = 'SharedDictionaryIssue::UseErrorDictionaryLoadFailure',
|
|
28
28
|
USE_ERROR_MATCHING_DICTIONARY_NOT_USED = 'SharedDictionaryIssue::UseErrorMatchingDictionaryNotUsed',
|
|
29
29
|
USE_ERROR_UNEXPECTED_CONTENT_DICTIONARY_HEADER = 'SharedDictionaryIssue::UseErrorUnexpectedContentDictionaryHeader',
|
|
@@ -36,7 +36,6 @@ export const enum IssueCode {
|
|
|
36
36
|
WRITE_ERROR_INVALID_STRUCTURED_HEADER = 'SharedDictionaryIssue::WriteErrorInvalidStructuredHeader',
|
|
37
37
|
WRITE_ERROR_INVALID_TTL_FIELD = 'SharedDictionaryIssue::WriteErrorInvalidTTLField',
|
|
38
38
|
WRITE_ERROR_NAVIGATION_REQUEST = 'SharedDictionaryIssue::WriteErrorNavigationRequest',
|
|
39
|
-
WRITE_ERROR_NO_CORP_COSS_ORIGIN_NO_CORS_REQUEST = 'SharedDictionaryIssue::WriteErrorNoCorpCossOriginNoCorsRequest',
|
|
40
39
|
WRITE_ERROR_NO_MATCH_FIELD = 'SharedDictionaryIssue::WriteErrorNoMatchField',
|
|
41
40
|
WRITE_ERROR_NON_INTEGER_TTL_FIELD = 'SharedDictionaryIssue::WriteErrorNonIntegerTTLField',
|
|
42
41
|
WRITE_ERROR_NON_LIST_MATCH_DEST_FIELD = 'SharedDictionaryIssue::WriteErrorNonListMatchDestField',
|
|
@@ -54,8 +53,8 @@ export const enum IssueCode {
|
|
|
54
53
|
|
|
55
54
|
function getIssueCode(details: Protocol.Audits.SharedDictionaryIssueDetails): IssueCode {
|
|
56
55
|
switch (details.sharedDictionaryError) {
|
|
57
|
-
case Protocol.Audits.SharedDictionaryError.
|
|
58
|
-
return IssueCode.
|
|
56
|
+
case Protocol.Audits.SharedDictionaryError.UseErrorCrossOriginNoCorsRequest:
|
|
57
|
+
return IssueCode.USE_ERROR_CROSS_ORIGIN_NO_CORS_REQUEST;
|
|
59
58
|
case Protocol.Audits.SharedDictionaryError.UseErrorDictionaryLoadFailure:
|
|
60
59
|
return IssueCode.USE_ERROR_DICTIONARY_LOAD_FAILURE;
|
|
61
60
|
case Protocol.Audits.SharedDictionaryError.UseErrorMatchingDictionaryNotUsed:
|
|
@@ -80,8 +79,6 @@ function getIssueCode(details: Protocol.Audits.SharedDictionaryIssueDetails): Is
|
|
|
80
79
|
return IssueCode.WRITE_ERROR_INVALID_TTL_FIELD;
|
|
81
80
|
case Protocol.Audits.SharedDictionaryError.WriteErrorNavigationRequest:
|
|
82
81
|
return IssueCode.WRITE_ERROR_NAVIGATION_REQUEST;
|
|
83
|
-
case Protocol.Audits.SharedDictionaryError.WriteErrorNoCorpCossOriginNoCorsRequest:
|
|
84
|
-
return IssueCode.WRITE_ERROR_NO_CORP_COSS_ORIGIN_NO_CORS_REQUEST;
|
|
85
82
|
case Protocol.Audits.SharedDictionaryError.WriteErrorNoMatchField:
|
|
86
83
|
return IssueCode.WRITE_ERROR_NO_MATCH_FIELD;
|
|
87
84
|
case Protocol.Audits.SharedDictionaryError.WriteErrorNonIntegerTTLField:
|
|
@@ -171,9 +168,9 @@ const specLinks = [{
|
|
|
171
168
|
const issueDescriptions = new Map<Protocol.Audits.SharedDictionaryError, LazyMarkdownIssueDescription>([
|
|
172
169
|
|
|
173
170
|
[
|
|
174
|
-
Protocol.Audits.SharedDictionaryError.
|
|
171
|
+
Protocol.Audits.SharedDictionaryError.UseErrorCrossOriginNoCorsRequest,
|
|
175
172
|
{
|
|
176
|
-
file: '
|
|
173
|
+
file: 'sharedDictionaryUseErrorCrossOriginNoCorsRequest.md',
|
|
177
174
|
links: specLinks,
|
|
178
175
|
},
|
|
179
176
|
],
|
|
@@ -261,13 +258,6 @@ const issueDescriptions = new Map<Protocol.Audits.SharedDictionaryError, LazyMar
|
|
|
261
258
|
links: specLinks,
|
|
262
259
|
},
|
|
263
260
|
],
|
|
264
|
-
[
|
|
265
|
-
Protocol.Audits.SharedDictionaryError.WriteErrorNoCorpCossOriginNoCorsRequest,
|
|
266
|
-
{
|
|
267
|
-
file: 'sharedDictionaryWriteErrorNoCorpCossOriginNoCorsRequest.md',
|
|
268
|
-
links: specLinks,
|
|
269
|
-
},
|
|
270
|
-
],
|
|
271
261
|
[
|
|
272
262
|
Protocol.Audits.SharedDictionaryError.WriteErrorNoMatchField,
|
|
273
263
|
{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Found a matching dictionary, but the dictionary can't be used for the cross origin no-cors request
|
|
@@ -6602,6 +6602,30 @@ export const NativeFunctions = [
|
|
|
6602
6602
|
name: "replaceWithHTMLUnsafe",
|
|
6603
6603
|
signatures: [["html","?options"]]
|
|
6604
6604
|
},
|
|
6605
|
+
{
|
|
6606
|
+
name: "streamBeforeHTMLUnsafe",
|
|
6607
|
+
signatures: [["?options"]]
|
|
6608
|
+
},
|
|
6609
|
+
{
|
|
6610
|
+
name: "streamBeforeHTML",
|
|
6611
|
+
signatures: [["?options"]]
|
|
6612
|
+
},
|
|
6613
|
+
{
|
|
6614
|
+
name: "streamAfterHTMLUnsafe",
|
|
6615
|
+
signatures: [["?options"]]
|
|
6616
|
+
},
|
|
6617
|
+
{
|
|
6618
|
+
name: "streamAfterHTML",
|
|
6619
|
+
signatures: [["?options"]]
|
|
6620
|
+
},
|
|
6621
|
+
{
|
|
6622
|
+
name: "streamReplaceWithHTMLUnsafe",
|
|
6623
|
+
signatures: [["?options"]]
|
|
6624
|
+
},
|
|
6625
|
+
{
|
|
6626
|
+
name: "streamReplaceWithHTML",
|
|
6627
|
+
signatures: [["?options"]]
|
|
6628
|
+
},
|
|
6605
6629
|
{
|
|
6606
6630
|
name: "Comment",
|
|
6607
6631
|
signatures: [["?data"]]
|
|
@@ -6650,6 +6674,10 @@ export const NativeFunctions = [
|
|
|
6650
6674
|
name: "streamHTMLUnsafe",
|
|
6651
6675
|
signatures: [["?options"]]
|
|
6652
6676
|
},
|
|
6677
|
+
{
|
|
6678
|
+
name: "streamPrependHTMLUnsafe",
|
|
6679
|
+
signatures: [["?options"]]
|
|
6680
|
+
},
|
|
6653
6681
|
{
|
|
6654
6682
|
name: "streamAppendHTML",
|
|
6655
6683
|
signatures: [["?options"]]
|
|
@@ -6658,6 +6686,10 @@ export const NativeFunctions = [
|
|
|
6658
6686
|
name: "streamHTML",
|
|
6659
6687
|
signatures: [["?options"]]
|
|
6660
6688
|
},
|
|
6689
|
+
{
|
|
6690
|
+
name: "streamPrependHTML",
|
|
6691
|
+
signatures: [["?options"]]
|
|
6692
|
+
},
|
|
6661
6693
|
{
|
|
6662
6694
|
name: "appendHTML",
|
|
6663
6695
|
signatures: [["html","?options"]]
|
|
@@ -7779,6 +7811,22 @@ export const NativeFunctions = [
|
|
|
7779
7811
|
name: "signalCurrentUserDetails",
|
|
7780
7812
|
signatures: [["options"]]
|
|
7781
7813
|
},
|
|
7814
|
+
{
|
|
7815
|
+
name: "encapsulateKey",
|
|
7816
|
+
signatures: [["encapsulationAlgorithm","encapsulationKey","sharedKeyAlgorithm","extractable","keyUsages"]]
|
|
7817
|
+
},
|
|
7818
|
+
{
|
|
7819
|
+
name: "encapsulateBits",
|
|
7820
|
+
signatures: [["encapsulationAlgorithm","encapsulationKey"]]
|
|
7821
|
+
},
|
|
7822
|
+
{
|
|
7823
|
+
name: "decapsulateKey",
|
|
7824
|
+
signatures: [["decapsulationAlgorithm","decapsulationKey","ciphertext","sharedKeyAlgorithm","extractable","keyUsages"]]
|
|
7825
|
+
},
|
|
7826
|
+
{
|
|
7827
|
+
name: "decapsulateBits",
|
|
7828
|
+
signatures: [["decapsulationAlgorithm","decapsulationKey","ciphertext"]]
|
|
7829
|
+
},
|
|
7782
7830
|
{
|
|
7783
7831
|
name: "registerPaint",
|
|
7784
7832
|
signatures: [["name","paintCtor"]]
|
|
@@ -8067,6 +8115,10 @@ export const NativeFunctions = [
|
|
|
8067
8115
|
name: "OverconstrainedError",
|
|
8068
8116
|
signatures: [["constraint","?message"]]
|
|
8069
8117
|
},
|
|
8118
|
+
{
|
|
8119
|
+
name: "setConstraints",
|
|
8120
|
+
signatures: [["constraints"]]
|
|
8121
|
+
},
|
|
8070
8122
|
{
|
|
8071
8123
|
name: "createContext",
|
|
8072
8124
|
signatures: [["?options"]]
|
|
@@ -5,11 +5,14 @@
|
|
|
5
5
|
import type * as Platform from '../../core/platform/platform.js';
|
|
6
6
|
import type * as Trace from '../../models/trace/trace.js';
|
|
7
7
|
|
|
8
|
+
import type {CategoryId} from './RunTypes.js';
|
|
9
|
+
|
|
8
10
|
export class LighthouseReportGenerator {
|
|
9
11
|
generateReportHtml(_lhr: ReportJSON): string {
|
|
10
12
|
return '';
|
|
11
13
|
}
|
|
12
14
|
}
|
|
15
|
+
|
|
13
16
|
export interface AuditResultJSON {
|
|
14
17
|
rawValue?: number|boolean;
|
|
15
18
|
id: string;
|
|
@@ -21,8 +24,16 @@ export interface AuditResultJSON {
|
|
|
21
24
|
scoreDisplayMode: string;
|
|
22
25
|
error: boolean;
|
|
23
26
|
score: number|null;
|
|
27
|
+
numericValue?: number;
|
|
28
|
+
numericUnit?: string;
|
|
29
|
+
warnings?: string[];
|
|
24
30
|
details?: DetailsJSON;
|
|
31
|
+
scoringOptions?: {
|
|
32
|
+
p10: number,
|
|
33
|
+
median: number,
|
|
34
|
+
};
|
|
25
35
|
}
|
|
36
|
+
|
|
26
37
|
export interface AuditJSON {
|
|
27
38
|
id: string;
|
|
28
39
|
score: number|null;
|
|
@@ -30,6 +41,7 @@ export interface AuditJSON {
|
|
|
30
41
|
group?: string;
|
|
31
42
|
result: AuditResultJSON;
|
|
32
43
|
}
|
|
44
|
+
|
|
33
45
|
export interface CategoryJSON {
|
|
34
46
|
title: string;
|
|
35
47
|
id: string;
|
|
@@ -38,37 +50,103 @@ export interface CategoryJSON {
|
|
|
38
50
|
manualDescription: string;
|
|
39
51
|
auditRefs: AuditJSON[];
|
|
40
52
|
}
|
|
53
|
+
|
|
41
54
|
export interface GroupJSON {
|
|
42
55
|
title: string;
|
|
43
56
|
description?: string;
|
|
44
57
|
}
|
|
58
|
+
|
|
45
59
|
export interface ReportJSON {
|
|
46
60
|
lighthouseVersion: string;
|
|
47
61
|
userAgent: string;
|
|
48
62
|
fetchTime: string;
|
|
49
63
|
timing: {total: number};
|
|
50
64
|
requestedUrl?: string;
|
|
65
|
+
mainDocumentUrl?: string;
|
|
51
66
|
finalDisplayedUrl: string;
|
|
52
67
|
finalUrl?: string;
|
|
53
68
|
runWarnings?: string[];
|
|
69
|
+
environment?: {
|
|
70
|
+
networkUserAgent: string,
|
|
71
|
+
hostUserAgent: string,
|
|
72
|
+
benchmarkIndex: number,
|
|
73
|
+
credits?: Record<string, string>,
|
|
74
|
+
};
|
|
54
75
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
55
76
|
artifacts: {Trace: {traceEvents: unknown[]}};
|
|
56
77
|
audits: Record<string, AuditResultJSON>;
|
|
57
|
-
categories: Record<
|
|
78
|
+
categories: Record<CategoryId, CategoryJSON>;
|
|
58
79
|
categoryGroups: Record<string, GroupJSON>;
|
|
59
80
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
81
|
+
|
|
82
|
+
export type DetailsJSON =
|
|
83
|
+
|TableDetailsJSON|OpportunityDetailsJSON|FilmstripDetailsJSON|ScreenshotDetailsJSON|DebugDataDetailsJSON;
|
|
84
|
+
|
|
85
|
+
export interface TableDetailsJSON {
|
|
86
|
+
type: 'table';
|
|
87
|
+
headings: TableHeadingJSON[];
|
|
88
|
+
items: Array<Record<string, TableItemValue>>;
|
|
63
89
|
summary?: OpportunitySummary;
|
|
64
|
-
granularity?: number;
|
|
65
|
-
displayUnit?: string;
|
|
66
90
|
}
|
|
91
|
+
|
|
92
|
+
export interface TableHeadingJSON {
|
|
93
|
+
key: string;
|
|
94
|
+
valueType: 'url'|'text'|'numeric'|'timespanMs'|'bytes'|'node'|'source-location'|'code';
|
|
95
|
+
label: string;
|
|
96
|
+
itemType?: string;
|
|
97
|
+
subItemsHeading?: {
|
|
98
|
+
key: string,
|
|
99
|
+
valueType: string,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Represents the possible values found in an 'item' object
|
|
105
|
+
* based on the 'valueType' specified in headings.
|
|
106
|
+
*/
|
|
107
|
+
export type TableItemValue =|string|number|NodeDetailsJSON|SourceLocationDetailsJSON|Platform.DevToolsPath.UrlString;
|
|
108
|
+
|
|
109
|
+
export interface OpportunityDetailsJSON {
|
|
110
|
+
type: 'opportunity';
|
|
111
|
+
headings: TableHeadingJSON[];
|
|
112
|
+
items: Array<{
|
|
113
|
+
url: string,
|
|
114
|
+
wastedBytes?: number,
|
|
115
|
+
wastedMs?: number,
|
|
116
|
+
totalBytes?: number, [key: string]: unknown,
|
|
117
|
+
}>;
|
|
118
|
+
overallSavingsMs: number;
|
|
119
|
+
overallSavingsBytes?: number;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface FilmstripDetailsJSON {
|
|
123
|
+
type: 'filmstrip';
|
|
124
|
+
scale: number;
|
|
125
|
+
items: Array<{
|
|
126
|
+
timing: number,
|
|
127
|
+
timestamp: number,
|
|
128
|
+
data: string,
|
|
129
|
+
}>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface ScreenshotDetailsJSON {
|
|
133
|
+
type: 'screenshot';
|
|
134
|
+
timing: number;
|
|
135
|
+
timestamp: number;
|
|
136
|
+
data: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface DebugDataDetailsJSON {
|
|
140
|
+
type: 'debugdata';
|
|
141
|
+
items: unknown[];
|
|
142
|
+
}
|
|
143
|
+
|
|
67
144
|
export interface RunnerResultArtifacts {
|
|
68
145
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
69
146
|
Trace: {traceEvents: Trace.Types.Events.Event[]};
|
|
70
147
|
settings: {throttlingMethod: string};
|
|
71
148
|
}
|
|
149
|
+
|
|
72
150
|
export interface RunnerResult {
|
|
73
151
|
lhr: ReportJSON;
|
|
74
152
|
artifacts: RunnerResultArtifacts;
|
|
@@ -77,17 +155,33 @@ export interface RunnerResult {
|
|
|
77
155
|
fatal: boolean;
|
|
78
156
|
message?: string;
|
|
79
157
|
}
|
|
158
|
+
|
|
80
159
|
export interface NodeDetailsJSON {
|
|
81
|
-
type:
|
|
160
|
+
type: 'node';
|
|
161
|
+
lhId?: string;
|
|
82
162
|
path?: string;
|
|
83
163
|
selector?: string;
|
|
164
|
+
nodeLabel?: string;
|
|
84
165
|
snippet?: string;
|
|
166
|
+
boundingRect?: {
|
|
167
|
+
top: number,
|
|
168
|
+
bottom: number,
|
|
169
|
+
left: number,
|
|
170
|
+
right: number,
|
|
171
|
+
width: number,
|
|
172
|
+
height: number,
|
|
173
|
+
};
|
|
174
|
+
explanation?: string;
|
|
85
175
|
}
|
|
176
|
+
|
|
86
177
|
export interface SourceLocationDetailsJSON {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
178
|
+
type: 'source-location';
|
|
179
|
+
url?: Platform.DevToolsPath.UrlString;
|
|
180
|
+
urlProvider?: 'network'|'stack';
|
|
181
|
+
line?: number;
|
|
182
|
+
column?: number;
|
|
90
183
|
}
|
|
184
|
+
|
|
91
185
|
export interface OpportunitySummary {
|
|
92
186
|
wastedMs?: number;
|
|
93
187
|
wastedBytes?: number;
|
|
@@ -17,33 +17,64 @@ declare const window: Window&{
|
|
|
17
17
|
[Spec.EVENT_BINDING_NAME]: (payload: string) => void,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
20
|
+
const eventListenerCleanupController = new AbortController();
|
|
21
|
+
|
|
22
|
+
const patchAddListener = (proto: typeof Window.prototype|typeof Document.prototype): void => {
|
|
23
|
+
const original = proto.addEventListener;
|
|
24
|
+
|
|
25
|
+
proto.addEventListener = function(
|
|
26
|
+
type: string, listener: EventListenerOrEventListenerObject, options?: boolean|AddEventListenerOptions): void {
|
|
27
|
+
// Standardize options into an object
|
|
28
|
+
const navOptions = typeof options === 'boolean' ? {capture: options} : {...options};
|
|
29
|
+
|
|
30
|
+
// If we already have a signal, we should respect it,
|
|
31
|
+
// but also link it to our global cleanup signal.
|
|
32
|
+
if (navOptions.signal) {
|
|
33
|
+
navOptions.signal = AbortSignal.any([navOptions.signal, eventListenerCleanupController.signal]);
|
|
34
|
+
} else {
|
|
35
|
+
navOptions.signal = eventListenerCleanupController.signal;
|
|
36
|
+
}
|
|
25
37
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
windowListeners.push(args);
|
|
29
|
-
return originalWindowAddListener.call(this, ...args);
|
|
38
|
+
return original.call(this, type, listener, navOptions);
|
|
39
|
+
};
|
|
30
40
|
};
|
|
31
41
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return originalDocumentAddListener.call(this, ...args);
|
|
36
|
-
};
|
|
42
|
+
// Patch the core targets
|
|
43
|
+
patchAddListener(Window.prototype);
|
|
44
|
+
patchAddListener(Document.prototype);
|
|
37
45
|
|
|
38
|
-
class
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
// Use a class wrapper that auto-registers and auto-unregisters
|
|
47
|
+
const activeObservers = new Set<PerformanceObserver>();
|
|
48
|
+
class TrackedPerformanceObserver extends globalThis.PerformanceObserver {
|
|
49
|
+
constructor(callback: PerformanceObserverCallback) {
|
|
50
|
+
super(callback);
|
|
51
|
+
activeObservers.add(this);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Override disconnect to remove it from our tracking set
|
|
55
|
+
override disconnect(): void {
|
|
56
|
+
super.disconnect();
|
|
57
|
+
activeObservers.delete(this);
|
|
42
58
|
}
|
|
43
59
|
}
|
|
44
|
-
globalThis.PerformanceObserver = InternalPerformanceObserver;
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
const nodeList: Array<WeakRef<Node>> = [];
|
|
62
|
+
const nodeToIdMap = new WeakMap<Node, number>();
|
|
63
|
+
|
|
64
|
+
function establishNodeIndex(node: Node): number {
|
|
65
|
+
let index = nodeToIdMap.get(node);
|
|
66
|
+
if (index !== undefined) {
|
|
67
|
+
return index;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
index = nodeList.length;
|
|
71
|
+
nodeList.push(new WeakRef(node));
|
|
72
|
+
nodeToIdMap.set(node, index);
|
|
73
|
+
return index;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Replace the global constructor
|
|
77
|
+
globalThis.PerformanceObserver = TrackedPerformanceObserver;
|
|
47
78
|
|
|
48
79
|
/**
|
|
49
80
|
* This is a hack solution to remove any listeners that were added by web-vitals.js
|
|
@@ -51,22 +82,23 @@ let killed = false;
|
|
|
51
82
|
* context should be considered dead and a new one will need to be created for live metrics
|
|
52
83
|
* to be served again.
|
|
53
84
|
*/
|
|
85
|
+
let killed = false;
|
|
54
86
|
window[Spec.INTERNAL_KILL_SWITCH] = () => {
|
|
55
87
|
if (killed) {
|
|
56
88
|
return;
|
|
57
89
|
}
|
|
58
90
|
|
|
59
|
-
for (const observer of
|
|
91
|
+
for (const observer of activeObservers) {
|
|
92
|
+
// This calls the overridden disconnect above,
|
|
93
|
+
// cleaning up BOTH the browser resource and our Set.
|
|
60
94
|
observer.disconnect();
|
|
61
95
|
}
|
|
96
|
+
activeObservers.clear();
|
|
62
97
|
|
|
63
|
-
|
|
64
|
-
window.removeEventListener(...args);
|
|
65
|
-
}
|
|
98
|
+
eventListenerCleanupController.abort();
|
|
66
99
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
100
|
+
// Explicitly clear the Node List to help GC
|
|
101
|
+
nodeList.length = 0;
|
|
70
102
|
|
|
71
103
|
killed = true;
|
|
72
104
|
};
|
|
@@ -76,14 +108,6 @@ function sendEventToDevTools(event: Spec.WebVitalsEvent): void {
|
|
|
76
108
|
window[Spec.EVENT_BINDING_NAME](payload);
|
|
77
109
|
}
|
|
78
110
|
|
|
79
|
-
const nodeList: Array<WeakRef<Node>> = [];
|
|
80
|
-
|
|
81
|
-
function establishNodeIndex(node: Node): number {
|
|
82
|
-
const index = nodeList.length;
|
|
83
|
-
nodeList.push(new WeakRef(node));
|
|
84
|
-
return index;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
111
|
/**
|
|
88
112
|
* The data sent over the event binding needs to be JSON serializable, so we
|
|
89
113
|
* can't send DOM nodes directly. Instead we create an ID for each node (see
|
|
@@ -34,6 +34,11 @@ export interface Frame {
|
|
|
34
34
|
readonly column: number;
|
|
35
35
|
|
|
36
36
|
readonly missingDebugInfo?: MissingDebugInfo;
|
|
37
|
+
/**
|
|
38
|
+
* The untranslated function name. For inlined frames this will be the name
|
|
39
|
+
* of the containing function.
|
|
40
|
+
*/
|
|
41
|
+
readonly rawName?: string;
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
export interface DebuggableFrame extends Frame {
|
|
@@ -84,16 +84,18 @@ export class FrameImpl implements StackTrace.StackTrace.Frame {
|
|
|
84
84
|
readonly column: number;
|
|
85
85
|
|
|
86
86
|
readonly missingDebugInfo?: StackTrace.StackTrace.MissingDebugInfo;
|
|
87
|
+
readonly rawName?: string;
|
|
87
88
|
|
|
88
89
|
constructor(
|
|
89
90
|
url: string|undefined, uiSourceCode: Workspace.UISourceCode.UISourceCode|undefined, name: string|undefined,
|
|
90
|
-
line: number, column: number, missingDebugInfo?: StackTrace.StackTrace.MissingDebugInfo) {
|
|
91
|
+
line: number, column: number, missingDebugInfo?: StackTrace.StackTrace.MissingDebugInfo, rawName?: string) {
|
|
91
92
|
this.url = url;
|
|
92
93
|
this.uiSourceCode = uiSourceCode;
|
|
93
94
|
this.name = name;
|
|
94
95
|
this.line = line;
|
|
95
96
|
this.column = column;
|
|
96
97
|
this.missingDebugInfo = missingDebugInfo;
|
|
98
|
+
this.rawName = rawName;
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
|
|
@@ -166,6 +168,10 @@ export class DebuggableFrameImpl implements StackTrace.StackTrace.DebuggableFram
|
|
|
166
168
|
return this.#frame.missingDebugInfo;
|
|
167
169
|
}
|
|
168
170
|
|
|
171
|
+
get rawName(): string|undefined {
|
|
172
|
+
return this.#frame.rawName;
|
|
173
|
+
}
|
|
174
|
+
|
|
169
175
|
get sdkFrame(): SDK.DebuggerModel.CallFrame {
|
|
170
176
|
return this.#sdkFrame;
|
|
171
177
|
}
|
|
@@ -166,7 +166,8 @@ export class StackTraceModel extends SDK.SDKModel.SDKModel<unknown> {
|
|
|
166
166
|
for (const node of fragment.node.getCallStack()) {
|
|
167
167
|
node.frames = uiFrames[i++].map(
|
|
168
168
|
frame => new FrameImpl(
|
|
169
|
-
frame.url, frame.uiSourceCode, frame.name, frame.line, frame.column, frame.missingDebugInfo
|
|
169
|
+
frame.url, frame.uiSourceCode, frame.name, frame.line, frame.column, frame.missingDebugInfo,
|
|
170
|
+
node.rawFrame.functionName));
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
173
|
|
|
@@ -2,8 +2,12 @@
|
|
|
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 ErrorStackParser from './ErrorStackParser.js';
|
|
5
6
|
import * as StackTrace from './StackTrace.js';
|
|
6
7
|
|
|
7
8
|
export {
|
|
9
|
+
// TODO(crbug.com/485142682): Move to stack_trace_impl.js once all usage
|
|
10
|
+
// goes through createStackTraceFromErrorObject.
|
|
11
|
+
ErrorStackParser,
|
|
8
12
|
StackTrace,
|
|
9
13
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
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
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
|
+
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
6
|
|
|
6
7
|
import * as Common from '../../core/common/common.js';
|
|
7
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -9,6 +10,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
9
10
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
11
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
11
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
|
+
import {render} from '../../ui/lit/lit.js';
|
|
12
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
15
|
import * as PanelsCommon from '../common/common.js';
|
|
14
16
|
|
|
@@ -591,9 +593,11 @@ export class AXRelatedNodeElement {
|
|
|
591
593
|
if (!node) {
|
|
592
594
|
return;
|
|
593
595
|
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
596
|
+
render(
|
|
597
|
+
PanelsCommon.DOMLinkifier.Linkifier.instance().linkify(node, {
|
|
598
|
+
preventKeyboardFocus: true,
|
|
599
|
+
}),
|
|
600
|
+
valueElement);
|
|
597
601
|
});
|
|
598
602
|
} else if (this.idref) {
|
|
599
603
|
element.classList.add('invalid');
|