chrome-devtools-frontend 1.0.1547147 → 1.0.1548870
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/.stylelintrc.json +5 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/eslint.config.mjs +3 -2
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/platform/HostRuntime.ts +14 -7
- package/front_end/core/platform/api/HostRuntime.ts +28 -3
- package/front_end/core/platform/browser/HostRuntime.ts +66 -5
- package/front_end/core/platform/node/HostRuntime.ts +76 -4
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/Cookie.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +6 -0
- package/front_end/core/sdk/PreloadingModel.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +4 -4
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +2 -2
- package/front_end/generated/Deprecation.ts +19 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/SupportedCSSProperties.js +13 -13
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +16 -27
- package/front_end/models/ai_assistance/AiConversation.ts +104 -24
- package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
- package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +23 -48
- package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -10
- package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +80 -153
- package/front_end/panels/ai_assistance/components/ChatView.ts +54 -31
- package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +62 -34
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
- package/front_end/panels/console/ConsoleViewport.ts +1 -1
- package/front_end/panels/console/consoleInsightTeaser.css +1 -0
- package/front_end/panels/coverage/CoverageModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +64 -20
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
- package/front_end/panels/recorder/components/StepEditor.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +7 -7
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +4 -0
- package/front_end/ui/components/text_editor/javascript.ts +1 -1
- package/front_end/ui/legacy/ListWidget.ts +51 -18
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -2
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +40 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
- package/inspector_overlay/tool_window_controls.ts +4 -1
- package/mcp/mcp.ts +1 -1
- package/package.json +2 -3
- package/front_end/core/common/Worker.ts +0 -60
- package/front_end/panels/application/components/StackTrace.ts +0 -238
- package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
- package/front_end/panels/application/components/stackTraceRow.css +0 -50
|
@@ -50,7 +50,7 @@ export class ReportView extends VBox {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
setSubtitle(subtitle: string): void {
|
|
53
|
-
if (this.subtitleElement
|
|
53
|
+
if (this.subtitleElement?.textContent === subtitle) {
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
if (!this.subtitleElement) {
|
|
@@ -261,7 +261,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
261
261
|
if (userGesture && !tab.closeable) {
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
-
if (this.currentTab
|
|
264
|
+
if (this.currentTab?.id === id) {
|
|
265
265
|
this.hideCurrentTab();
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -335,7 +335,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
335
335
|
isUserGesture: userGesture,
|
|
336
336
|
};
|
|
337
337
|
this.dispatchEventToListeners(Events.TabInvoked, eventData);
|
|
338
|
-
if (this.currentTab
|
|
338
|
+
if (this.currentTab?.id === id) {
|
|
339
339
|
return true;
|
|
340
340
|
}
|
|
341
341
|
|
|
@@ -474,7 +474,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
this.suspendInvalidations();
|
|
477
|
-
const isSelected = this.currentTab
|
|
477
|
+
const isSelected = this.currentTab?.id === id;
|
|
478
478
|
const shouldFocus = tab.view.hasFocus();
|
|
479
479
|
if (isSelected) {
|
|
480
480
|
this.hideTab(tab);
|
|
@@ -1254,7 +1254,7 @@ export class TreeElement {
|
|
|
1254
1254
|
ARIAUtils.clearSelected(this.listItemNode);
|
|
1255
1255
|
this.setFocusable(false);
|
|
1256
1256
|
|
|
1257
|
-
if (this.treeOutline
|
|
1257
|
+
if (this.treeOutline?.selectedTreeElement === this) {
|
|
1258
1258
|
this.treeOutline.selectedTreeElement = null;
|
|
1259
1259
|
this.treeOutline.updateFocusable();
|
|
1260
1260
|
if (hadFocus) {
|
|
@@ -37,7 +37,7 @@ export class ContrastInfo extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
37
37
|
this.#contrastRatioAPCAThreshold =
|
|
38
38
|
Common.ColorUtils.getAPCAThreshold(contrastInfo.computedFontSize, contrastInfo.computedFontWeight);
|
|
39
39
|
|
|
40
|
-
if (
|
|
40
|
+
if (contrastInfo.backgroundColors?.length !== 1) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
const bgColorText = contrastInfo.backgroundColors[0];
|
|
@@ -466,7 +466,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
466
466
|
cell.createChild('div', 'sort-order-icon-container').appendChild(icon);
|
|
467
467
|
|
|
468
468
|
if (column.title) {
|
|
469
|
-
|
|
469
|
+
const columnLabel = `${column.title} - ${i18nString(UIStrings.sortableColumn)}`;
|
|
470
|
+
UI.ARIAUtils.setLabel(cell, columnLabel);
|
|
470
471
|
}
|
|
471
472
|
}
|
|
472
473
|
}
|
|
@@ -2341,7 +2342,7 @@ export class DataGridNode<T> {
|
|
|
2341
2342
|
}
|
|
2342
2343
|
|
|
2343
2344
|
deselect(supressDeselectedEvent?: boolean): void {
|
|
2344
|
-
if (
|
|
2345
|
+
if (this.dataGrid?.selectedNode !== this || !this.selected) {
|
|
2345
2346
|
return;
|
|
2346
2347
|
}
|
|
2347
2348
|
|
|
@@ -49,6 +49,7 @@ import objectPropertiesSectionStyles from './objectPropertiesSection.css.js';
|
|
|
49
49
|
import objectValueStyles from './objectValue.css.js';
|
|
50
50
|
import {RemoteObjectPreviewFormatter, renderNodeTitle} from './RemoteObjectPreviewFormatter.js';
|
|
51
51
|
|
|
52
|
+
const {widgetConfig} = UI.Widget;
|
|
52
53
|
const {ref, repeat, ifDefined, classMap} = Directives;
|
|
53
54
|
const UIStrings = {
|
|
54
55
|
/**
|
|
@@ -135,7 +136,6 @@ const UIStrings = {
|
|
|
135
136
|
} as const;
|
|
136
137
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/ObjectPropertiesSection.ts', UIStrings);
|
|
137
138
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
138
|
-
const EXPANDABLE_MAX_LENGTH = 50;
|
|
139
139
|
const EXPANDABLE_MAX_DEPTH = 100;
|
|
140
140
|
|
|
141
141
|
const objectPropertiesSectionMap = new WeakMap<Element, ObjectPropertiesSection>();
|
|
@@ -639,13 +639,16 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
|
639
639
|
const text = JSON.stringify(description);
|
|
640
640
|
const tooLong = description.length > maxRenderableStringLength;
|
|
641
641
|
return html`<span class="value object-value-string" title=${ifDefined(tooLong ? undefined : description)}>${
|
|
642
|
-
tooLong ?
|
|
642
|
+
tooLong ? html`<devtools-widget .widgetConfig=${
|
|
643
|
+
widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
|
|
644
|
+
text}</span>`;
|
|
643
645
|
}
|
|
644
646
|
if (type === 'object' && subtype === 'trustedtype') {
|
|
645
647
|
const text = `${className} '${description}'`;
|
|
646
648
|
const tooLong = text.length > maxRenderableStringLength;
|
|
647
649
|
return html`<span class="value object-value-trustedtype" title=${ifDefined(tooLong ? undefined : text)}>${
|
|
648
|
-
tooLong ?
|
|
650
|
+
tooLong ? html`<devtools-widget .widgetConfig=${
|
|
651
|
+
widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
|
|
649
652
|
html`${className} <span class=object-value-string title=${description}>${
|
|
650
653
|
JSON.stringify(description)}</span>`}</span>`;
|
|
651
654
|
}
|
|
@@ -663,8 +666,9 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
|
|
|
663
666
|
>${renderNodeTitle(description)}</span>`;
|
|
664
667
|
}
|
|
665
668
|
if (description.length > maxRenderableStringLength) {
|
|
666
|
-
return html`<span class="value object-value-${subtype || type}" title=${description}
|
|
667
|
-
|
|
669
|
+
return html`<span class="value object-value-${subtype || type}" title=${description}><devtools-widget
|
|
670
|
+
.widgetConfig=${
|
|
671
|
+
widgetConfig(ExpandableTextPropertyValue, {text: description})}></devtools-widget></span>`;
|
|
668
672
|
}
|
|
669
673
|
const hasPreview = value.preview && showPreview;
|
|
670
674
|
return html`<span class="value object-value-${subtype || type}" title=${description}>${
|
|
@@ -992,7 +996,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
992
996
|
private linkifier: Components.Linkifier.Linkifier|undefined;
|
|
993
997
|
private readonly maxNumPropertiesToShow: number;
|
|
994
998
|
readOnly!: boolean;
|
|
995
|
-
private prompt!: ObjectPropertyPrompt|undefined;
|
|
996
999
|
#editing = false;
|
|
997
1000
|
readonly #view: TreeElementView;
|
|
998
1001
|
#completions: string[] = [];
|
|
@@ -1107,39 +1110,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1107
1110
|
treeNode.appendChild(infoElement);
|
|
1108
1111
|
}
|
|
1109
1112
|
|
|
1110
|
-
static createRemoteObjectAccessorPropertySpan(
|
|
1111
|
-
object: SDK.RemoteObject.RemoteObject|null, propertyPath: string[],
|
|
1112
|
-
callback: (arg0: SDK.RemoteObject.CallFunctionResult) => void): HTMLElement {
|
|
1113
|
-
const rootElement = document.createElement('span');
|
|
1114
|
-
const element = rootElement.createChild('span');
|
|
1115
|
-
element.textContent = i18nString(UIStrings.dots);
|
|
1116
|
-
if (!object) {
|
|
1117
|
-
return rootElement;
|
|
1118
|
-
}
|
|
1119
|
-
element.classList.add('object-value-calculate-value-button');
|
|
1120
|
-
UI.Tooltip.Tooltip.install(element, i18nString(UIStrings.invokePropertyGetter));
|
|
1121
|
-
element.addEventListener('click', onInvokeGetterClick, false);
|
|
1122
|
-
|
|
1123
|
-
function onInvokeGetterClick(event: Event): void {
|
|
1124
|
-
event.consume();
|
|
1125
|
-
if (object) {
|
|
1126
|
-
void object.callFunction(invokeGetter, [{value: JSON.stringify(propertyPath)}]).then(callback);
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
function invokeGetter(this: Object, arrayStr: string): Object {
|
|
1131
|
-
let result: Object = this;
|
|
1132
|
-
const properties = JSON.parse(arrayStr);
|
|
1133
|
-
for (let i = 0, n = properties.length; i < n; ++i) {
|
|
1134
|
-
// @ts-expect-error callFunction expects this to be a generic Object, so while this works we can't be more specific on types.
|
|
1135
|
-
result = result[properties[i]];
|
|
1136
|
-
}
|
|
1137
|
-
return result;
|
|
1138
|
-
}
|
|
1139
|
-
|
|
1140
|
-
return rootElement;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
1113
|
get nameElement(): Element|undefined {
|
|
1144
1114
|
return this.#nameElement;
|
|
1145
1115
|
}
|
|
@@ -1623,13 +1593,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1623
1593
|
static sparseIterationThreshold = 250000;
|
|
1624
1594
|
}
|
|
1625
1595
|
|
|
1626
|
-
export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
1627
|
-
constructor() {
|
|
1628
|
-
super();
|
|
1629
|
-
this.initialize(TextEditor.JavaScript.completeInContext);
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
1596
|
export class ObjectPropertiesSectionsTreeExpandController {
|
|
1634
1597
|
static readonly #propertyPathCache = new WeakMap<UI.TreeOutline.TreeElement, string>();
|
|
1635
1598
|
static readonly #sectionMap = new WeakMap<RootElement, string>();
|
|
@@ -1740,89 +1703,102 @@ export class Renderer implements UI.UIUtils.Renderer {
|
|
|
1740
1703
|
}
|
|
1741
1704
|
}
|
|
1742
1705
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1767
|
-
const {target} = e;
|
|
1768
|
-
if (!(target instanceof Element)) {
|
|
1769
|
-
return;
|
|
1770
|
-
}
|
|
1771
|
-
const listItem = target.closest('li');
|
|
1772
|
-
const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
|
|
1773
|
-
if (!(element instanceof ObjectPropertyTreeElement)) {
|
|
1774
|
-
return;
|
|
1775
|
-
}
|
|
1776
|
-
const contextMenu = element.getContextMenu(e);
|
|
1777
|
-
if (this.text.length < this.maxDisplayableTextLength && !this.#expanded) {
|
|
1778
|
-
contextMenu.clipboardSection().appendItem(
|
|
1779
|
-
i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), this.expandText.bind(this),
|
|
1780
|
-
{jslogContext: 'show-more'});
|
|
1781
|
-
}
|
|
1706
|
+
interface ExpandableTextViewInput {
|
|
1707
|
+
copyText: () => void;
|
|
1708
|
+
expandText: () => void;
|
|
1709
|
+
expanded: boolean;
|
|
1710
|
+
maxLength: number;
|
|
1711
|
+
byteCount: number;
|
|
1712
|
+
text: string;
|
|
1713
|
+
}
|
|
1714
|
+
type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
|
|
1715
|
+
export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
|
|
1716
|
+
const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
|
|
1717
|
+
const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
|
|
1718
|
+
const onContextMenu = (e: Event): void => {
|
|
1719
|
+
const {target} = e;
|
|
1720
|
+
if (!(target instanceof Element)) {
|
|
1721
|
+
return;
|
|
1722
|
+
}
|
|
1723
|
+
const listItem = target.closest('li');
|
|
1724
|
+
const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
|
|
1725
|
+
if (!(element instanceof ObjectPropertyTreeElement)) {
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
const contextMenu = element.getContextMenu(e);
|
|
1729
|
+
if (canExpand && !input.expanded) {
|
|
1782
1730
|
contextMenu.clipboardSection().appendItem(
|
|
1783
|
-
i18nString(UIStrings.
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1731
|
+
i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), input.expandText, {jslogContext: 'show-more'});
|
|
1732
|
+
}
|
|
1733
|
+
contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), input.copyText, {jslogContext: 'copy'});
|
|
1734
|
+
void contextMenu.show();
|
|
1735
|
+
e.consume(true);
|
|
1736
|
+
};
|
|
1787
1737
|
|
|
1788
|
-
|
|
1738
|
+
const croppedText = input.text.slice(0, input.maxLength);
|
|
1789
1739
|
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
// clang-format off
|
|
1740
|
+
render(
|
|
1741
|
+
// clang-format off
|
|
1793
1742
|
html`<span title=${croppedText + '…'} @contextmenu=${onContextMenu}>
|
|
1794
|
-
${
|
|
1743
|
+
${input.expanded ? input.text : croppedText}
|
|
1795
1744
|
<button
|
|
1796
|
-
?hidden=${
|
|
1797
|
-
@click=${
|
|
1798
|
-
jslog=${ifDefined(
|
|
1799
|
-
class=${
|
|
1800
|
-
data-text=${
|
|
1745
|
+
?hidden=${input.expanded}
|
|
1746
|
+
@click=${canExpand ? input.expandText : undefined}
|
|
1747
|
+
jslog=${ifDefined(canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
|
|
1748
|
+
class=${canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
|
|
1749
|
+
data-text=${canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
|
|
1801
1750
|
i18nString(UIStrings.longTextWasTruncatedS, {PH1: totalBytesText})}
|
|
1802
1751
|
></button>
|
|
1803
1752
|
<button
|
|
1804
1753
|
class=expandable-inline-button
|
|
1805
|
-
@click=${
|
|
1754
|
+
@click=${input.copyText}
|
|
1806
1755
|
data-text=${i18nString(UIStrings.copy)}
|
|
1807
1756
|
jslog=${VisualLogging.action('copy').track({click: true})}
|
|
1808
1757
|
></button>
|
|
1809
1758
|
</span>`,
|
|
1810
|
-
|
|
1811
|
-
|
|
1759
|
+
// clang-format on
|
|
1760
|
+
target);
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
export class ExpandableTextPropertyValue extends UI.Widget.Widget {
|
|
1764
|
+
static readonly MAX_DISPLAYABLE_TEXT_LENGTH = 10000000;
|
|
1765
|
+
static readonly EXPANDABLE_MAX_LENGTH = 50;
|
|
1766
|
+
#text = '';
|
|
1767
|
+
#byteCount = 0;
|
|
1768
|
+
#expanded = false;
|
|
1769
|
+
#maxLength = ExpandableTextPropertyValue.EXPANDABLE_MAX_LENGTH;
|
|
1770
|
+
readonly #view: ExpandableTextView;
|
|
1771
|
+
|
|
1772
|
+
constructor(target?: HTMLElement, view = EXPANDABLE_TEXT_DEFAULT_VIEW) {
|
|
1773
|
+
super(target);
|
|
1774
|
+
this.#view = view;
|
|
1812
1775
|
}
|
|
1813
1776
|
|
|
1814
|
-
|
|
1815
|
-
|
|
1777
|
+
set text(text: string) {
|
|
1778
|
+
this.#text = text;
|
|
1779
|
+
this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
|
|
1780
|
+
this.requestUpdate();
|
|
1816
1781
|
}
|
|
1817
1782
|
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
this.#render();
|
|
1822
|
-
}
|
|
1783
|
+
set maxLength(maxLength: number) {
|
|
1784
|
+
this.#maxLength = maxLength;
|
|
1785
|
+
this.requestUpdate();
|
|
1823
1786
|
}
|
|
1824
1787
|
|
|
1825
|
-
|
|
1826
|
-
|
|
1788
|
+
override performUpdate(): void {
|
|
1789
|
+
const input: ExpandableTextViewInput = {
|
|
1790
|
+
copyText: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text),
|
|
1791
|
+
expandText: () => {
|
|
1792
|
+
if (!this.#expanded) {
|
|
1793
|
+
this.#expanded = true;
|
|
1794
|
+
this.requestUpdate();
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
expanded: this.#expanded,
|
|
1798
|
+
byteCount: this.#byteCount,
|
|
1799
|
+
maxLength: this.#maxLength,
|
|
1800
|
+
text: this.#text,
|
|
1801
|
+
};
|
|
1802
|
+
this.#view(input, {}, this.contentElement);
|
|
1827
1803
|
}
|
|
1828
1804
|
}
|
|
@@ -1130,8 +1130,7 @@ const searchHighlighter = CodeMirror.ViewPlugin.fromClass(class {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
if (match[0].length) {
|
|
1132
1132
|
const start = pos + match.index, end = start + match[0].length;
|
|
1133
|
-
const current =
|
|
1134
|
-
active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
|
|
1133
|
+
const current = active.currentRange?.from === start && active.currentRange.to === end;
|
|
1135
1134
|
builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
|
|
1136
1135
|
} else {
|
|
1137
1136
|
active.regexp.regex.lastIndex = match.index + 1;
|
|
@@ -217,7 +217,7 @@ export function buildStackTraceRows(
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
function renderStackTraceTable(
|
|
220
|
-
container: Element, parent: Element,
|
|
220
|
+
container: Element, parent: Element, expandable: boolean,
|
|
221
221
|
stackTraceRows: Array<StackTraceRegularRow|StackTraceAsyncRow>): HTMLElement[] {
|
|
222
222
|
container.removeChildren();
|
|
223
223
|
const links: HTMLElement[] = [];
|
|
@@ -225,20 +225,33 @@ function renderStackTraceTable(
|
|
|
225
225
|
// The tableSection groups one or more synchronous call frames together.
|
|
226
226
|
// Wherever there is an asynchronous call, a new section is created.
|
|
227
227
|
let tableSection: Element|null = null;
|
|
228
|
+
let firstRow = true;
|
|
228
229
|
for (const item of stackTraceRows) {
|
|
229
230
|
if (!tableSection || 'asyncDescription' in item) {
|
|
230
231
|
tableSection = container.createChild('tbody');
|
|
231
232
|
}
|
|
232
233
|
|
|
233
234
|
const row = tableSection.createChild('tr');
|
|
234
|
-
if (
|
|
235
|
+
if (firstRow && expandable) {
|
|
236
|
+
const button = row.createChild('td').createChild('button', 'arrow-icon-button');
|
|
237
|
+
button.createChild('span', 'arrow-icon');
|
|
238
|
+
parent.classList.add('expandable');
|
|
239
|
+
container.classList.add('expandable');
|
|
240
|
+
button.addEventListener('click', () => {
|
|
241
|
+
button.setAttribute('jslog', `${VisualLogging.expand().track({click: true})}`);
|
|
242
|
+
parent.classList.toggle('expanded');
|
|
243
|
+
container.classList.toggle('expanded');
|
|
244
|
+
});
|
|
245
|
+
firstRow = false;
|
|
246
|
+
} else {
|
|
235
247
|
row.createChild('td').textContent = '\n';
|
|
248
|
+
}
|
|
249
|
+
if ('asyncDescription' in item) {
|
|
236
250
|
row.createChild('td', 'stack-preview-async-description').textContent = item.asyncDescription;
|
|
237
251
|
row.createChild('td');
|
|
238
252
|
row.createChild('td');
|
|
239
253
|
row.classList.add('stack-preview-async-row');
|
|
240
254
|
} else {
|
|
241
|
-
row.createChild('td').textContent = '\n';
|
|
242
255
|
row.createChild('td', 'function-name').textContent = item.functionName;
|
|
243
256
|
row.createChild('td').textContent = ' @ ';
|
|
244
257
|
if (item.link) {
|
|
@@ -284,13 +297,13 @@ function renderStackTraceTable(
|
|
|
284
297
|
export interface Options {
|
|
285
298
|
// TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
|
|
286
299
|
runtimeStackTrace?: Protocol.Runtime.StackTrace;
|
|
287
|
-
stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
288
300
|
tabStops?: boolean;
|
|
289
301
|
// Whether the width of stack trace preview
|
|
290
302
|
// is constrained to its container or whether
|
|
291
303
|
// it can grow the container.
|
|
292
304
|
widthConstrained?: boolean;
|
|
293
305
|
showColumnNumber?: boolean;
|
|
306
|
+
expandable?: boolean;
|
|
294
307
|
}
|
|
295
308
|
|
|
296
309
|
export interface StackTraceRegularRow {
|
|
@@ -303,8 +316,10 @@ export interface StackTraceAsyncRow {
|
|
|
303
316
|
}
|
|
304
317
|
|
|
305
318
|
export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
319
|
+
#stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
306
320
|
#target?: SDK.Target.Target;
|
|
307
321
|
#linkifier?: Linkifier;
|
|
322
|
+
#ownedLinkifier?: Linkifier;
|
|
308
323
|
#options: Options;
|
|
309
324
|
#links: HTMLElement[] = [];
|
|
310
325
|
|
|
@@ -315,6 +330,10 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
315
330
|
|
|
316
331
|
this.#target = target;
|
|
317
332
|
this.#linkifier = linkifier;
|
|
333
|
+
if (!this.#linkifier) {
|
|
334
|
+
this.#ownedLinkifier = new Linkifier();
|
|
335
|
+
this.#linkifier = this.#ownedLinkifier;
|
|
336
|
+
}
|
|
318
337
|
this.#options = options || {
|
|
319
338
|
widthConstrained: false,
|
|
320
339
|
};
|
|
@@ -329,7 +348,7 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
329
348
|
this.#table = this.contentElement.createChild('table', 'stack-preview-container');
|
|
330
349
|
this.#table.classList.toggle('width-constrained', this.#options.widthConstrained ?? false);
|
|
331
350
|
|
|
332
|
-
this.#
|
|
351
|
+
this.#stackTrace?.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.performUpdate.bind(this));
|
|
333
352
|
|
|
334
353
|
this.performUpdate();
|
|
335
354
|
}
|
|
@@ -339,21 +358,22 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
339
358
|
return;
|
|
340
359
|
}
|
|
341
360
|
|
|
342
|
-
const {runtimeStackTrace,
|
|
361
|
+
const {runtimeStackTrace, tabStops} = this.#options;
|
|
343
362
|
|
|
344
|
-
if (stackTrace) {
|
|
363
|
+
if (this.#stackTrace) {
|
|
345
364
|
const stackTraceRows = buildStackTraceRows(
|
|
346
|
-
stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
|
|
347
|
-
this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
|
|
365
|
+
this.#stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
|
|
366
|
+
this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
|
|
348
367
|
return;
|
|
349
368
|
}
|
|
350
369
|
|
|
351
370
|
// TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
|
|
352
|
-
const updateCallback =
|
|
371
|
+
const updateCallback =
|
|
372
|
+
renderStackTraceTable.bind(null, this.#table, this.element, this.#options.expandable ?? false);
|
|
353
373
|
const stackTraceRows = buildStackTraceRowsForLegacyRuntimeStackTrace(
|
|
354
374
|
runtimeStackTrace ?? {callFrames: []}, this.#target ?? null, this.#linkifier, tabStops, updateCallback,
|
|
355
375
|
this.#options.showColumnNumber);
|
|
356
|
-
this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
|
|
376
|
+
this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
|
|
357
377
|
}
|
|
358
378
|
|
|
359
379
|
get linkElements(): readonly HTMLElement[] {
|
|
@@ -374,4 +394,13 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
|
|
|
374
394
|
this.#options = options;
|
|
375
395
|
this.requestUpdate();
|
|
376
396
|
}
|
|
397
|
+
|
|
398
|
+
set stackTrace(stackTrace: StackTrace.StackTrace.StackTrace) {
|
|
399
|
+
this.#stackTrace = stackTrace;
|
|
400
|
+
this.requestUpdate();
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
override onDetach(): void {
|
|
404
|
+
this.#ownedLinkifier?.dispose();
|
|
405
|
+
}
|
|
377
406
|
}
|
|
@@ -99,6 +99,34 @@
|
|
|
99
99
|
&:not(.show-hidden-rows) > tfoot > tr.show-less-link {
|
|
100
100
|
--display-toggle-link: none;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
.arrow-icon-button {
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
padding: 1px 0;
|
|
106
|
+
border: none;
|
|
107
|
+
background: none;
|
|
108
|
+
margin-left: -4px;
|
|
109
|
+
margin-right: -2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.arrow-icon {
|
|
113
|
+
display: inline-block;
|
|
114
|
+
mask-image: var(--image-file-triangle-right);
|
|
115
|
+
background-color: var(--icon-default);
|
|
116
|
+
margin-top: 2px;
|
|
117
|
+
height: 14px;
|
|
118
|
+
width: 14px;
|
|
119
|
+
transition: transform 200ms;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&.expanded .arrow-icon{
|
|
123
|
+
transform: rotate(90deg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&.expandable:not(.expanded) tbody:not(:first-of-type),
|
|
127
|
+
&.expandable:not(.expanded) tbody tr:not(:first-of-type) {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
102
130
|
}
|
|
103
131
|
|
|
104
132
|
/* The show more/less links aren't really a part of the content
|
|
@@ -131,7 +131,8 @@ function checkContextValue(context: string|number|undefined): void {
|
|
|
131
131
|
if (Root.Runtime.Runtime.queryParam('debugFrontend') || Host.InspectorFrontendHost.isUnderTest() ||
|
|
132
132
|
localStorage.getItem('veDebugLoggingEnabled') === DebugLoggingFormat.TEST) {
|
|
133
133
|
const stack = (new Error().stack || '').split('\n').slice(3).join('\n');
|
|
134
|
-
console.error(`Unknown VE context: ${context}${
|
|
134
|
+
console.error(`Unknown VE context: '${context}'\n${
|
|
135
|
+
stack}\nPlease add it to front_end/ui/visual_logging/KnownContextValues.ts if you think that's a valid context value.`);
|
|
135
136
|
}
|
|
136
137
|
reportedUnknownVeContext.add(context);
|
|
137
138
|
}
|
|
@@ -38,7 +38,10 @@ export class WindowControlsOverlay extends Overlay {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
override uninstall() {
|
|
41
|
-
this.
|
|
41
|
+
this.windowsToolBar.remove();
|
|
42
|
+
this.linuxToolBar.remove();
|
|
43
|
+
this.macToolbarRight.remove();
|
|
44
|
+
this.macToolbarLeft.remove();
|
|
42
45
|
super.uninstall();
|
|
43
46
|
}
|
|
44
47
|
|
package/mcp/mcp.ts
CHANGED
|
@@ -31,6 +31,6 @@ export {
|
|
|
31
31
|
type EventTypes as IssuesManagerEventTypes,
|
|
32
32
|
IssuesManager
|
|
33
33
|
} from '../front_end/models/issues_manager/IssuesManager.js';
|
|
34
|
-
export
|
|
34
|
+
export * as MarkdownIssueDescription from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
|
|
35
35
|
export * as TraceEngine from '../front_end/models/trace/trace.js';
|
|
36
36
|
export * as Marked from '../front_end/third_party/marked/marked.js';
|
package/package.json
CHANGED
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"build": "vpython3 third_party/node/node.py --output scripts/run_build.mjs",
|
|
22
22
|
"check-external-links": "vpython3 third_party/node/node.py --output scripts/check_external_links.js",
|
|
23
23
|
"collect-strings": "vpython3 third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
|
|
24
|
-
"components-server": "vpython3 third_party/node/node.py --output scripts/component_server/server.js",
|
|
25
24
|
"debug-webtest": "vpython3 third_party/node/node.py --output scripts/npm_test.js --debug-devtools",
|
|
26
25
|
"generate-protocol-resources": "vpython3 scripts/deps/generate_protocol_resources.py && git cl format --js",
|
|
27
26
|
"install-deps": "vpython3 scripts/deps/manage_node_deps.py",
|
|
28
|
-
"lint": "vpython3 third_party/node/node.py --output
|
|
27
|
+
"lint": "vpython3 third_party/node/node.py --output scripts/test/run_lint_check.mjs",
|
|
29
28
|
"prebuild": "gn gen out/Default",
|
|
30
29
|
"rdb": "rdb stream -new -realm chromium:public --",
|
|
31
30
|
"start": "vpython3 third_party/node/node.py --output scripts/run_start.mjs",
|
|
@@ -103,5 +102,5 @@
|
|
|
103
102
|
"flat-cache": "6.1.12"
|
|
104
103
|
}
|
|
105
104
|
},
|
|
106
|
-
"version": "1.0.
|
|
105
|
+
"version": "1.0.1548870"
|
|
107
106
|
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// Copyright 2014 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
export class WorkerWrapper {
|
|
6
|
-
readonly #workerPromise: Promise<Worker>;
|
|
7
|
-
#disposed?: boolean;
|
|
8
|
-
#rejectWorkerPromise?: (error: Error) => void;
|
|
9
|
-
|
|
10
|
-
private constructor(workerLocation: URL) {
|
|
11
|
-
this.#workerPromise = new Promise((fulfill, reject) => {
|
|
12
|
-
this.#rejectWorkerPromise = reject;
|
|
13
|
-
const worker = new Worker(workerLocation, {type: 'module'});
|
|
14
|
-
worker.onerror = event => {
|
|
15
|
-
console.error(`Failed to load worker for ${workerLocation.href}:`, event);
|
|
16
|
-
};
|
|
17
|
-
worker.onmessage = (event: MessageEvent<unknown>) => {
|
|
18
|
-
console.assert(event.data === 'workerReady');
|
|
19
|
-
worker.onmessage = null;
|
|
20
|
-
fulfill(worker);
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
static fromURL(url: URL): WorkerWrapper {
|
|
26
|
-
return new WorkerWrapper(url);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
postMessage(message: unknown, transfer?: Transferable[]): void {
|
|
30
|
-
void this.#workerPromise.then(worker => {
|
|
31
|
-
if (!this.#disposed) {
|
|
32
|
-
worker.postMessage(message, transfer ?? []);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
dispose(): void {
|
|
38
|
-
this.#disposed = true;
|
|
39
|
-
void this.#workerPromise.then(worker => worker.terminate());
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
terminate(immediately = false): void {
|
|
43
|
-
if (immediately) {
|
|
44
|
-
this.#rejectWorkerPromise?.(new Error('Worker terminated'));
|
|
45
|
-
}
|
|
46
|
-
this.dispose();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
set onmessage(listener: (event: MessageEvent) => void) {
|
|
50
|
-
void this.#workerPromise.then(worker => {
|
|
51
|
-
worker.onmessage = listener;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
set onerror(listener: (event: Event) => void) {
|
|
56
|
-
void this.#workerPromise.then(worker => {
|
|
57
|
-
worker.onerror = listener;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|