chrome-devtools-frontend 1.0.1708524 → 1.0.1711155
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/AUTHORS +3 -0
- package/front_end/core/common/Color.ts +6 -0
- package/front_end/core/common/ParsedURL.ts +20 -19
- package/front_end/core/common/VersionController.ts +0 -53
- package/front_end/core/root/Runtime.ts +0 -41
- package/front_end/core/sdk/CSSModel.ts +57 -0
- package/front_end/core/sdk/CSSPropertyParser.ts +10 -17
- package/front_end/core/sdk/DOMModel.ts +6 -4
- package/front_end/core/sdk/DebuggerModel.ts +90 -56
- package/front_end/core/sdk/NetworkRequest.ts +37 -15
- package/front_end/core/sdk/OverlayModel.ts +47 -0
- package/front_end/core/sdk/PageFunctions.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +26 -6
- package/front_end/core/sdk/SourceMap.ts +38 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +89 -0
- package/front_end/core/text_utils/TextUtils.ts +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +2 -21
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.ts +1 -1
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +20 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +126 -2
- package/front_end/models/ai_assistance/AiConversation.ts +2 -2
- package/front_end/models/ai_assistance/AiUtils.ts +4 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +71 -17
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +257 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -2
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +52 -0
- package/front_end/models/ai_assistance/contexts/{AccessibilityContext.ts → LighthouseContext.ts} +25 -5
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +11 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +47 -19
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -18
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +81 -103
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +202 -15
- package/front_end/models/ai_assistance/skills/accessibility.md +1 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +1 -0
- package/front_end/models/ai_assistance/skills/styling.md +1 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +6 -0
- package/front_end/models/ai_assistance/tools/GetCookieValues.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetInsightDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +2 -1
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetStorageBreakdown.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +3 -0
- package/front_end/models/ai_assistance/tools/GetStyles.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +3 -1
- package/front_end/models/ai_assistance/tools/GetTraceFunctionCode.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +2 -0
- package/front_end/models/ai_assistance/tools/GetTraceResourceContent.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListCookies.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +2 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +13 -5
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +2 -0
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +2 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +2 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +14 -9
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +2 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +53 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +41 -10
- package/front_end/models/bindings/SourceMapStepping.ts +122 -0
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -0
- package/front_end/models/bindings/bindings.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +91 -63
- package/front_end/models/har/HARFormat.ts +2 -7
- package/front_end/models/har/Importer.ts +2 -3
- package/front_end/models/javascript_metadata/NativeFunctions.ts +52 -48
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +5 -1
- package/front_end/models/persistence/Automapping.ts +8 -3
- package/front_end/models/source_map_scopes/NamesResolver.ts +30 -5
- package/front_end/models/trace/LanternComputationData.ts +8 -0
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +7 -2
- package/front_end/models/trace/lantern/graph/NetworkNode.ts +14 -0
- package/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +2 -2
- package/front_end/models/trace/lantern/metrics/TotalBlockingTime.ts +1 -1
- package/front_end/models/trace/lantern/simulation/ConnectionPool.ts +4 -4
- package/front_end/models/trace/lantern/simulation/Simulator.ts +6 -2
- package/front_end/models/trace/lantern/simulation/TCPConnection.ts +12 -12
- package/front_end/models/trace/lantern/types/Lantern.ts +8 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +14 -12
- package/front_end/panels/ai_assistance/components/ChatInput.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +121 -13
- package/front_end/panels/ai_assistance/components/chatMessage.css +47 -0
- package/front_end/panels/application/BackgroundServiceView.ts +31 -33
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +10 -10
- package/front_end/panels/application/DOMStorageItemsView.ts +7 -8
- package/front_end/panels/application/ExtensionStorageItemsView.ts +4 -5
- package/front_end/panels/application/IndexedDBModel.ts +8 -20
- package/front_end/panels/application/IndexedDBViews.ts +31 -37
- package/front_end/panels/application/KeyValueStorageItemsView.ts +5 -5
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +6 -6
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +17 -17
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +8 -8
- package/front_end/panels/application/ServiceWorkersView.ts +44 -52
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -10
- package/front_end/panels/application/StorageItemsToolbar.ts +6 -6
- package/front_end/panels/application/StorageView.ts +36 -34
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -2
- package/front_end/panels/application/WebMCPView.ts +50 -50
- package/front_end/panels/comments/CommentsPane.ts +266 -0
- package/front_end/panels/comments/comments-meta.ts +47 -0
- package/front_end/panels/comments/comments.ts +9 -0
- package/front_end/panels/comments/commentsPane.css +206 -0
- package/front_end/panels/common/CommentThreadWidget.ts +0 -17
- package/front_end/panels/common/CommentsOverlayWidget.ts +0 -4
- package/front_end/panels/common/CommentsStatusBarPill.ts +3 -1
- package/front_end/panels/common/ExtensionServer.ts +52 -50
- package/front_end/panels/common/commentThreadWidget.css +0 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -2
- package/front_end/panels/console/ConsoleViewport.ts +1 -1
- package/front_end/panels/console/SymbolizedErrorWidget.ts +18 -9
- package/front_end/panels/elements/CSSValueTraceView.ts +4 -4
- package/front_end/panels/elements/ComputedStyleWidget.ts +46 -42
- package/front_end/panels/elements/DOMPath.ts +17 -1
- package/front_end/panels/elements/DOMTreeContextMenu.ts +15 -0
- package/front_end/panels/elements/DOMTreeWidget.ts +37 -23
- package/front_end/panels/elements/ElementsPanel.ts +14 -11
- package/front_end/panels/elements/ElementsTreeElement.ts +24 -18
- package/front_end/panels/elements/EventListenersWidget.ts +5 -3
- package/front_end/panels/elements/InspectElementModeController.ts +6 -3
- package/front_end/panels/elements/LayoutPane.ts +3 -3
- package/front_end/panels/elements/PropertyRenderer.ts +132 -87
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +49 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +59 -51
- package/front_end/panels/elements/StylePropertyUtils.ts +11 -3
- package/front_end/panels/elements/StylesContainer.ts +2 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +75 -16
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +2 -1
- package/front_end/panels/elements/elements-meta.ts +24 -75
- package/front_end/panels/emulation/DeviceModeToolbar.ts +5 -2
- package/front_end/panels/emulation/DeviceModeView.ts +6 -3
- package/front_end/panels/emulation/emulation-meta.ts +3 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +11 -7
- package/front_end/panels/layer_viewer/layer_viewer-meta.ts +3 -10
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +13 -3
- package/front_end/panels/network/NetworkConfigView.ts +30 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -0
- package/front_end/panels/network/NetworkLogView.ts +15 -18
- package/front_end/panels/network/NetworkPanel.ts +4 -3
- package/front_end/panels/network/NetworkWaterfallColumn.ts +7 -4
- package/front_end/panels/network/network-meta.ts +23 -34
- package/front_end/panels/profiler/HeapProfileView.ts +20 -24
- package/front_end/panels/profiler/ProfilesPanel.ts +8 -3
- package/front_end/panels/screencast/ScreencastView.ts +6 -4
- package/front_end/panels/security/SecurityPanel.ts +27 -20
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +9 -1
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +36 -32
- package/front_end/panels/sources/UISourceCodeFrame.ts +69 -64
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +4 -1
- package/front_end/panels/timeline/CountersGraph.ts +19 -10
- package/front_end/panels/timeline/ModificationsManager.ts +3 -1
- package/front_end/panels/timeline/ThreadAppender.ts +4 -1
- package/front_end/panels/timeline/TimelineController.ts +9 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +4 -1
- package/front_end/panels/timeline/TimelineEventOverview.ts +3 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -4
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -4
- package/front_end/panels/timeline/TimelinePanel.ts +27 -16
- package/front_end/panels/timeline/TimelineTreeView.ts +0 -6
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +7 -20
- package/front_end/panels/timeline/components/MetricCard.ts +262 -315
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +3 -1
- package/front_end/panels/timeline/components/liveMetricsView.css +4 -0
- package/front_end/panels/timeline/components/metricCard.css +2 -24
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +36 -18
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +298 -196
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +76 -74
- package/front_end/panels/timeline/timeline-meta.ts +22 -84
- package/front_end/panels/whats_new/WhatsNewImpl.ts +2 -1
- package/front_end/panels/whats_new/whats_new-meta.ts +2 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +5 -3
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +8 -5
- package/front_end/third_party/web-vitals/package/package.json +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +9 -5
- package/front_end/third_party/web-vitals/rebuild.sh +2 -2
- package/front_end/ui/components/text_editor/TextEditor.ts +18 -6
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +83 -12
- package/front_end/ui/legacy/TextPrompt.ts +80 -19
- package/front_end/ui/legacy/Toolbar.ts +29 -9
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +93 -31
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +15 -7
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +11 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +33 -17
- package/front_end/ui/legacy/tabbedPane.css +12 -8
- package/front_end/ui/settings/ElementsSettings.ts +93 -0
- package/front_end/ui/settings/EmulationSettings.ts +17 -0
- package/front_end/ui/settings/LayerViewerSettings.ts +26 -0
- package/front_end/ui/settings/NetworkSettings.ts +26 -0
- package/front_end/ui/settings/TimelineSettings.ts +103 -0
- package/front_end/ui/settings/WhatsNewSettings.ts +11 -0
- package/front_end/ui/settings/settings.ts +12 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/inspector_overlay/highlight_anchor.ts +1 -1
- package/package.json +1 -1
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.snapshot.txt +0 -26
|
@@ -270,7 +270,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
270
270
|
/**
|
|
271
271
|
* Whether this request was imported from a HAR file.
|
|
272
272
|
*/
|
|
273
|
-
#isImportedHar
|
|
273
|
+
readonly #isImportedHar: boolean;
|
|
274
274
|
#associatedData = new Map<string, object>();
|
|
275
275
|
#hasOverriddenContent = false;
|
|
276
276
|
#hasThirdPartyCookiePhaseoutIssue = false;
|
|
@@ -295,6 +295,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
295
295
|
hasUserGesture?: boolean,
|
|
296
296
|
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
297
297
|
console: Common.Console.Console = Common.Console.Console.instance(),
|
|
298
|
+
isImportedHar = false,
|
|
298
299
|
) {
|
|
299
300
|
super();
|
|
300
301
|
|
|
@@ -309,6 +310,7 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
309
310
|
this.#isAdRelated = false;
|
|
310
311
|
this.#isLinkPreload = false;
|
|
311
312
|
this.#console = console;
|
|
313
|
+
this.#isImportedHar = isImportedHar;
|
|
312
314
|
}
|
|
313
315
|
|
|
314
316
|
static create(
|
|
@@ -373,6 +375,36 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
373
375
|
);
|
|
374
376
|
}
|
|
375
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Creates a network request representing an entry imported from a HAR file.
|
|
380
|
+
*
|
|
381
|
+
* Use this instead of {@link createWithoutBackendRequest} when importing HAR logs
|
|
382
|
+
* (or testing HAR-imported traffic) so that the request is marked as HAR-imported
|
|
383
|
+
* at construction time and its security origins ({@link requestURLSecurityOrigin}
|
|
384
|
+
* and {@link initiatorSecurityOrigin}) resolve to isolated `imported-har://`
|
|
385
|
+
* virtual origins rather than colliding with live web origins.
|
|
386
|
+
*/
|
|
387
|
+
static createForImportedHar(
|
|
388
|
+
requestId: string,
|
|
389
|
+
url: Platform.DevToolsPath.UrlString,
|
|
390
|
+
documentURL: Platform.DevToolsPath.UrlString,
|
|
391
|
+
initiator: Protocol.Network.Initiator|null,
|
|
392
|
+
console?: Common.Console.Console,
|
|
393
|
+
): NetworkRequest {
|
|
394
|
+
return new NetworkRequest(
|
|
395
|
+
requestId,
|
|
396
|
+
undefined,
|
|
397
|
+
url,
|
|
398
|
+
documentURL,
|
|
399
|
+
null,
|
|
400
|
+
null,
|
|
401
|
+
initiator,
|
|
402
|
+
undefined,
|
|
403
|
+
console,
|
|
404
|
+
true,
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
376
408
|
identityCompare(other: NetworkRequest): number {
|
|
377
409
|
const thisId = this.requestId();
|
|
378
410
|
const thatId = other.requestId();
|
|
@@ -404,9 +436,8 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
404
436
|
* (`imported-har://${authority}`) to ensure recorded network traffic never collides with
|
|
405
437
|
* live web origins.
|
|
406
438
|
*
|
|
407
|
-
* The result is cached, so repeated calls return the same instance until the URL
|
|
408
|
-
*
|
|
409
|
-
* with themselves.
|
|
439
|
+
* The result is cached, so repeated calls return the same instance until the URL changes.
|
|
440
|
+
* This keeps opaque origins (such as `data:` URLs) same-origin with themselves.
|
|
410
441
|
*
|
|
411
442
|
* @see {@link initiatorSecurityOrigin} to obtain the origin of the document that initiated the request.
|
|
412
443
|
*/
|
|
@@ -431,8 +462,8 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
431
462
|
* For imported HAR files, the origin is mapped to an isolated virtual domain
|
|
432
463
|
* (`imported-har://${authority}`) matching the imported initiating document.
|
|
433
464
|
*
|
|
434
|
-
* The result is cached, so repeated calls return the same instance
|
|
435
|
-
*
|
|
465
|
+
* The result is cached, so repeated calls return the same instance. This keeps opaque
|
|
466
|
+
* origins same-origin with themselves.
|
|
436
467
|
*
|
|
437
468
|
* @see {@link requestURLSecurityOrigin} to obtain the origin of the target resource URL being requested.
|
|
438
469
|
*/
|
|
@@ -1219,15 +1250,6 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
1219
1250
|
return this.#isImportedHar;
|
|
1220
1251
|
}
|
|
1221
1252
|
|
|
1222
|
-
setIsImportedHar(isImportedHar: boolean): void {
|
|
1223
|
-
if (this.#isImportedHar === isImportedHar) {
|
|
1224
|
-
return;
|
|
1225
|
-
}
|
|
1226
|
-
this.#isImportedHar = isImportedHar;
|
|
1227
|
-
this.#requestURLSecurityOrigin = undefined;
|
|
1228
|
-
this.#initiatorSecurityOrigin = undefined;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
1253
|
setEarlyHintsHeaders(headers: NameValue[]): void {
|
|
1232
1254
|
this.earlyHintsHeaders = headers;
|
|
1233
1255
|
}
|
|
@@ -662,6 +662,18 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
662
662
|
color: Common.Color.PageHighlight.LayoutLine.toProtocolRGBA(),
|
|
663
663
|
},
|
|
664
664
|
};
|
|
665
|
+
|
|
666
|
+
highlightConfig.imcbHighlightConfig = {
|
|
667
|
+
imcbBorderColor: Common.Color.PageHighlight.AnchorIMCB.toProtocolRGBA(),
|
|
668
|
+
imcbBackgroundColor: Common.Color.PageHighlight.AnchorIMCBBackground.toProtocolRGBA(),
|
|
669
|
+
insetsBackgroundColor: Common.Color.PageHighlight.AnchorInsetsBackground.toProtocolRGBA(),
|
|
670
|
+
insetsHatchColor: Common.Color.PageHighlight.AnchorInsetsHatch.toProtocolRGBA(),
|
|
671
|
+
anchorBorderColor: Common.Color.PageHighlight.AnchorTarget.toProtocolRGBA(),
|
|
672
|
+
anchorBackgroundColor: Common.Color.PageHighlight.AnchorTargetBackground.toProtocolRGBA(),
|
|
673
|
+
showPositionAreaGrid: true,
|
|
674
|
+
positionAreaGridLineColor: Common.Color.PageHighlight.AnchorTarget.toProtocolRGBA(),
|
|
675
|
+
positionAreaActiveRegionColor: Common.Color.PageHighlight.AnchorTargetBackground.toProtocolRGBA(),
|
|
676
|
+
};
|
|
665
677
|
}
|
|
666
678
|
|
|
667
679
|
if (mode.endsWith('gap')) {
|
|
@@ -793,6 +805,41 @@ export class OverlayModel extends SDKModel<EventTypes> implements ProtocolProxyA
|
|
|
793
805
|
};
|
|
794
806
|
}
|
|
795
807
|
|
|
808
|
+
const baseImcbHighlightConfig = {
|
|
809
|
+
imcbBorderColor: Common.Color.PageHighlight.AnchorIMCB.toProtocolRGBA(),
|
|
810
|
+
imcbBackgroundColor: Common.Color.PageHighlight.AnchorIMCBBackground.toProtocolRGBA(),
|
|
811
|
+
anchorBorderColor: Common.Color.PageHighlight.AnchorTarget.toProtocolRGBA(),
|
|
812
|
+
anchorBackgroundColor: Common.Color.PageHighlight.AnchorTargetBackground.toProtocolRGBA(),
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
if (mode === 'anchor-positioning') {
|
|
816
|
+
highlightConfig.imcbHighlightConfig = {
|
|
817
|
+
...baseImcbHighlightConfig,
|
|
818
|
+
insetsBackgroundColor: Common.Color.PageHighlight.AnchorInsetsBackground.toProtocolRGBA(),
|
|
819
|
+
insetsHatchColor: Common.Color.PageHighlight.AnchorInsetsHatch.toProtocolRGBA(),
|
|
820
|
+
showPositionAreaGrid: true,
|
|
821
|
+
positionAreaGridLineColor: Common.Color.PageHighlight.AnchorTarget.toProtocolRGBA(),
|
|
822
|
+
positionAreaActiveRegionColor: Common.Color.PageHighlight.AnchorTargetBackground.toProtocolRGBA(),
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
if (mode === 'position-area') {
|
|
827
|
+
highlightConfig.imcbHighlightConfig = {
|
|
828
|
+
...baseImcbHighlightConfig,
|
|
829
|
+
showPositionAreaGrid: true,
|
|
830
|
+
positionAreaGridLineColor: Common.Color.PageHighlight.AnchorTarget.toProtocolRGBA(),
|
|
831
|
+
positionAreaActiveRegionColor: Common.Color.PageHighlight.AnchorTargetBackground.toProtocolRGBA(),
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
if (mode === 'insets') {
|
|
836
|
+
highlightConfig.imcbHighlightConfig = {
|
|
837
|
+
...baseImcbHighlightConfig,
|
|
838
|
+
insetsBackgroundColor: Common.Color.PageHighlight.AnchorInsetsBackground.toProtocolRGBA(),
|
|
839
|
+
insetsHatchColor: Common.Color.PageHighlight.AnchorInsetsHatch.toProtocolRGBA(),
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
|
|
796
843
|
return highlightConfig;
|
|
797
844
|
}
|
|
798
845
|
|
|
@@ -109,7 +109,7 @@ export function toggleClassAndInjectStyleRule(this: Element, pseudoElementName:
|
|
|
109
109
|
const classNamePrefix = '__web-inspector-hide';
|
|
110
110
|
const classNameSuffix = '-shortcut__';
|
|
111
111
|
const styleTagId = '__web-inspector-hide-shortcut-style__';
|
|
112
|
-
const pseudoElementNameEscaped = pseudoElementName ? pseudoElementName.replace(/[
|
|
112
|
+
const pseudoElementNameEscaped = pseudoElementName ? pseudoElementName.replace(/[^a-zA-Z0-9_-]/g, '_') : '';
|
|
113
113
|
const className = classNamePrefix + pseudoElementNameEscaped + classNameSuffix;
|
|
114
114
|
this.classList.toggle(className, hidden);
|
|
115
115
|
|
|
@@ -317,6 +317,29 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
#resolveFrameTarget(initiator: PageResourceLoadInitiator): {
|
|
321
|
+
frameTarget: Target|null,
|
|
322
|
+
frameId: Protocol.Page.FrameId|null,
|
|
323
|
+
} {
|
|
324
|
+
let frameTarget: Target|null = initiator.target;
|
|
325
|
+
let parentFrameId: Protocol.Page.FrameId|null = null;
|
|
326
|
+
while (frameTarget && !frameTarget.model(ResourceTreeModel)) {
|
|
327
|
+
parentFrameId = parentFrameId ?? frameTarget.targetInfo()?.parentFrameId ?? null;
|
|
328
|
+
frameTarget = frameTarget.parentTarget();
|
|
329
|
+
}
|
|
330
|
+
const frameId = initiator.frameId ?? parentFrameId ?? frameTarget?.model(ResourceTreeModel)?.mainFrame?.id ?? null;
|
|
331
|
+
return {frameTarget, frameId};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
#isSameOriginWithPrimaryPage(frameTarget: Target|null, frameId: Protocol.Page.FrameId|null): boolean {
|
|
335
|
+
const primaryFrame = this.#targetManager.primaryPageTarget()?.model(ResourceTreeModel)?.mainFrame;
|
|
336
|
+
const initiatorFrame = frameId ? frameTarget?.model(ResourceTreeModel)?.frameForId(frameId) : null;
|
|
337
|
+
if (!primaryFrame || !initiatorFrame) {
|
|
338
|
+
return false;
|
|
339
|
+
}
|
|
340
|
+
return initiatorFrame.securityOrigin().isSameOriginWith(primaryFrame.securityOrigin());
|
|
341
|
+
}
|
|
342
|
+
|
|
320
343
|
private async dispatchLoad(
|
|
321
344
|
url: Platform.DevToolsPath.UrlString, initiator: PageResourceLoadInitiator, isBinary: boolean): Promise<{
|
|
322
345
|
success: boolean,
|
|
@@ -343,11 +366,7 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
343
366
|
// directive is present. A null/error response keeps the guard armed so that a
|
|
344
367
|
// detached-frame or protocol-error path cannot fall through to loadFromHostBindings.
|
|
345
368
|
let mustEnforceCSP = isHttp;
|
|
346
|
-
|
|
347
|
-
while (frameTarget && !frameTarget.model(ResourceTreeModel)) {
|
|
348
|
-
frameTarget = frameTarget.parentTarget();
|
|
349
|
-
}
|
|
350
|
-
const frameId = initiator.frameId ?? frameTarget?.model(ResourceTreeModel)?.mainFrame?.id ?? null;
|
|
369
|
+
const {frameTarget, frameId} = this.#resolveFrameTarget(initiator);
|
|
351
370
|
if (isHttp && frameTarget) {
|
|
352
371
|
const networkManager = frameTarget.model(NetworkManager);
|
|
353
372
|
if (networkManager) {
|
|
@@ -366,7 +385,8 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
366
385
|
} catch (e) {
|
|
367
386
|
if (e instanceof Error) {
|
|
368
387
|
Host.userMetrics.developerResourceLoaded(Host.UserMetrics.DeveloperResourceLoaded.LOAD_THROUGH_PAGE_FAILURE);
|
|
369
|
-
if (mustEnforceCSP ||
|
|
388
|
+
if (mustEnforceCSP || !this.#isSameOriginWithPrimaryPage(frameTarget, frameId) ||
|
|
389
|
+
e.message.includes('CSP violation')) {
|
|
370
390
|
return {
|
|
371
391
|
success: false,
|
|
372
392
|
content: '',
|
|
@@ -12,7 +12,12 @@ import {scopeTreeForScript} from './ScopeTreeCache.js';
|
|
|
12
12
|
import type {Script} from './Script.js';
|
|
13
13
|
import {buildOriginalScopes, decodePastaRanges, type NamedFunctionRange} from './SourceMapFunctionRanges.js';
|
|
14
14
|
import {decodeRangeMappings} from './SourceMapRangeMappings.js';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
type PositionRange,
|
|
17
|
+
type RawFrameTranslation,
|
|
18
|
+
scriptRelativePosition,
|
|
19
|
+
SourceMapScopesInfo,
|
|
20
|
+
} from './SourceMapScopesInfo.js';
|
|
16
21
|
|
|
17
22
|
/**
|
|
18
23
|
* Type of the base source map JSON object, which contains the sources and the mappings at the very least, plus
|
|
@@ -250,6 +255,16 @@ export class SourceMap {
|
|
|
250
255
|
return this.#scopesInfo !== null && !this.#scopesInfo.isEmpty();
|
|
251
256
|
}
|
|
252
257
|
|
|
258
|
+
/**
|
|
259
|
+
* True iff the scopes come from the source map itself (encoded `scopes`), not from the AST fallback or from an
|
|
260
|
+
* extension.
|
|
261
|
+
*/
|
|
262
|
+
hasEncodedScopeInfo(): boolean {
|
|
263
|
+
this.#ensureSourceMapProcessed();
|
|
264
|
+
return this.#scopesInfo !== null && this.#scopesFallbackPromise === undefined &&
|
|
265
|
+
this.#scopesInfo.hasGeneratedRanges();
|
|
266
|
+
}
|
|
267
|
+
|
|
253
268
|
waitForScopeInfo(): Promise<void> {
|
|
254
269
|
this.#ensureSourceMapProcessed();
|
|
255
270
|
return this.#scopesFallbackPromise ?? Promise.resolve();
|
|
@@ -872,6 +887,28 @@ export class SourceMap {
|
|
|
872
887
|
this.#ensureSourceMapProcessed();
|
|
873
888
|
return this.#scopesInfo?.translateRawFrame(generatedLine, generatedColumn) ?? null;
|
|
874
889
|
}
|
|
890
|
+
|
|
891
|
+
/** See {@link SourceMapScopesInfo.inlinedFunctionRange}. `null` without encoded scopes. */
|
|
892
|
+
inlinedFunctionRange(generatedLine: number, generatedColumn: number): PositionRange|null {
|
|
893
|
+
return this.hasEncodedScopeInfo() ? this.#scopesInfo?.inlinedFunctionRange(generatedLine, generatedColumn) ?? null :
|
|
894
|
+
null;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/** See {@link SourceMapScopesInfo.inlinedCalleeRanges}. Empty without encoded scopes. */
|
|
898
|
+
inlinedCalleeRanges(generatedLine: number, generatedColumn: number): PositionRange[] {
|
|
899
|
+
return this.hasEncodedScopeInfo() ? this.#scopesInfo?.inlinedCalleeRanges(generatedLine, generatedColumn) ?? [] :
|
|
900
|
+
[];
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/** See {@link SourceMapScopesInfo.hasOutlinedFunctions}. False without encoded scopes. */
|
|
904
|
+
hasOutlinedFunctions(): boolean {
|
|
905
|
+
return this.hasEncodedScopeInfo() && (this.#scopesInfo?.hasOutlinedFunctions() ?? false);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/** See {@link SourceMapScopesInfo.artificialFunctionRanges}. Empty without encoded scopes. */
|
|
909
|
+
artificialFunctionRanges(): PositionRange[] {
|
|
910
|
+
return this.hasEncodedScopeInfo() ? this.#scopesInfo?.artificialFunctionRanges() ?? [] : [];
|
|
911
|
+
}
|
|
875
912
|
}
|
|
876
913
|
|
|
877
914
|
/** @returns a copy of the {@link entry} that is marked as a range mapping. */
|
|
@@ -215,6 +215,10 @@ export class SourceMapScopesInfo {
|
|
|
215
215
|
return noScopes && !this.#generatedRanges.length;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
hasGeneratedRanges(): boolean {
|
|
219
|
+
return this.#generatedRanges.length > 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
218
222
|
addOriginalScopesAtIndex(sourceIdx: number, scopes: ScopesCodec.OriginalScope[]): void {
|
|
219
223
|
if (!this.#originalScopes[sourceIdx]?.length) {
|
|
220
224
|
this.#originalScopes[sourceIdx] = scopes;
|
|
@@ -561,6 +565,91 @@ export class SourceMapScopesInfo {
|
|
|
561
565
|
|
|
562
566
|
return result;
|
|
563
567
|
}
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* @returns the body of the innermost inlined function at the position (the innermost range with a `callSite`
|
|
571
|
+
* within the generated function), or null if the position is not inside an inlined function.
|
|
572
|
+
*
|
|
573
|
+
* The innermost inlined function is the logical frame the position belongs to, i.e. the analogue of the top frame
|
|
574
|
+
* of a real call stack. Stepping over its body therefore goes up exactly one logical frame: into the caller, which
|
|
575
|
+
* may itself be inlined. An outer range would leave several logical frames at once.
|
|
576
|
+
*/
|
|
577
|
+
inlinedFunctionRange(generatedLine: number, generatedColumn: number): PositionRange|null {
|
|
578
|
+
const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
|
|
579
|
+
for (let i = rangeChain.length - 1; i >= 0 && !rangeChain[i].isStackFrame; --i) {
|
|
580
|
+
if (rangeChain[i].callSite) {
|
|
581
|
+
return {start: rangeChain[i].start, end: rangeChain[i].end};
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return null;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @returns the bodies of all functions that were inlined directly into the logical function at the position
|
|
589
|
+
* (the innermost inlined function, or else the generated function). Doesn't descend into inlined
|
|
590
|
+
* functions or nested generated functions.
|
|
591
|
+
*/
|
|
592
|
+
inlinedCalleeRanges(generatedLine: number, generatedColumn: number): PositionRange[] {
|
|
593
|
+
const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
|
|
594
|
+
let body: ScopesCodec.GeneratedRange|undefined;
|
|
595
|
+
for (let i = rangeChain.length - 1; i >= 0 && !body; --i) {
|
|
596
|
+
if (rangeChain[i].callSite || rangeChain[i].isStackFrame) {
|
|
597
|
+
body = rangeChain[i];
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
const result: PositionRange[] = [];
|
|
601
|
+
(function walk(range: ScopesCodec.GeneratedRange) {
|
|
602
|
+
for (const child of range.children) {
|
|
603
|
+
if (child.isStackFrame) {
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
if (child.callSite) {
|
|
607
|
+
result.push({start: child.start, end: child.end});
|
|
608
|
+
} else {
|
|
609
|
+
walk(child);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
})(body ?? {children: this.#generatedRanges} as ScopesCodec.GeneratedRange);
|
|
613
|
+
return result;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @returns true, iff any generated function is outlined, i.e. marked as "hidden" but with a definition (see
|
|
618
|
+
* {@link GeneratedFrameKind.OUTLINED}). Hidden functions without a definition are compiler helpers.
|
|
619
|
+
*/
|
|
620
|
+
hasOutlinedFunctions(): boolean {
|
|
621
|
+
const hasOutlined = (ranges: ScopesCodec.GeneratedRange[]): boolean =>
|
|
622
|
+
ranges.some(range => (range.isStackFrame && range.isHidden && range.originalScope !== undefined) ||
|
|
623
|
+
hasOutlined(range.children));
|
|
624
|
+
return hasOutlined(this.#generatedRanges);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* @returns the "artificial" generated functions (in the DWARF sense): functions that contain no authored code at all
|
|
629
|
+
* (no original scope anywhere in their subtree), e.g. compiler helpers. Sorted by start position,
|
|
630
|
+
* non-overlapping.
|
|
631
|
+
*/
|
|
632
|
+
artificialFunctionRanges(): PositionRange[] {
|
|
633
|
+
const hasOriginalScope = (range: ScopesCodec.GeneratedRange): boolean =>
|
|
634
|
+
range.originalScope !== undefined || range.children.some(hasOriginalScope);
|
|
635
|
+
const result: PositionRange[] = [];
|
|
636
|
+
(function walk(ranges: ScopesCodec.GeneratedRange[]) {
|
|
637
|
+
for (const range of ranges) {
|
|
638
|
+
if (range.isStackFrame && !hasOriginalScope(range)) {
|
|
639
|
+
result.push({start: range.start, end: range.end});
|
|
640
|
+
} else {
|
|
641
|
+
walk(range.children);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
})(this.#generatedRanges);
|
|
645
|
+
return result;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/** A range of generated positions, relative to the start of the script. `end` is exclusive. */
|
|
650
|
+
export interface PositionRange {
|
|
651
|
+
readonly start: ScopesCodec.Position;
|
|
652
|
+
readonly end: ScopesCodec.Position;
|
|
564
653
|
}
|
|
565
654
|
|
|
566
655
|
/**
|
|
@@ -9,7 +9,7 @@ import {SearchMatch} from './ContentProvider.js';
|
|
|
9
9
|
import type {Text} from './Text.js';
|
|
10
10
|
|
|
11
11
|
const KEY_VALUE_FILTER_REGEXP = /(?:^|\s)(\-)?([\w\-]+):([^\s]+)/;
|
|
12
|
-
const REGEXP_FILTER_REGEXP = /(?:^|\s)(\-)?\/([^\/\\]+
|
|
12
|
+
const REGEXP_FILTER_REGEXP = /(?:^|\s)(\-)?\/((?:[^\/\\]|\\.)+)\//;
|
|
13
13
|
const TEXT_FILTER_REGEXP = /(?:^|\s)(\-)?([^\s]+)/;
|
|
14
14
|
const SPACE_CHAR_REGEXP = /\s/;
|
|
15
15
|
|
|
@@ -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
|
import '../shell/shell.js';
|
|
5
|
+
import '../../panels/comments/comments-meta.js';
|
|
5
6
|
import '../../panels/css_overview/css_overview-meta.js';
|
|
6
7
|
import '../../panels/elements/elements-meta.js';
|
|
7
8
|
import '../../panels/browser_debugger/browser_debugger-meta.js';
|
|
@@ -223,8 +223,6 @@ export class MainImpl {
|
|
|
223
223
|
this.#universe.settings.resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor).setRequiresUserAction(true);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
Root.Runtime.experiments.removeAllExperimentsFromLocalStorage();
|
|
227
|
-
|
|
228
226
|
await this.requestAndRegisterLocaleData();
|
|
229
227
|
|
|
230
228
|
Host.userMetrics.syncSetting(
|
|
@@ -352,23 +350,10 @@ export class MainImpl {
|
|
|
352
350
|
return {syncedStorage, globalStorage, localStorage};
|
|
353
351
|
}
|
|
354
352
|
|
|
355
|
-
// TODO(crbug.com/464173054) remove after M156
|
|
356
|
-
#migrateValueFromLegacyExperiment(legacyExperimentName: Root.ExperimentNames.ExperimentName,
|
|
357
|
-
experiment: Root.Runtime.Experiment): void {
|
|
358
|
-
const value = Root.Runtime.experiments.getValueFromStorage(legacyExperimentName);
|
|
359
|
-
if (value !== undefined && experiment.aboutFlag) {
|
|
360
|
-
// Set the experiment to the same value as the legacy experiment.
|
|
361
|
-
experiment.setEnabled(value);
|
|
362
|
-
// Set the chrome flag to the same value as the legacy experiment.
|
|
363
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setChromeFlag(experiment.aboutFlag, value);
|
|
364
|
-
// The legacy experiment will be cleaned up by `removeAllExperimentsFromLocalStorage`.
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
353
|
#initializeExperiments(): void {
|
|
369
354
|
const enableProtocolMonitor = (Root.Runtime.hostConfig.devToolsProtocolMonitor?.enabled ?? false) ||
|
|
370
355
|
Boolean(Root.Runtime.Runtime.queryParam('isChromeForTesting'));
|
|
371
|
-
|
|
356
|
+
Root.Runtime.experiments.register({
|
|
372
357
|
name: Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR,
|
|
373
358
|
title: 'Protocol Monitor',
|
|
374
359
|
aboutFlag: 'devtools-protocol-monitor',
|
|
@@ -377,19 +362,15 @@ export class MainImpl {
|
|
|
377
362
|
docLink: 'https://developer.chrome.com/blog/new-in-devtools-92/#protocol-monitor' as
|
|
378
363
|
Platform.DevToolsPath.UrlString,
|
|
379
364
|
});
|
|
380
|
-
this.#migrateValueFromLegacyExperiment(Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR,
|
|
381
|
-
protocolMonitorExperiment);
|
|
382
365
|
|
|
383
366
|
// Debugging
|
|
384
|
-
|
|
367
|
+
Root.Runtime.experiments.register({
|
|
385
368
|
name: Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
386
369
|
title: 'Instrumentation breakpoints',
|
|
387
370
|
aboutFlag: 'devtools-instrumentation-breakpoints',
|
|
388
371
|
isEnabled: Root.Runtime.hostConfig.devToolsInstrumentationBreakpoints?.enabled ?? false,
|
|
389
372
|
requiresChromeRestart: false,
|
|
390
373
|
});
|
|
391
|
-
this.#migrateValueFromLegacyExperiment(Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS,
|
|
392
|
-
instrumentationBreakpointsExperiment);
|
|
393
374
|
|
|
394
375
|
Root.Runtime.experiments.register({
|
|
395
376
|
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
@@ -257,6 +257,7 @@ inspectorBackend.registerCommand("CSS.disable", [], [], "Disables the CSS agent
|
|
|
257
257
|
inspectorBackend.registerCommand("CSS.enable", [], [], "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.");
|
|
258
258
|
inspectorBackend.registerCommand("CSS.forcePseudoState", [{"name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to force the pseudo state.", "typeRef": "DOM.NodeId"}, {"name": "forcedPseudoClasses", "type": "array", "optional": false, "description": "Element pseudo classes to force when computing the element's style.", "typeRef": "string"}], [], "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.");
|
|
259
259
|
inspectorBackend.registerCommand("CSS.forceStartingStyle", [{"name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to force the starting-style state.", "typeRef": "DOM.NodeId"}, {"name": "forced", "type": "boolean", "optional": false, "description": "Boolean indicating if this is on or off.", "typeRef": null}], [], "Ensures that the given node is in its starting-style state.");
|
|
260
|
+
inspectorBackend.registerCommand("CSS.forcePositionTryOption", [{"name": "nodeId", "type": "number", "optional": false, "description": "The element id for which to force the position-try option.", "typeRef": "DOM.NodeId"}, {"name": "index", "type": "number", "optional": true, "description": "The 1-based index of the position-try fallback option, 0 for base position (no fallback), or omitted to clear the forced state.", "typeRef": null}], [], "Forces a position-try option for the given node.");
|
|
260
261
|
inspectorBackend.registerCommand("CSS.getBackgroundColors", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the node to get background colors for.", "typeRef": "DOM.NodeId"}], ["backgroundColors", "computedFontSize", "computedFontWeight"], "");
|
|
261
262
|
inspectorBackend.registerCommand("CSS.getComputedStyleForNode", [{"name": "nodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.NodeId"}], ["computedStyle", "extraFields"], "Returns the computed style for a DOM node identified by `nodeId`.");
|
|
262
263
|
inspectorBackend.registerCommand("CSS.resolveValues", [{"name": "values", "type": "array", "optional": false, "description": "Cascade-dependent keywords (revert/revert-layer) do not work.", "typeRef": "string"}, {"name": "nodeId", "type": "number", "optional": false, "description": "Id of the node in whose context the expression is evaluated", "typeRef": "DOM.NodeId"}, {"name": "propertyName", "type": "string", "optional": true, "description": "Only longhands and custom property names are accepted.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element custom ident.", "typeRef": null}], ["results"], "Resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'. If the `propertyName` was specified the `values` are resolved as if they were property's declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null `propertyName` was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.`");
|
|
@@ -1520,6 +1521,7 @@ inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "name", "type": "s
|
|
|
1520
1521
|
|
|
1521
1522
|
// Debugger.
|
|
1522
1523
|
inspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack"});
|
|
1524
|
+
inspectorBackend.registerEnum("Debugger.ScopeEmptyReason", {NoVariables: "no-variables", AllUnavailable: "all-unavailable"});
|
|
1523
1525
|
inspectorBackend.registerEnum("Debugger.BreakLocationType", {DebuggerStatement: "debuggerStatement", Call: "call", Return: "return"});
|
|
1524
1526
|
inspectorBackend.registerEnum("Debugger.ScriptLanguage", {JavaScript: "JavaScript", WebAssembly: "WebAssembly"});
|
|
1525
1527
|
inspectorBackend.registerEnum("Debugger.DebugSymbolsType", {SourceMap: "SourceMap", EmbeddedDWARF: "EmbeddedDWARF", ExternalDWARF: "ExternalDWARF"});
|
|
@@ -1570,7 +1572,7 @@ inspectorBackend.registerType("Debugger.Location", [{"name": "scriptId", "type":
|
|
|
1570
1572
|
inspectorBackend.registerType("Debugger.ScriptPosition", [{"name": "lineNumber", "type": "number", "optional": false, "description": "", "typeRef": null}, {"name": "columnNumber", "type": "number", "optional": false, "description": "", "typeRef": null}]);
|
|
1571
1573
|
inspectorBackend.registerType("Debugger.LocationRange", [{"name": "scriptId", "type": "string", "optional": false, "description": "", "typeRef": "Runtime.ScriptId"}, {"name": "start", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition"}, {"name": "end", "type": "object", "optional": false, "description": "", "typeRef": "Debugger.ScriptPosition"}]);
|
|
1572
1574
|
inspectorBackend.registerType("Debugger.CallFrame", [{"name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier. This identifier is only valid while the virtual machine is paused.", "typeRef": "Debugger.CallFrameId"}, {"name": "functionName", "type": "string", "optional": false, "description": "Name of the JavaScript function called on this call frame.", "typeRef": null}, {"name": "functionLocation", "type": "object", "optional": true, "description": "Location in the source code.", "typeRef": "Debugger.Location"}, {"name": "location", "type": "object", "optional": false, "description": "Location in the source code.", "typeRef": "Debugger.Location"}, {"name": "url", "type": "string", "optional": false, "description": "JavaScript script name or url. Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously sent `Debugger.scriptParsed` event.", "typeRef": null}, {"name": "scopeChain", "type": "array", "optional": false, "description": "Scope chain for this call frame.", "typeRef": "Debugger.Scope"}, {"name": "this", "type": "object", "optional": false, "description": "`this` object for this call frame.", "typeRef": "Runtime.RemoteObject"}, {"name": "returnValue", "type": "object", "optional": true, "description": "The value being returned, if the function is at return point.", "typeRef": "Runtime.RemoteObject"}, {"name": "canBeRestarted", "type": "boolean", "optional": true, "description": "Valid only while the VM is paused and indicates whether this frame can be restarted or not. Note that a `true` value here does not guarantee that Debugger#restartFrame with this CallFrameId will be successful, but it is very likely.", "typeRef": null}]);
|
|
1573
|
-
inspectorBackend.registerType("Debugger.Scope", [{"name": "type", "type": "string", "optional": false, "description": "Scope type.", "typeRef": null}, {"name": "object", "type": "object", "optional": false, "description": "Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.", "typeRef": "Runtime.RemoteObject"}, {"name": "name", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "startLocation", "type": "object", "optional": true, "description": "Location in the source code where scope starts", "typeRef": "Debugger.Location"}, {"name": "endLocation", "type": "object", "optional": true, "description": "Location in the source code where scope ends", "typeRef": "Debugger.Location"}, {"name": "
|
|
1575
|
+
inspectorBackend.registerType("Debugger.Scope", [{"name": "type", "type": "string", "optional": false, "description": "Scope type.", "typeRef": null}, {"name": "object", "type": "object", "optional": false, "description": "Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.", "typeRef": "Runtime.RemoteObject"}, {"name": "name", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "startLocation", "type": "object", "optional": true, "description": "Location in the source code where scope starts", "typeRef": "Debugger.Location"}, {"name": "endLocation", "type": "object", "optional": true, "description": "Location in the source code where scope ends", "typeRef": "Debugger.Location"}, {"name": "emptyReason", "type": "string", "optional": true, "description": "Present if the scope has no variable values to show. Absent means that the scope declares at least one variable with an available value. Empty scopes are retained in the scope chain because they can be targeted via `evaluateOnCallFrame` (using `scopeNumber`) or matched against scopes in source maps.", "typeRef": null}]);
|
|
1574
1576
|
inspectorBackend.registerType("Debugger.SearchMatch", [{"name": "lineNumber", "type": "number", "optional": false, "description": "Line number in resource content.", "typeRef": null}, {"name": "lineContent", "type": "string", "optional": false, "description": "Line with match content.", "typeRef": null}]);
|
|
1575
1577
|
inspectorBackend.registerType("Debugger.BreakLocation", [{"name": "scriptId", "type": "string", "optional": false, "description": "Script identifier as reported in the `Debugger.scriptParsed`.", "typeRef": "Runtime.ScriptId"}, {"name": "lineNumber", "type": "number", "optional": false, "description": "Line number in the script (0-based).", "typeRef": null}, {"name": "columnNumber", "type": "number", "optional": true, "description": "Column number in the script (0-based).", "typeRef": null}, {"name": "type", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
1576
1578
|
inspectorBackend.registerType("Debugger.WasmDisassemblyChunk", [{"name": "lines", "type": "array", "optional": false, "description": "The next chunk of disassembled lines.", "typeRef": "string"}, {"name": "bytecodeOffsets", "type": "array", "optional": false, "description": "The bytecode offsets describing the start of each line.", "typeRef": "integer"}]);
|
|
@@ -4313,7 +4313,7 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4313
4313
|
"overlay"
|
|
4314
4314
|
],
|
|
4315
4315
|
"name": "overscroll-container-type",
|
|
4316
|
-
"runtime_flag": "
|
|
4316
|
+
"runtime_flag": "OverscrollAreas",
|
|
4317
4317
|
"runtime_flag_status": "experimental"
|
|
4318
4318
|
},
|
|
4319
4319
|
{
|
|
@@ -1567,6 +1567,13 @@ export namespace ProtocolMapping {
|
|
|
1567
1567
|
paramsType: [Protocol.CSS.ForceStartingStyleRequest];
|
|
1568
1568
|
returnType: void;
|
|
1569
1569
|
};
|
|
1570
|
+
/**
|
|
1571
|
+
* Forces a position-try option for the given node.
|
|
1572
|
+
*/
|
|
1573
|
+
'CSS.forcePositionTryOption': {
|
|
1574
|
+
paramsType: [Protocol.CSS.ForcePositionTryOptionRequest];
|
|
1575
|
+
returnType: void;
|
|
1576
|
+
};
|
|
1570
1577
|
'CSS.getBackgroundColors': {
|
|
1571
1578
|
paramsType: [Protocol.CSS.GetBackgroundColorsRequest];
|
|
1572
1579
|
returnType: Protocol.CSS.GetBackgroundColorsResponse;
|
|
@@ -796,6 +796,11 @@ declare namespace ProtocolProxyApi {
|
|
|
796
796
|
*/
|
|
797
797
|
invoke_forceStartingStyle(params: Protocol.CSS.ForceStartingStyleRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
798
798
|
|
|
799
|
+
/**
|
|
800
|
+
* Forces a position-try option for the given node.
|
|
801
|
+
*/
|
|
802
|
+
invoke_forcePositionTryOption(params: Protocol.CSS.ForcePositionTryOptionRequest): Promise<Protocol.ProtocolResponseWithError>;
|
|
803
|
+
|
|
799
804
|
invoke_getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>;
|
|
800
805
|
|
|
801
806
|
/**
|
|
@@ -4066,6 +4066,18 @@ export namespace CSS {
|
|
|
4066
4066
|
forced: boolean;
|
|
4067
4067
|
}
|
|
4068
4068
|
|
|
4069
|
+
export interface ForcePositionTryOptionRequest {
|
|
4070
|
+
/**
|
|
4071
|
+
* The element id for which to force the position-try option.
|
|
4072
|
+
*/
|
|
4073
|
+
nodeId: DOM.NodeId;
|
|
4074
|
+
/**
|
|
4075
|
+
* The 1-based index of the position-try fallback option, 0 for base position (no fallback),
|
|
4076
|
+
* or omitted to clear the forced state.
|
|
4077
|
+
*/
|
|
4078
|
+
index?: integer;
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4069
4081
|
export interface GetBackgroundColorsRequest {
|
|
4070
4082
|
/**
|
|
4071
4083
|
* Id of the node to get background colors for.
|
|
@@ -20731,6 +20743,11 @@ export namespace Debugger {
|
|
|
20731
20743
|
WasmExpressionStack = 'wasm-expression-stack',
|
|
20732
20744
|
}
|
|
20733
20745
|
|
|
20746
|
+
export const enum ScopeEmptyReason {
|
|
20747
|
+
NoVariables = 'no-variables',
|
|
20748
|
+
AllUnavailable = 'all-unavailable',
|
|
20749
|
+
}
|
|
20750
|
+
|
|
20734
20751
|
/**
|
|
20735
20752
|
* Scope description.
|
|
20736
20753
|
*/
|
|
@@ -20755,13 +20772,13 @@ export namespace Debugger {
|
|
|
20755
20772
|
*/
|
|
20756
20773
|
endLocation?: Location;
|
|
20757
20774
|
/**
|
|
20758
|
-
*
|
|
20759
|
-
*
|
|
20775
|
+
* Present if the scope has no variable values to show. Absent means that
|
|
20776
|
+
* the scope declares at least one variable with an available value.
|
|
20760
20777
|
* Empty scopes are retained in the scope chain because
|
|
20761
20778
|
* they can be targeted via `evaluateOnCallFrame` (using `scopeNumber`) or
|
|
20762
20779
|
* matched against scopes in source maps.
|
|
20763
20780
|
*/
|
|
20764
|
-
|
|
20781
|
+
emptyReason?: ScopeEmptyReason;
|
|
20765
20782
|
}
|
|
20766
20783
|
|
|
20767
20784
|
/**
|