chrome-devtools-frontend 1.0.1736236 → 1.0.1738725
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/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +1 -1
- package/.agents/skills/version-control/SKILL.md +63 -11
- package/docs/devtools-protocol.md +3 -1
- package/eslint.config.mjs +0 -6
- package/front_end/core/host/AidaClient.ts +14 -36
- package/front_end/core/host/AidaGcaTranslation.ts +8 -5
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/design_system_tokens.css +1 -0
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -9
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/generated/SupportedCSSProperties.ts +8 -23
- package/front_end/models/ai-utils/AiUtils.ts +1 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -18
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -2
- package/front_end/models/ai_assistance/tools/ListSources.ts +3 -1
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +0 -6
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -5
- package/front_end/models/trace/EventsSerializer.ts +0 -8
- package/front_end/models/workspace/UISourceCode.ts +30 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -7
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +15 -34
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -16
- package/front_end/panels/ai_assistance/components/chatView.css +0 -32
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/animationTimeline.css +5 -3
- package/front_end/panels/application/PrivateVerificationTokensView.ts +114 -26
- package/front_end/panels/application/ResourcesPanel.ts +1 -0
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/permissionsPolicySection.css +0 -4
- package/front_end/panels/application/frameDetailsReportView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +3 -3
- package/front_end/panels/application/privateVerificationTokensView.css +6 -0
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/comments/CommentsPane.ts +1 -1
- package/front_end/panels/comments/commentsPane.css +1 -1
- package/front_end/panels/common/common.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consoleView.css +5 -4
- package/front_end/panels/elements/DOMTreeWidget.ts +47 -5
- package/front_end/panels/elements/layoutPane.css +0 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -0
- package/front_end/panels/emulation/deviceModeView.css +0 -1
- package/front_end/panels/issues/issuesTree.css +2 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +34 -17
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +39 -17
- package/front_end/panels/layer_viewer/Layers3DView.ts +34 -13
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/layer_viewer/layers3DView.css +0 -4
- package/front_end/panels/media/playerListView.css +0 -18
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +22 -10
- package/front_end/panels/network/RequestPreviewView.ts +182 -63
- package/front_end/panels/network/SignedExchangeInfoView.ts +242 -158
- package/front_end/panels/network/networkConfigView.css +1 -1
- package/front_end/panels/network/networkLogView.css +2 -1
- package/front_end/panels/network/networkPanel.css +0 -5
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/signedExchangeInfoView.css +12 -8
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -2
- package/front_end/panels/profiler/IsolateSelector.ts +31 -10
- package/front_end/panels/profiler/profilesPanel.css +0 -8
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/screencast/screencastView.css +2 -2
- package/front_end/panels/security/SecurityPanel.ts +474 -418
- package/front_end/panels/security/SecurityPanelSidebar.ts +68 -48
- package/front_end/panels/security/lockIcon.css +52 -50
- package/front_end/panels/security/mainView.css +149 -145
- package/front_end/panels/security/originView.css +117 -115
- package/front_end/panels/sensors/LocationsSettingsTab.ts +2 -50
- package/front_end/panels/sensors/locationsSettingsTab.css +1 -21
- package/front_end/panels/settings/AISettingsTab.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +31 -6
- package/front_end/panels/sources/NavigatorView.ts +105 -31
- package/front_end/panels/sources/breakpointsView.css +2 -1
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -0
- package/front_end/panels/timeline/TimelineLayersView.ts +108 -46
- package/front_end/panels/timeline/TimelinePanel.ts +4 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/networkRequestDetails.css +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +0 -7
- package/front_end/panels/web_audio/webAudio.css +1 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +6 -6
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +45 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +45 -12
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -6
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +0 -44
- package/front_end/ui/components/icon_button/iconButton.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +7 -5
- package/front_end/ui/legacy/InspectorDrawerView.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +5 -1
- package/front_end/ui/legacy/PopoverHelper.ts +1 -0
- package/front_end/ui/legacy/RootView.ts +9 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -0
- package/front_end/ui/legacy/Treeoutline.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +130 -137
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +7 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -0
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +2 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -10
- package/front_end/ui/legacy/filter.css +1 -1
- package/front_end/ui/legacy/infobar.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +2 -2
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +3 -3
- package/front_end/ui/legacy/listWidget.css +2 -7
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -1
- package/front_end/ui/legacy/treeoutline.css +3 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +133 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/package.json +1 -1
- package/front_end/Images/geminiInDevTools.png +0 -0
- package/front_end/Images/geminiInDevTools_2x.png +0 -0
- package/front_end/generated/InspectorBackendCommands.ts +0 -1690
- package/front_end/generated/protocol-mapping.d.ts +0 -5986
- package/front_end/generated/protocol-proxy-api.d.ts +0 -5452
- package/front_end/generated/protocol.ts +0 -23364
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +0 -193
- package/front_end/panels/common/geminiRebrandPromoDialog.css +0 -47
|
@@ -625,7 +625,7 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
625
625
|
if (order1 < order2) {
|
|
626
626
|
return -1;
|
|
627
627
|
}
|
|
628
|
-
return
|
|
628
|
+
return Platform.StringUtilities.naturalOrderComparator(node1.mergedTitle(), node2.mergedTitle());
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
static appendSearchItem(contextMenu: UI.ContextMenu.ContextMenu, path: string): void {
|
|
@@ -641,9 +641,10 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
641
641
|
const node1 = this.nodeForTreeElement(treeElement1);
|
|
642
642
|
const node2 = this.nodeForTreeElement(treeElement2);
|
|
643
643
|
if (node1 && node2) {
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
|
|
644
|
+
const order1 = NavigatorView.nodeOrder(node1);
|
|
645
|
+
const order2 = NavigatorView.nodeOrder(node2);
|
|
646
|
+
if (order1 !== order2) {
|
|
647
|
+
return order1 > order2 ? 1 : -1;
|
|
647
648
|
}
|
|
648
649
|
}
|
|
649
650
|
return Platform.StringUtilities.naturalOrderComparator(treeElement1.titleAsText(), treeElement2.titleAsText());
|
|
@@ -1411,10 +1412,9 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1411
1412
|
return this.#renamingNode !== null;
|
|
1412
1413
|
}
|
|
1413
1414
|
|
|
1414
|
-
handleFileContextMenu(
|
|
1415
|
+
handleFileContextMenu(contextMenu: UI.ContextMenu.ContextMenu, node: NavigatorUISourceCodeTreeNode): void {
|
|
1415
1416
|
const uiSourceCode = node.uiSourceCode();
|
|
1416
1417
|
if (Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode)) {
|
|
1417
|
-
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1418
1418
|
contextMenu.headerSection().appendItem(i18nString(UIStrings.run),
|
|
1419
1419
|
() => Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode),
|
|
1420
1420
|
{jslogContext: 'run'});
|
|
@@ -1429,7 +1429,6 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1429
1429
|
return;
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
1432
|
-
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1433
1432
|
contextMenu.appendApplicableItems(uiSourceCode);
|
|
1434
1433
|
|
|
1435
1434
|
const project = uiSourceCode.project();
|
|
@@ -1526,12 +1525,13 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1526
1525
|
}
|
|
1527
1526
|
}
|
|
1528
1527
|
|
|
1529
|
-
handleFolderContextMenu(
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
const
|
|
1528
|
+
handleFolderContextMenu(contextMenu: UI.ContextMenu.ContextMenu,
|
|
1529
|
+
node: NavigatorFolderTreeNode|NavigatorGroupTreeNode): void {
|
|
1530
|
+
const activeNode = node instanceof NavigatorFolderTreeNode ? node.mergedLeafNode() : node;
|
|
1531
|
+
const path = activeNode instanceof NavigatorFolderTreeNode ? activeNode.folderPath :
|
|
1532
|
+
Platform.DevToolsPath.EmptyEncodedPathString;
|
|
1533
|
+
const project = activeNode.project || null;
|
|
1533
1534
|
|
|
1534
|
-
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
1535
1535
|
if (project?.type() !== Workspace.Workspace.projectTypes.ConnectableFileSystem) {
|
|
1536
1536
|
NavigatorView.appendSearchItem(contextMenu, path);
|
|
1537
1537
|
}
|
|
@@ -1553,12 +1553,12 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1553
1553
|
this.handleContextMenuCreate(project, path, undefined);
|
|
1554
1554
|
}, {jslogContext: 'new-file'});
|
|
1555
1555
|
}
|
|
1556
|
-
} else if (
|
|
1557
|
-
const url = Common.ParsedURL.ParsedURL.concatenate(
|
|
1556
|
+
} else if (activeNode instanceof NavigatorFolderTreeNode && activeNode.origin && activeNode.folderPath) {
|
|
1557
|
+
const url = Common.ParsedURL.ParsedURL.concatenate(activeNode.origin, '/', activeNode.folderPath);
|
|
1558
1558
|
const options = {
|
|
1559
|
-
isContentScript:
|
|
1560
|
-
isKnownThirdParty:
|
|
1561
|
-
isCurrentlyIgnoreListed:
|
|
1559
|
+
isContentScript: activeNode.recursiveProperties.exclusivelyContentScripts || false,
|
|
1560
|
+
isKnownThirdParty: activeNode.recursiveProperties.exclusivelyThirdParty || false,
|
|
1561
|
+
isCurrentlyIgnoreListed: activeNode.recursiveProperties.exclusivelyIgnored || false,
|
|
1562
1562
|
};
|
|
1563
1563
|
for (const {text, callback, jslogContext} of Workspace.IgnoreListManager.IgnoreListManager.instance()
|
|
1564
1564
|
.getIgnoreListFolderContextMenuItems(url, options)) {
|
|
@@ -1586,10 +1586,9 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1586
1586
|
if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
|
|
1587
1587
|
if (Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.fileSystemType(project) !==
|
|
1588
1588
|
Persistence.PlatformFileSystem.PlatformFileSystemType.OVERRIDES) {
|
|
1589
|
-
if (
|
|
1589
|
+
if (activeNode instanceof NavigatorGroupTreeNode) {
|
|
1590
1590
|
contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeFolderFromWorkspace), async () => {
|
|
1591
|
-
const header =
|
|
1592
|
-
i18nString(UIStrings.areYouSureYouWantToRemoveThis, {PH1: (node as NavigatorGroupTreeNode).title});
|
|
1591
|
+
const header = i18nString(UIStrings.areYouSureYouWantToRemoveThis, {PH1: activeNode.title});
|
|
1593
1592
|
const shouldRemove =
|
|
1594
1593
|
await UI.UIUtils.ConfirmDialog.show(i18nString(UIStrings.workspaceStopSyncing), header, undefined, {
|
|
1595
1594
|
okButtonLabel: i18nString(UIStrings.remove),
|
|
@@ -1600,9 +1599,9 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1600
1599
|
}
|
|
1601
1600
|
}, {jslogContext: 'remove-folder-from-workspace'});
|
|
1602
1601
|
}
|
|
1603
|
-
} else if (!(
|
|
1602
|
+
} else if (!(activeNode instanceof NavigatorGroupTreeNode)) {
|
|
1604
1603
|
contextMenu.defaultSection().appendItem(
|
|
1605
|
-
i18nString(UIStrings.delete), this.handleDeleteFolder.bind(this,
|
|
1604
|
+
i18nString(UIStrings.delete), this.handleDeleteFolder.bind(this, activeNode), {jslogContext: 'delete'});
|
|
1606
1605
|
}
|
|
1607
1606
|
}
|
|
1608
1607
|
|
|
@@ -1677,6 +1676,17 @@ export class NavigatorView extends NavigatorViewBase implements SDK.TargetManage
|
|
|
1677
1676
|
this.#workspace.uiSourceCodes().forEach(this.addUISourceCode.bind(this));
|
|
1678
1677
|
}
|
|
1679
1678
|
|
|
1679
|
+
deselectIfDescendant(node: NavigatorTreeNode): void {
|
|
1680
|
+
let current = this.selectedNode;
|
|
1681
|
+
while (current) {
|
|
1682
|
+
if (current === node) {
|
|
1683
|
+
this.selectedNode = null;
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
current = current.parent;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1680
1690
|
private discardFrame(frame: SDK.ResourceTreeModel.ResourceTreeFrame, isAuthored: boolean): void {
|
|
1681
1691
|
if (isAuthored) {
|
|
1682
1692
|
return;
|
|
@@ -1737,6 +1747,7 @@ export class NavigatorTreeNode {
|
|
|
1737
1747
|
|
|
1738
1748
|
#children: NavigatorTreeNode[] = [];
|
|
1739
1749
|
readonly #childById = new Map<string, NavigatorTreeNode>();
|
|
1750
|
+
#disposed = false;
|
|
1740
1751
|
|
|
1741
1752
|
constructor(navigatorView: NavigatorView, id: string, type: string, tooltip?: string) {
|
|
1742
1753
|
this.id = id;
|
|
@@ -1754,6 +1765,18 @@ export class NavigatorTreeNode {
|
|
|
1754
1765
|
};
|
|
1755
1766
|
}
|
|
1756
1767
|
|
|
1768
|
+
mergedTitle(): string {
|
|
1769
|
+
return this.title;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
effectiveChildren(): NavigatorTreeNode[] {
|
|
1773
|
+
return this.#children.filter(node => !node.isMerged);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
isDisposed(): boolean {
|
|
1777
|
+
return this.#disposed;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1757
1780
|
computedTooltip(): string {
|
|
1758
1781
|
if (this.tooltip) {
|
|
1759
1782
|
return this.tooltip;
|
|
@@ -1804,7 +1827,7 @@ export class NavigatorTreeNode {
|
|
|
1804
1827
|
return;
|
|
1805
1828
|
}
|
|
1806
1829
|
this.navigatorView.selectNode(activeNode);
|
|
1807
|
-
this.navigatorView.handleFolderContextMenu(event, activeNode);
|
|
1830
|
+
this.navigatorView.handleFolderContextMenu(new UI.ContextMenu.ContextMenu(event), activeNode);
|
|
1808
1831
|
}, false);
|
|
1809
1832
|
treeElement.listItemElement.addEventListener('mousemove', (_event: Event) => {
|
|
1810
1833
|
const activeNode = this.navigatorView.nodeForTreeElement(treeElement);
|
|
@@ -1830,6 +1853,7 @@ export class NavigatorTreeNode {
|
|
|
1830
1853
|
}
|
|
1831
1854
|
|
|
1832
1855
|
dispose(): void {
|
|
1856
|
+
this.#disposed = true;
|
|
1833
1857
|
}
|
|
1834
1858
|
|
|
1835
1859
|
updateTitle(): void {
|
|
@@ -1911,13 +1935,24 @@ export class NavigatorTreeNode {
|
|
|
1911
1935
|
}
|
|
1912
1936
|
|
|
1913
1937
|
appendChild(node: NavigatorTreeNode): void {
|
|
1914
|
-
this.#children.
|
|
1938
|
+
Platform.ArrayUtilities.insertWithComparator(this.#children, node, NavigatorView.compareNodes);
|
|
1915
1939
|
this.#childById.set(node.id, node);
|
|
1916
1940
|
node.parent = this;
|
|
1917
1941
|
this.didAddChild(node);
|
|
1918
1942
|
}
|
|
1919
1943
|
|
|
1944
|
+
resortChild(node: NavigatorTreeNode): void {
|
|
1945
|
+
const idx = this.#children.indexOf(node);
|
|
1946
|
+
if (idx < 0) {
|
|
1947
|
+
return;
|
|
1948
|
+
}
|
|
1949
|
+
this.#children.splice(idx, 1);
|
|
1950
|
+
Platform.ArrayUtilities.insertWithComparator(this.#children, node, NavigatorView.compareNodes);
|
|
1951
|
+
this.navigatorView.requestUpdate();
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1920
1954
|
removeChild(node: NavigatorTreeNode): void {
|
|
1955
|
+
this.navigatorView.deselectIfDescendant(node);
|
|
1921
1956
|
this.willRemoveChild(node);
|
|
1922
1957
|
const idx = this.#children.findIndex(n => n.id === node.id);
|
|
1923
1958
|
if (idx >= 0) {
|
|
@@ -1961,7 +1996,6 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
1961
1996
|
treeElement: UI.TreeOutline.TreeElement|null;
|
|
1962
1997
|
isEditing = false;
|
|
1963
1998
|
#renameCallback?: ((committed: boolean) => void);
|
|
1964
|
-
#disposed = false;
|
|
1965
1999
|
private eventListeners: Common.EventTarget.EventDescriptor[];
|
|
1966
2000
|
readonly #frame: SDK.ResourceTreeModel.ResourceTreeFrame|null;
|
|
1967
2001
|
constructor(
|
|
@@ -2070,7 +2104,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2070
2104
|
}, false);
|
|
2071
2105
|
treeElement.listItemElement.addEventListener('contextmenu', (event: Event) => {
|
|
2072
2106
|
this.navigatorView.selectNode(this);
|
|
2073
|
-
this.navigatorView.handleFileContextMenu(event, this);
|
|
2107
|
+
this.navigatorView.handleFileContextMenu(new UI.ContextMenu.ContextMenu(event), this);
|
|
2074
2108
|
}, false);
|
|
2075
2109
|
treeElement.listItemElement.addEventListener('dragstart', (event: DragEvent) => {
|
|
2076
2110
|
this.navigatorView.fileDragStarted(this, event);
|
|
@@ -2153,7 +2187,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2153
2187
|
if (callback) {
|
|
2154
2188
|
callback(false);
|
|
2155
2189
|
}
|
|
2156
|
-
|
|
2190
|
+
super.dispose();
|
|
2157
2191
|
}
|
|
2158
2192
|
|
|
2159
2193
|
reveal(select?: boolean): void {
|
|
@@ -2170,7 +2204,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2170
2204
|
}
|
|
2171
2205
|
|
|
2172
2206
|
rename(callback?: ((committed: boolean) => void)): void {
|
|
2173
|
-
if (this
|
|
2207
|
+
if (this.isDisposed() || !this.treeElement) {
|
|
2174
2208
|
return;
|
|
2175
2209
|
}
|
|
2176
2210
|
|
|
@@ -2187,7 +2221,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2187
2221
|
}
|
|
2188
2222
|
|
|
2189
2223
|
#handlePromptCommit(newTitle: string): void {
|
|
2190
|
-
if (this
|
|
2224
|
+
if (this.isDisposed() || !this.treeElement?.treeOutline) {
|
|
2191
2225
|
return;
|
|
2192
2226
|
}
|
|
2193
2227
|
const oldTitle = this.title;
|
|
@@ -2205,7 +2239,7 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2205
2239
|
}
|
|
2206
2240
|
|
|
2207
2241
|
#handleRenameCallback(success: boolean): void {
|
|
2208
|
-
if (this
|
|
2242
|
+
if (this.isDisposed()) {
|
|
2209
2243
|
return;
|
|
2210
2244
|
}
|
|
2211
2245
|
if (!success) {
|
|
@@ -2223,11 +2257,12 @@ export class NavigatorUISourceCodeTreeNode extends NavigatorTreeNode {
|
|
|
2223
2257
|
this.navigatorView.selectNode(this);
|
|
2224
2258
|
}
|
|
2225
2259
|
}
|
|
2260
|
+
this.parent?.resortChild(this);
|
|
2226
2261
|
this.#afterEditing(true);
|
|
2227
2262
|
}
|
|
2228
2263
|
|
|
2229
2264
|
#handlePromptCancel(): void {
|
|
2230
|
-
if (this
|
|
2265
|
+
if (this.isDisposed()) {
|
|
2231
2266
|
return;
|
|
2232
2267
|
}
|
|
2233
2268
|
this.#afterEditing(false);
|
|
@@ -2261,6 +2296,45 @@ export class NavigatorFolderTreeNode extends NavigatorTreeNode {
|
|
|
2261
2296
|
this.origin = origin;
|
|
2262
2297
|
}
|
|
2263
2298
|
|
|
2299
|
+
override mergedTitle(): string {
|
|
2300
|
+
const titles: string[] = [this.title];
|
|
2301
|
+
let child: NavigatorTreeNode|undefined = this.children()[0];
|
|
2302
|
+
while (child instanceof NavigatorFolderTreeNode && child.isMerged) {
|
|
2303
|
+
titles.push(child.title);
|
|
2304
|
+
child = child.children()[0];
|
|
2305
|
+
}
|
|
2306
|
+
return titles.join('/');
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
mergedLeafNode(): NavigatorFolderTreeNode {
|
|
2310
|
+
let current: NavigatorFolderTreeNode = this;
|
|
2311
|
+
let child = current.children()[0];
|
|
2312
|
+
while (child instanceof NavigatorFolderTreeNode && child.isMerged) {
|
|
2313
|
+
current = child;
|
|
2314
|
+
child = current.children()[0];
|
|
2315
|
+
}
|
|
2316
|
+
return current;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
override effectiveChildren(): NavigatorTreeNode[] {
|
|
2320
|
+
const leaf = this.mergedLeafNode();
|
|
2321
|
+
if (!leaf.isPopulated()) {
|
|
2322
|
+
return [];
|
|
2323
|
+
}
|
|
2324
|
+
return leaf.children().filter(node => !node.isMerged);
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
override computedTooltip(): string {
|
|
2328
|
+
if (this.isMerged) {
|
|
2329
|
+
return super.computedTooltip();
|
|
2330
|
+
}
|
|
2331
|
+
const leafNode = this.mergedLeafNode();
|
|
2332
|
+
if (leafNode !== this) {
|
|
2333
|
+
return leafNode.computedTooltip();
|
|
2334
|
+
}
|
|
2335
|
+
return super.computedTooltip();
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2264
2338
|
override treeNode(): UI.TreeOutline.TreeElement {
|
|
2265
2339
|
if (this.treeElement) {
|
|
2266
2340
|
return this.treeElement;
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
min-width: var(--sys-size-9);
|
|
115
115
|
flex: 0 0 auto;
|
|
116
116
|
display: flex;
|
|
117
|
+
align-items: center;
|
|
117
118
|
padding-left: var(--sys-size-5);
|
|
118
119
|
justify-content: right;
|
|
119
120
|
}
|
|
@@ -220,7 +221,7 @@
|
|
|
220
221
|
}
|
|
221
222
|
|
|
222
223
|
.location {
|
|
223
|
-
line-height:
|
|
224
|
+
line-height: var(--sys-typescale-body4-line-height);
|
|
224
225
|
text-overflow: ellipsis;
|
|
225
226
|
overflow: hidden;
|
|
226
227
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright 2025 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
|
+
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
4
5
|
|
|
5
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
7
|
import * as Trace from '../../models/trace/trace.js';
|
|
@@ -1,79 +1,141 @@
|
|
|
1
1
|
// Copyright 2014 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
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
|
-
import type * as Common from '../../core/common/common.js';
|
|
7
5
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
8
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
9
8
|
import * as LayerViewer from '../layer_viewer/layer_viewer.js';
|
|
10
9
|
|
|
11
10
|
import type {TracingFrameLayerTree} from './TracingLayerTree.js';
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
12
|
+
const {widget, widgetRef} = UI.Widget;
|
|
13
|
+
|
|
14
|
+
export interface ViewInput {
|
|
15
|
+
layerViewHost: LayerViewer.LayerViewHost.LayerViewHost;
|
|
16
|
+
onPaintProfilerRequested: (selection: LayerViewer.LayerViewHost.Selection) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ViewOutput {
|
|
20
|
+
snapshotForSelection?:
|
|
21
|
+
(selection: LayerViewer.LayerViewHost.Selection) => Promise<SDK.PaintProfiler.SnapshotWithRect|null>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
25
|
+
|
|
26
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
27
|
+
// Common.ObjectWrapper.eventMixin(UI.Widget.Widget) dispatches a DOM
|
|
28
|
+
// CustomEvent('PaintProfilerRequested') on the host element, and Lit
|
|
29
|
+
// preserves the case-sensitive event name for addEventListener.
|
|
30
|
+
// clang-format off
|
|
31
|
+
render(html`
|
|
32
|
+
<devtools-split-view
|
|
33
|
+
class="timeline-layers-view"
|
|
34
|
+
direction="column"
|
|
35
|
+
sidebar-position="first"
|
|
36
|
+
name="timeline-layers-view">
|
|
37
|
+
<devtools-split-view
|
|
38
|
+
slot="main"
|
|
39
|
+
class="timeline-layers-view-properties"
|
|
40
|
+
direction="column"
|
|
41
|
+
sidebar-position="second"
|
|
42
|
+
name="timeline-layers-view-details">
|
|
43
|
+
<devtools-widget
|
|
44
|
+
slot="main"
|
|
45
|
+
${widget(LayerViewer.Layers3DView.Layers3DView, {layerViewHost: input.layerViewHost})}
|
|
46
|
+
${widgetRef(LayerViewer.Layers3DView.Layers3DView, view => {
|
|
47
|
+
output.snapshotForSelection = selection => view.snapshotForSelection(selection);
|
|
48
|
+
})}
|
|
49
|
+
@PaintProfilerRequested=${(event: CustomEvent<LayerViewer.LayerViewHost.Selection>) => {
|
|
50
|
+
input.onPaintProfilerRequested(event.detail);
|
|
51
|
+
}}>
|
|
52
|
+
</devtools-widget>
|
|
53
|
+
<devtools-widget
|
|
54
|
+
slot="sidebar"
|
|
55
|
+
${widget(LayerViewer.LayerDetailsView.LayerDetailsView, {layerViewHost: input.layerViewHost})}
|
|
56
|
+
@PaintProfilerRequested=${(event: CustomEvent<LayerViewer.LayerViewHost.Selection>) => {
|
|
57
|
+
input.onPaintProfilerRequested(event.detail);
|
|
58
|
+
}}>
|
|
59
|
+
</devtools-widget>
|
|
60
|
+
</devtools-split-view>
|
|
61
|
+
<devtools-widget
|
|
62
|
+
slot="sidebar"
|
|
63
|
+
${widget(LayerViewer.LayerTreeOutline.LayerTreeOutline, {layerViewHost: input.layerViewHost})}>
|
|
64
|
+
</devtools-widget>
|
|
65
|
+
</devtools-split-view>
|
|
66
|
+
`, target);
|
|
67
|
+
// clang-format on
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export class TimelineLayersView extends UI.Widget.VBox {
|
|
71
|
+
#showPaintProfilerCallback?: (arg0: SDK.PaintProfiler.PaintProfilerSnapshot) => void;
|
|
72
|
+
readonly #layerViewHost: LayerViewer.LayerViewHost.LayerViewHost;
|
|
73
|
+
readonly #view: View;
|
|
74
|
+
readonly #viewOutput: ViewOutput = {};
|
|
75
|
+
readonly #onPaintProfilerRequestedBound = this.#onPaintProfilerRequested.bind(this);
|
|
76
|
+
#frameLayerTree?: TracingFrameLayerTree;
|
|
77
|
+
#updateWhenVisible?: boolean;
|
|
78
|
+
|
|
79
|
+
constructor(
|
|
80
|
+
showPaintProfilerCallback?: HTMLElement|((arg0: SDK.PaintProfiler.PaintProfilerSnapshot) => void),
|
|
81
|
+
view: View = DEFAULT_VIEW,
|
|
82
|
+
) {
|
|
83
|
+
super(showPaintProfilerCallback instanceof HTMLElement ? showPaintProfilerCallback : undefined);
|
|
84
|
+
this.#view = view;
|
|
85
|
+
if (typeof showPaintProfilerCallback === 'function') {
|
|
86
|
+
this.#showPaintProfilerCallback = showPaintProfilerCallback;
|
|
87
|
+
}
|
|
88
|
+
this.#layerViewHost = new LayerViewer.LayerViewHost.LayerViewHost();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
get showPaintProfilerCallback(): ((arg0: SDK.PaintProfiler.PaintProfilerSnapshot) => void)|undefined {
|
|
92
|
+
return this.#showPaintProfilerCallback;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
set showPaintProfilerCallback(callback: ((arg0: SDK.PaintProfiler.PaintProfilerSnapshot) => void)|undefined) {
|
|
96
|
+
this.#showPaintProfilerCallback = callback;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
override performUpdate(): void {
|
|
100
|
+
this.#view(
|
|
101
|
+
{
|
|
102
|
+
layerViewHost: this.#layerViewHost,
|
|
103
|
+
onPaintProfilerRequested: this.#onPaintProfilerRequestedBound,
|
|
104
|
+
},
|
|
105
|
+
this.#viewOutput,
|
|
106
|
+
this.contentElement,
|
|
107
|
+
);
|
|
46
108
|
}
|
|
47
109
|
|
|
48
110
|
showLayerTree(frameLayerTree: TracingFrameLayerTree): void {
|
|
49
|
-
this
|
|
111
|
+
this.#frameLayerTree = frameLayerTree;
|
|
50
112
|
if (this.isShowing()) {
|
|
51
113
|
this.update();
|
|
52
114
|
} else {
|
|
53
|
-
this
|
|
115
|
+
this.#updateWhenVisible = true;
|
|
54
116
|
}
|
|
55
117
|
}
|
|
56
118
|
|
|
57
119
|
override wasShown(): void {
|
|
58
120
|
super.wasShown();
|
|
59
|
-
|
|
60
|
-
|
|
121
|
+
this.requestUpdate();
|
|
122
|
+
if (this.#updateWhenVisible) {
|
|
123
|
+
this.#updateWhenVisible = false;
|
|
61
124
|
this.update();
|
|
62
125
|
}
|
|
63
126
|
}
|
|
64
127
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const selection = event.data;
|
|
68
|
-
const snapshotWithRect = await this.layers3DView.snapshotForSelection(selection);
|
|
128
|
+
async #onPaintProfilerRequested(selection: LayerViewer.LayerViewHost.Selection): Promise<void> {
|
|
129
|
+
const snapshotWithRect = await this.#viewOutput.snapshotForSelection?.(selection);
|
|
69
130
|
if (snapshotWithRect) {
|
|
70
|
-
this
|
|
131
|
+
this.#showPaintProfilerCallback?.(snapshotWithRect.snapshot);
|
|
71
132
|
}
|
|
72
133
|
}
|
|
73
134
|
|
|
74
135
|
update(): void {
|
|
75
|
-
if (this
|
|
76
|
-
void this
|
|
136
|
+
if (this.#frameLayerTree) {
|
|
137
|
+
void Promise.all([this.#frameLayerTree.layerTreePromise(), this.updateComplete])
|
|
138
|
+
.then(([layerTree]) => this.#layerViewHost.setLayerTree(layerTree));
|
|
77
139
|
}
|
|
78
140
|
}
|
|
79
141
|
}
|
|
@@ -1451,8 +1451,10 @@ export class TimelinePanel extends TimelinePanelBase implements Client, Timeline
|
|
|
1451
1451
|
return;
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
1454
|
-
//
|
|
1455
|
-
|
|
1454
|
+
// Map scripts by ID so extension script content can be removed. Read them
|
|
1455
|
+
// from the saved trace, not from the global `Scripts.data()` handler state,
|
|
1456
|
+
// which always holds the last parsed trace.
|
|
1457
|
+
const mappedScriptsWithData = parsedTrace.data.Scripts.scripts;
|
|
1456
1458
|
const scriptByIdMap = new Map<string, Trace.Handlers.ModelHandlers.Scripts.Script>();
|
|
1457
1459
|
|
|
1458
1460
|
for (const mapScript of mappedScriptsWithData) {
|
|
@@ -116,7 +116,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
116
116
|
return Lit.nothing;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
const aiLabel =
|
|
119
|
+
const aiLabel = 'Ask AI';
|
|
120
120
|
const ariaLabel = `${aiLabel} about ${model.title} insight`;
|
|
121
121
|
const content = renderContent();
|
|
122
122
|
const iconName = AIAssistance.AiUtils.getIconName();
|
|
@@ -125,13 +125,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
125
125
|
const lockedString = i18n.i18n.lockedString;
|
|
126
126
|
|
|
127
127
|
function isAiAssistanceServerSideLoggingEnabled(): boolean {
|
|
128
|
-
// Disable logging for now.
|
|
129
|
-
// For context, see b/454563259#comment35.
|
|
130
|
-
// We should be able to remove this ~end of April.
|
|
131
|
-
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
132
|
-
return false;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
128
|
return !Root.Runtime.hostConfig.aidaAvailability?.disallowLogging;
|
|
136
129
|
}
|
|
137
130
|
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
.context-detail-row {
|
|
66
66
|
grid-template-columns: min-content 1fr;
|
|
67
67
|
display: grid;
|
|
68
|
-
line-height: 18px;
|
|
69
68
|
margin: var(--sys-size-3) var(--sys-size-9) var(--sys-size-3) var(--sys-size-9);
|
|
70
69
|
gap: var(--sys-size-6);
|
|
71
70
|
}
|
|
@@ -73,7 +72,7 @@
|
|
|
73
72
|
.context-detail-row-entry:not(:empty) {
|
|
74
73
|
color: var(--sys-color-on-surface-subtle);
|
|
75
74
|
overflow: hidden;
|
|
76
|
-
min-width:
|
|
75
|
+
min-width: var(--sys-size-21);
|
|
77
76
|
font: var(--sys-typescale-body5-medium);
|
|
78
77
|
}
|
|
79
78
|
|
|
@@ -317,7 +317,7 @@ function renderNewAuthenticatorSection(
|
|
|
317
317
|
<select id="protocol" jslog=${VisualLogging.dropDown('protocol').track({change: true})}
|
|
318
318
|
value=${options.protocol}
|
|
319
319
|
@change=${(e:Event) => onUpdate({protocol: (e.target as HTMLSelectElement).value as Protocol.WebAuthn.AuthenticatorProtocol})}>
|
|
320
|
-
${Object.values(PROTOCOL_AUTHENTICATOR_VALUES).sort().map(option => html`
|
|
320
|
+
${Object.values<Protocol.WebAuthn.AuthenticatorProtocol>(PROTOCOL_AUTHENTICATOR_VALUES).sort().map(option => html`
|
|
321
321
|
<option value=${option} jslog=${VisualLogging.item(option).track({click: true})}>
|
|
322
322
|
${option}
|
|
323
323
|
</option>`)}
|
|
@@ -51,7 +51,7 @@ export function getReleaseNote(): ReleaseNote {
|
|
|
51
51
|
|
|
52
52
|
let releaseNote: ReleaseNote = {
|
|
53
53
|
version: 158,
|
|
54
|
-
header: 'New in DevTools (
|
|
54
|
+
header: 'New in DevTools (December 2026)',
|
|
55
55
|
announcement: {
|
|
56
56
|
title: 'Modern Web Guidance is now stable!',
|
|
57
57
|
description: 'Upgrade your coding agents with expert-vetted web development best practices.',
|
|
@@ -63,17 +63,17 @@ let releaseNote: ReleaseNote = {
|
|
|
63
63
|
markdownLinks: [
|
|
64
64
|
{
|
|
65
65
|
key: 'mcp',
|
|
66
|
-
link: 'https://developer.chrome.com/blog/new-in-devtools-
|
|
66
|
+
link: 'https://developer.chrome.com/blog/new-in-devtools-december-2026/#mcp',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
key: 'sources',
|
|
70
|
-
link: 'https://developer.chrome.com/blog/new-in-devtools-
|
|
70
|
+
link: 'https://developer.chrome.com/blog/new-in-devtools-december-2026/#sources',
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
key: '
|
|
74
|
-
link: 'https://developer.chrome.com/blog/new-in-devtools-
|
|
73
|
+
key: 'performance',
|
|
74
|
+
link: 'https://developer.chrome.com/blog/new-in-devtools-december-2026/#performance',
|
|
75
75
|
},
|
|
76
76
|
],
|
|
77
77
|
videoLinks: [],
|
|
78
|
-
link: 'https://developer.chrome.com/blog/new-in-devtools-
|
|
78
|
+
link: 'https://developer.chrome.com/blog/new-in-devtools-december-2026/',
|
|
79
79
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
### [DevTools for agents](mcp)
|
|
1
|
+
### [DevTools for agents: Logpoints, virtual WebAuthn authenticators, live config reloading, and offline heap snapshots](mcp)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Set source-mapped logpoints (`set_logpoints`), configure virtual WebAuthn authenticators (`configure_webauthn`), watch and hot-reload MCP configuration files with `--watchConfig`, and analyze heap snapshots and V8 execution contexts offline without a browser connection.
|
|
4
4
|
|
|
5
|
-
### [
|
|
5
|
+
### [Sources: Original scopes view, stack traces, and expression evaluation with ECMA-426 source map scopes](sources)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Inspect your authored file's original lexical scope tree in the **Scope** pane, view original function names and merged outlined frames across stack traces, and evaluate expressions using original variable names powered by ECMA-426 source map `scopes`.
|
|
8
8
|
|
|
9
|
-
### [
|
|
9
|
+
### [Performance and Memory: Faster trace parsing, Lantern HTTP/3 simulation, and generator context analysis](performance)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Parse large performance traces roughly 26% faster with reduced memory usage, and analyze heap snapshot context retention across suspended generators, async functions, and finished ES modules.
|